-
-
Notifications
You must be signed in to change notification settings - Fork 1k
MSP Multiple GYRO/ACC alignment support #1338
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
MSP Multiple GYRO/ACC alignment support #1338
Conversation
24a9aaf to
8d99a1c
Compare
McGiverGim
left a comment
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.
Good job! Only minor changes :)
8d99a1c to
e5da4a3
Compare
* Make use of 1.41.0 MSP API changes introduced betaflight/betaflight#7506 * Not really happy with the elements/css, but opening this up for feedback. I can't quite get the select inputs or the text/icons to go where I want :p
e5da4a3 to
e322ef0
Compare
McGiverGim
left a comment
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.
Only a suggestions, but to me is right at it is.
I will try to test it later, to be sure that it works. We will release the Configurator soon so we will have very few feedback from users.
| var legacy_accel_alignment_e = $('.tab-configuration .legacy_accel_alignment'); | ||
|
|
||
| // Hide the new multi gyro element by default | ||
| gyro_align_content_e.hide(); |
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.
Maybe is better to include it in the else of the next if, to let it clear when is hide or shown. But is only an opinion. To me is right in both ways.
|
Under some resolutions, maybe caused by the translations, it has some problems... Reducing it more, it goes worst: To try to fix it, I suggest:
What do you think? |
|
@McGiverGim I'll try both of your suggestions, added Don't Merge label for now. |
|
Tested this with betaflight/betaflight#7914, and the behaviour with / without multiple gyros is working as expected. We could probably extend this to make it return (no gyro /) single gyro / multi gyro / dual gyro (multi & both the same type). |
|
Sorry, but I figured out we could as well go all in, and show the user if his setup is capable of 'BOTH' as well, considering we already do all of the detecting required for it. Now the first byte of the gyro data on MSP returns a value from this enum: https://github.com/betaflight/betaflight/pull/7914/files#diff-20ad1ec21e7f8cb08c6b7951c95049eaR71 |
|
You are proposing to show BOTH in the select only if DETECTED_DUAL_GYROS is returned in this bit, right? EDIT: and I suppose the same for FIRST (DETECTED_GYRO_1 | DETECTED_BOTH_GYROS | DETECTED_DUAL_GYROS ) and SECOND (DETECTED_GYRO_2 | DETECTED_BOTH_GYROS | DETECTED_DUAL_GYROS ). |
|
@McGiverGim: The returned byte will contain:
We've already had a bunch of user requests for 'why can't my 2 gyros (which are of a different model) be used for both'. The hope is that if we make the GUI aware of this, and potentially add a help text explaining to users that why it works this way, we can cut down on these requests. |
|
The both/dual stuff is epic, that will definitely help with the UX. I'll incorporate into this change. It will definitely help the case where dual gyro board cannot use 'BOTH' e.g. sensor fusion and configuration is silently reset. |
…ignment Fix styling board and gyro align
|
Good to go 👍 thanks @McGiverGim !! |
|
I have almost ready the version that shows/hides the BOTH and GYRO depending on the flags. Is better to make a PR after this is merged o make the PR to your branch @fujin? |
|
@McGiverGim either is fine with me. I'm heading to sleep soon so maybe makes sense to do a separate one. |
|
Yes, after doing some tests, I think there are some things that maybe need discussion. So maybe better to merge this first, and then, I will push the other to see what is the final desired behaviour. |
mikeller
left a comment
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.
Approving this under the provisio that #1346 fixes the misalignment of use_multi_gyro.
| gyro_align_content_e.hide(); | ||
|
|
||
| // If we are sent USE_MULTI_GYRO flag from the target, show the new element, while hiding the old ones. | ||
| if (SENSOR_ALIGNMENT.use_multi_gyro == 1) { |
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.
This is not in accordance with what Betaflight 4.0.0-RC6 is sending for use_multi_gyro.


Update MSP gyro alignment support and preserve backwards compatibility betaflight#7506
4.0.0-RC5 dual gyro board (MKF7SE)
USE_MULTI_GYRO:4.0.0-RC5 single gyro board (AKF4):
It looks like now that USE_MULTI_GYRO is the default, the use_multi_gyro MSP API 1.41.0 flag is sent regardless of the second IMU being present or not. We could perhaps improve this.
3.5.7 single gyro board (AKF4):