From 8dae94d90ad6d012d881295c699f03821ee80a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 24 Feb 2017 10:20:47 +0100 Subject: [PATCH] lib/led: add BREATHE mode (but not implemented yet) --- msg/led_control.msg | 2 +- src/lib/led/led.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/msg/led_control.msg b/msg/led_control.msg index 82c4ff826c..ce5d3f56fb 100644 --- a/msg/led_control.msg +++ b/msg/led_control.msg @@ -19,7 +19,7 @@ uint8 MODE_DISABLED = 2 # disable this priority (switch to lower priority setti uint8 MODE_BLINK_SLOW = 3 uint8 MODE_BLINK_NORMAL = 4 uint8 MODE_BLINK_FAST = 5 -# uint8 MODE_BREATHE = 6 # not implemented (yet) +uint8 MODE_BREATHE = 6 # continuously increase & decrease brightness (solid color if driver does not support it) uint8 MAX_PRIORITY = 2 # maxium priority (minimum is 0) diff --git a/src/lib/led/led.cpp b/src/lib/led/led.cpp index fb4ac2dd7f..4da5481c3d 100644 --- a/src/lib/led/led.cpp +++ b/src/lib/led/led.cpp @@ -179,6 +179,7 @@ void LedController::get_control_data(LedControlData &control_data) switch (cur_data.mode) { case led_control_s::MODE_ON: + case led_control_s::MODE_BREATHE: // TODO: handle this properly control_data.leds[i].color = cur_data.color; break;