Open berndporr opened 8 years ago
There's code in place to create repeat values if a sensor's refresh rate is too low; I'm concerned that that's somehow getting applied in the wrong place. Will take a look.
Thanks! Sampling rate is 125Hz as before.
Bernd,
I just pushed some code to the master branch that should help some. It looks like we may need some additional engineering before we can handle data at that rate.
Thanks! I've seen you've made the path creation a bit less frequent. Still quite choppy at 125Hz. Would be great if you could make it work at that sampling rate. Happy to help/debug from here.
[Note to self: internal bug b/33239073]
Not sure if you guys have worked on it but I've bought yesterday a tablet running Nougat 7.1.1 (Lenovo TB-850F) and that plots the data super smoothly at Atty's 125Hz sampling rate. See screenshot.
We have been making small improvements where we can, but I still think we can do even better. Great to hear that the progress we have made is showing up!
@dektar , @precision , @scrubskip https://www.youtube.com/watch?v=M-l7K_AMr-Q @dsaff I thought that the sine becomes rough because there is not enough time between scrolls to plot the data. So I had a look at this. I'm inputting is a sinewave which is first plotted perfectly. However then it looks that a couple of subsequent samples stay constant. I had a look at the code where that might happen but it looks as if all samples end up in ChartView. That's the way the data comes in as far as I see: The scalarInputSensor gets a onNewData, that then goes into ScalarSensor with then does an addPoint at the ChartController and from there it goes into the ChartView via addPointtoEndOfPath. I'm puzzled where the samples are set to equal as soon as the path becomes longer. To see what arrives at Chartview/addPointToEndOfPath I've added a Log statement here:
You see the data is already corrupted when it arrives at charview. I would have suspected it would have happened there. The chart view actually already gets this step-wise data from the earlier classes and has no problem plotting it. Where could have that happened? Looks like pretty simple thing to fix but cannot find the exact place.