From 2edb096ad9a937422e0440556e155b7fbd2c33e9 Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Fri, 10 Apr 2015 11:46:58 -0700 Subject: [PATCH] AP_Notify: use new macros for white/red pattern --- libraries/AP_Notify/OreoLED_PX4.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/libraries/AP_Notify/OreoLED_PX4.cpp b/libraries/AP_Notify/OreoLED_PX4.cpp index 3c8e656eb7..1d5e3449f6 100644 --- a/libraries/AP_Notify/OreoLED_PX4.cpp +++ b/libraries/AP_Notify/OreoLED_PX4.cpp @@ -203,10 +203,7 @@ void OreoLED_PX4::update() // send colours (later we will set macro if required) if (last_stage < 10) { if (initialization_done) { - set_macro(OREOLED_FRONTLEFT, OREOLED_PARAM_MACRO_WHITE); // white - set_macro(OREOLED_FRONTRIGHT, OREOLED_PARAM_MACRO_WHITE); // white - set_macro(OREOLED_BACKLEFT, OREOLED_PARAM_MACRO_RED); // red - set_macro(OREOLED_BACKRIGHT, OREOLED_PARAM_MACRO_RED); // red + set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_AUTOMOBILE); } last_stage = 10; } else if (last_stage >= 10) { @@ -215,15 +212,11 @@ void OreoLED_PX4::update() if (AP_Notify::flags.autopilot_mode) { // autopilot flight modes start breathing macro + set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_AUTOMOBILE); set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_BREATH); } else { // manual flight modes stop breathing -- solid color - set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_RESET); - uint8_t oreoled_pattern_solid = OREOLED_PATTERN_SOLID; - send_bytes(0, (uint8_t) 1, &oreoled_pattern_solid); - send_bytes(1, (uint8_t) 1, &oreoled_pattern_solid); - send_bytes(2, (uint8_t) 1, &oreoled_pattern_solid); - send_bytes(3, (uint8_t) 1, &oreoled_pattern_solid); + set_macro(OREOLED_INSTANCE_ALL, OREOLED_PARAM_MACRO_AUTOMOBILE); } // record we have processed this change