Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ttyplot does not read data #52

Open
themightyoarfish opened this issue Nov 8, 2020 · 6 comments
Open

ttyplot does not read data #52

themightyoarfish opened this issue Nov 8, 2020 · 6 comments
Labels
needs info Further information is requested

Comments

@themightyoarfish
Copy link

So while the examples work, the command output I want to plot doesn't. I have a line such as

find  minicrane-scans/mrs/2020/11/02/ -name "*.pcd" | sort | xargs ./bin/pcl_icp | grep Yaw --line-buffered | cut -d" " -f 2

which runs and continuously outputs to stdout

-0
-0.000116325
-0.000274716
-0.000444506
-0.000536768
-0.000640014
-0.000762741
-0.000762741
-0.000997292
-0.00122629
-0.00153955
-0.00172964
-0.00172996
-0.00172996
-0.00180447
-0.00180986
...

However, piping this to ttyplot only shows waiting for data from stdin .

@themightyoarfish
Copy link
Author

themightyoarfish commented Nov 8, 2020

Oh actually it just takes a long time to update, maybe it need to read a minimum number of values before acting on them?
A plot appears after a while, then doesn't move, then moves rapidly and then freezes again. The plot also does not make sens (should be monotonically increasing, but is just random numbers.

Screenshot 2020-11-08 at 13 50 58

@luckman212
Copy link

luckman212 commented Nov 8, 2020

@themightyoarfish Funny timing, I was playing with graphing WiFi signal RSSI yesterday, and realized that ttyplot does not seem to work with negative values.

For now, as a workaround I just inverted the numbers so my data would plot:

while true; do
  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --getinfo |
  awk '/agrCtlRSSI/{print -$2; exit;}';
  sleep 1;
done |
ttyplot -t "RSSI"

@tenox7
Copy link
Owner

tenox7 commented Nov 15, 2020

yes ttyplot only works with positive values, I think support for negative values is a very good feature request

as for slow speeds read about stdio buffering in unix, bottom of the readme, you will likely need to add some flush

@themightyoarfish
Copy link
Author

themightyoarfish commented Nov 16, 2020 via email

@tenox7
Copy link
Owner

tenox7 commented Nov 17, 2020

can you post an example where unbuffering didn't help?

@hartwork
Copy link
Collaborator

hartwork commented Nov 30, 2023

@themightyoarfish besides support for negative values (tracked by #53): is any of the rest still an issue with release 1.5.2 1.6.0?

@hartwork hartwork added the needs info Further information is requested label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants