AP_Notify: fix oreoled race causing startup flicker

This commit is contained in:
Angus Peart 2015-05-05 14:16:21 +08:00 committed by Randy Mackay
parent d48f1b0ccf
commit a887c1d1f2
1 changed files with 2 additions and 4 deletions

View File

@ -195,10 +195,8 @@ void OreoLED_PX4::update()
}
// send colours (later we will set macro if required)
if (last_stage < 10) {
if (initialization_done) {
set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_AUTOMOBILE);
}
if (last_stage < 10 && initialization_done) {
set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_AUTOMOBILE);
last_stage = 10;
} else if (last_stage >= 10) {
static uint8_t previous_autopilot_mode = -1;