From 5055144cd32ee94619791deae6debeef1a5b03a4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Oct 2019 08:05:08 +1100 Subject: [PATCH] AP_Periph: fixed scaling of LEDs RGBLed packets sent as 5:6:5 bits --- Tools/AP_Periph/can.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/AP_Periph/can.cpp b/Tools/AP_Periph/can.cpp index bc60415f96..55b1655591 100644 --- a/Tools/AP_Periph/can.cpp +++ b/Tools/AP_Periph/can.cpp @@ -420,8 +420,13 @@ static void handle_lightscommand(CanardInstance* ins, CanardRxTransfer* transfer } for (uint8_t i=0; i>1)<<3; + const uint8_t blue = cmd.color.blue<<3; hal.rcout->set_neopixel_rgb_data(HAL_PERIPH_NEOPIXEL_CHAN, (1U<neopixel_send(); }