-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
Fix IMU sensor refresh rate selection #3642
Fix IMU sensor refresh rate selection #3642
Conversation
6704267
to
2200124
Compare
This comment has been minimized.
This comment has been minimized.
AUTOMERGE: (FAIL)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- tested good with acc/gyro. could not test mag.
[edit: setting acc or gyro, both change to new value]
Thanks @haslinghuis for looking into this. When I test this PR at the current point, changing either gyro or accelerometer will change the other one; they cannot be set to different 'speeds', they are always the same. The displayed 'speed' of one will change when the speed of the other is changed. Mag appears to be locked to the speed of Gyro or Acc. Adjusting it's speed has no effect, it does nothing. The speed indicated for Mag does not get updated to the speed of Gyro or Acc, even though the gyro/acc speed is what actually is applied. In contrast, changing either gyro or accelerometer has no effect on Debug or Altitude. Debug and Altitude appear to be entirely independent, they can be set to their own speed. I am thinking about what the intended behaviour should be? Is it intended that each trace will be drawn at whatever 'speed' the user selects, ie, that for each trace, it's 'speed' can be set completely independently of the others? In which case, we have separate speed controls for each trace. Or, alternatively, should each trace be 'locked' so that the speed setting is always the same for all traces - in which case we only need a master speed setting, we don't need individual speed settings. If we want to have a combination of both behaviours, then we need the ability to 'lock' some traces to the others, and 'unlock' others. One way could be to have a 'lock'/'unlock' icon next to the speed value. This would be 'locked' by default. Changing the speed of any one of the 'locked' traces would then change all the other 'locked' traces to the new speed. If the user opens the 'lock', however, then that trace becomes 'independent', and can be set to whatever the user wants, and won't be affected by the other ones. An alternative could be to have a 'master' speed setting at the top. If the master speed is changed, then the speed of all traces is updated to that speed. However, if the speed setting of an individual trace is changed, the result affects only that single trace, not any of the others. In a practical sense, I typically like all the traces to align and be at the same speed. So if we had a 'master' speed control, it should reset the screen and reset/sync all vertical grid lines and the 'time' numbers that appear under the traces as well. Currently they get out of sync easily. Maybe the idea of a 'master speed control' would simplify things a bit? |
You need to know that underlying gyro, accel and mag data is filled up using same betaflight-configurator/src/js/tabs/sensors.js Lines 375 to 380 in 11279cd
Further improvement could be indeed but are out of the scope of this PR:
|
@haslinghuis thanks for fast respond. |
@mituritsyn - should be fixed now. |
This comment has been minimized.
This comment has been minimized.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Do you want to test this code? Here you have an automated build: |
My point is that the current user interface suggests that the 'speed' of each trace is independent, because each trace has it's own pop-up. Given that user interface, we should provide each trace with an independent 'speed' from its pop-up. |
Latest version works 'as intended', in that Acc, Gyro and Mag all share common speed, and cannot be set independently. I'm a bit confused about why we want different graph speeds for the other channels, but they can be set independently. Can I ask what the numbers under the vertical grid lines represent? Are they sample counts, or time intervals? |
The number is generated using tick interval used in a transition using D3 library. betaflight-configurator/src/js/tabs/sensors.js Lines 104 to 107 in 11279cd
|
* Fix sensor refresh rate selection * Fix html * Refactor
Fixes: