Linux: handle arming_failed as event
This commit is contained in:
parent
3361002379
commit
a991b4a823
@ -66,11 +66,8 @@ void ToneAlarm_Linux::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for arming failure
|
// check for arming failure
|
||||||
if(flags.arming_failed != AP_Notify::flags.arming_failed) {
|
if (AP_Notify::events.arming_failed) {
|
||||||
flags.arming_failed = AP_Notify::flags.arming_failed;
|
play_tune(TONE_ARMING_FAILURE_TUNE);
|
||||||
if(flags.arming_failed) {
|
|
||||||
play_tune(TONE_ARMING_FAILURE_TUNE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if arming status has changed
|
// check if arming status has changed
|
||||||
|
@ -44,7 +44,6 @@ private:
|
|||||||
bool failsafe_battery : 1; // true if battery failsafe
|
bool failsafe_battery : 1; // true if battery failsafe
|
||||||
bool gps_glitching : 1; // true if gps position is not good
|
bool gps_glitching : 1; // true if gps position is not good
|
||||||
bool failsafe_gps : 1; // true if gps failsafe
|
bool failsafe_gps : 1; // true if gps failsafe
|
||||||
bool arming_failed : 1; // false = failing checks, true = passed
|
|
||||||
bool parachute_release : 1; // true if parachute is being released
|
bool parachute_release : 1; // true if parachute is being released
|
||||||
} flags;
|
} flags;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user