Browse Source

Notify: add firmware update flag and implement for OreoLED

mission-4.1.18
Randy Mackay 10 years ago
parent
commit
7675160e33
  1. 1
      libraries/AP_Notify/AP_Notify.h
  2. 6
      libraries/AP_Notify/OreoLED_PX4.cpp

1
libraries/AP_Notify/AP_Notify.h

@ -89,6 +89,7 @@ public: @@ -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

6
libraries/AP_Notify/OreoLED_PX4.cpp

@ -88,6 +88,12 @@ void OreoLED_PX4::update() @@ -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…
Cancel
Save