mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Notify: add firmware update flag and implement for OreoLED
This commit is contained in:
parent
61ed812fc4
commit
7675160e33
@ -89,6 +89,7 @@ public:
|
||||
uint16_t autotune_next_axis : 1; // 1 when autotune has completed one axis and is moving onto the next
|
||||
uint16_t mission_complete : 1; // 1 when the mission has completed successfully
|
||||
uint16_t waypoint_complete : 1; // 1 as vehicle completes a waypoint
|
||||
uint16_t firmware_update : 1; // 1 just before vehicle firmware is updated
|
||||
};
|
||||
|
||||
// the notify flags are static to allow direct class access
|
||||
|
@ -88,6 +88,12 @@ void OreoLED_PX4::update()
|
||||
return;
|
||||
}
|
||||
|
||||
// handle firmware update event
|
||||
if (AP_Notify::events.firmware_update) {
|
||||
set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_COLOUR_CYCLE);
|
||||
return;
|
||||
}
|
||||
|
||||
// return immediately if custom pattern has been sent
|
||||
if (OreoLED_PX4::_pattern_override != 0) {
|
||||
// reset stage so patterns will be resent once override clears
|
||||
|
Loading…
Reference in New Issue
Block a user