From 4abe08471736fc1e1b49c190d61e51b223dd73cd Mon Sep 17 00:00:00 2001 From: Derek Jamison Date: Sun, 26 Nov 2023 13:02:00 -0600 Subject: [PATCH] Reverse direction so single LED goes in RGBW order. --- gpio/ws2812b_tester/app.c | 10 +++++----- gpio/ws2812b_tester/application.fam | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpio/ws2812b_tester/app.c b/gpio/ws2812b_tester/app.c index add39ad..bd64634 100644 --- a/gpio/ws2812b_tester/app.c +++ b/gpio/ws2812b_tester/app.c @@ -312,11 +312,11 @@ static bool led_tester_custom_event_callback(void* context, uint32_t event) { // Rotate the pattern for(int i = 0; i < offset; i++) { - uint32_t tmp = rgb[3]; - rgb[3] = rgb[2]; - rgb[2] = rgb[1]; - rgb[1] = rgb[0]; - rgb[0] = tmp; + uint32_t tmp = rgb[0]; + rgb[0] = rgb[1]; + rgb[1] = rgb[2]; + rgb[2] = rgb[3]; + rgb[3] = tmp; } // If deinit, turn off the LEDs diff --git a/gpio/ws2812b_tester/application.fam b/gpio/ws2812b_tester/application.fam index cdadb5e..008a152 100644 --- a/gpio/ws2812b_tester/application.fam +++ b/gpio/ws2812b_tester/application.fam @@ -3,7 +3,7 @@ App( name="WS2812B LED Tester App", apptype=FlipperAppType.EXTERNAL, entry_point="ws2812b_led_tester_app", - fap_version=(1, 3), + fap_version=(1, 4), stack_size=4 * 1024, requires=[ "gui",