From c8be130f2eef9a39e883896cb53f76ef6534f633 Mon Sep 17 00:00:00 2001 From: Ralf Schlatterbeck Date: Mon, 26 Jan 2015 20:44:30 +0100 Subject: [PATCH] Finally fix LED-Strip driver .. and adapt led-strip.c to changed polarity (again). --- examples/osd/led-strip/led-strip.c | 6 +++--- platform/osd-merkur/dev/LED_Strip_Suli | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/osd/led-strip/led-strip.c b/examples/osd/led-strip/led-strip.c index 15efa8218..a16edc0ed 100644 --- a/examples/osd/led-strip/led-strip.c +++ b/examples/osd/led-strip/led-strip.c @@ -63,7 +63,7 @@ extern resource_t res_radio; #include "LED_Strip_Suli.h" -int color_rgb [3] = {255, 0, 255}; +uint8_t color_rgb [3] = {0, 255, 0}; static uint8_t name_to_offset (const char * name) { @@ -83,12 +83,12 @@ color_to_string (const char *name, uint8_t is_json, char *buf, size_t bsize) if (is_json) { fmt = "\"%d\""; } - return snprintf (buf, bsize, fmt, 255 - color_rgb [name_to_offset (name)]); + return snprintf (buf, bsize, fmt, color_rgb [name_to_offset (name)]); } void color_from_string (const char *name, const char *s) { - color_rgb [name_to_offset (name)] = 255 - atoi (s); + color_rgb [name_to_offset (name)] = atoi (s); led_strip_begin (); led_strip_set_color (color_rgb [0], color_rgb [1], color_rgb [2]); led_strip_end (); diff --git a/platform/osd-merkur/dev/LED_Strip_Suli b/platform/osd-merkur/dev/LED_Strip_Suli index 5ec5d8063..56b7ce6c3 160000 --- a/platform/osd-merkur/dev/LED_Strip_Suli +++ b/platform/osd-merkur/dev/LED_Strip_Suli @@ -1 +1 @@ -Subproject commit 5ec5d806331bf071c7f38e30344b82e9facfb88d +Subproject commit 56b7ce6c3227aeac131b59e39829c4991e7caefd