1
0
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:
Philippe Renon 2016-10-09 19:30:25 +02:00
parent c289dd3a1a
commit abfe95095d

View File

@ -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);