mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-429 manualcontrol: first register config change callbacks and only then do a initial configuration check
This commit is contained in:
parent
c289dd3a1a
commit
abfe95095d
@ -129,15 +129,15 @@ static void SettingsUpdatedCb(UAVObjEvent *ev);
|
||||
*/
|
||||
int32_t ManualControlStart()
|
||||
{
|
||||
// Run this initially to make sure the configuration is checked
|
||||
configuration_check();
|
||||
|
||||
// Whenever the configuration changes, make sure it is safe to fly
|
||||
SystemSettingsConnectCallback(configurationUpdatedCb);
|
||||
ManualControlSettingsConnectCallback(configurationUpdatedCb);
|
||||
FlightModeSettingsConnectCallback(configurationUpdatedCb);
|
||||
ManualControlCommandConnectCallback(commandUpdatedCb);
|
||||
|
||||
// Run this initially to make sure the configuration is checked
|
||||
configuration_check();
|
||||
|
||||
// clear alarms
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_MANUALCONTROL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user