-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add MSP support for gyro_cal_on_first_arm #13626
Add MSP support for gyro_cal_on_first_arm #13626
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
src/main/msp/msp.c
Outdated
@@ -2698,7 +2698,7 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP, | |||
#endif | |||
case MSP_SET_ARMING_CONFIG: | |||
armingConfigMutable()->auto_disarm_delay = sbufReadU8(src); | |||
sbufReadU8(src); // reserved | |||
armingConfigMutable()->gyro_cal_on_first_arm = sbufReadU8(src); // reserved |
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.
I suppose now the comment is not necessary. Someone knows what was the reserved for?
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.
It seems it was for the disarm_kill_switch
45a6588
It's a good idea to reuse old MSP fields?
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.
@McGiverGim the parameter was removed in firmware 3.x as configurator only supports firmware 4.x so we can reuse safely.
The reason of not reusing, was that third party tools can talk with the FC, not only the Configurator. If we don't plan to let this, no problem to reusing it. |
This was removed in 2018 so don't think it would have impact on 3d party tools. |
I'm not sure on this one. Why reuse? Configurator is not the only tool using msp. |
Happy to add a new parameter to the message. But as this was removed six years ago don't think it would be used anymore. |
1eccac9
to
c7e31ca
Compare
The issue is we don't know what's out there (OSDs use MSP). And breaking this interface would have unpredictable results. |
The PR itself looks fine. |
@ctzsnooze , this PR only add MSP to already existing routines, i did not deep dive, but i found this: cleanflight/cleanflight#427 which alludes wait-for-arming. |
We use Lines 183 to 196 in e602243
Lines 334 to 338 in e602243
|
disarm_kill_switch
was removed in remove setting which disallow disarming on throttle above low #5073