blink1
blink1 copied to clipboard
Set RGB color now (Command 'n') not supporting LED2?
While working on #171, i found a strange issue: While FadeToColor (command code 'c') works well with 0 for both LEDs and 1 or 2 for LED1 or LED2, doing the same using SetToColor (command code 'n') wasn't entirely consistent: it only worked with 0 for both LEDs and 1 LED1 - however, using a value of 2 for LED2 only seemed to turn off LED 2, but it wasn't being set to any color afterwards.
Can someone please verify this with other tools on other platforms? My blink(1) has firmware V204, Serial 20004xxx. On my first glimpse into https://github.com/todbot/blink1/blob/master/hardware/firmware_mk2/main.c, I couldn't discover anything unusual.
Thanks -Tom
There's currently a bug in the SetToColor ('n') command in that it uses the last-used value of ledn
instead of heeding the value in the SetToColor command.
As a work-around, I would recommend using FadeToColor ('c') with a zero time ticks as the implementation of your library's SetToColor. (e.g. USB HID report { 1, 'c', r,g,b, 0,0, ledn }}
)