This commit is contained in:
Willy-JL
2023-11-19 23:42:25 +00:00
parent 2b71789692
commit 91368a4538
7 changed files with 126 additions and 114 deletions

View File

@@ -1,11 +1,9 @@
#include "hex_viewer_led.h"
#include "../hex_viewer.h"
void hex_viewer_led_set_rgb(void* context, int red, int green, int blue) {
HexViewer* app = context;
if (app->led != 1) {
if(app->led != 1) {
return;
}
NotificationMessage notification_led_message_1;
@@ -26,7 +24,8 @@ void hex_viewer_led_set_rgb(void* context, int red, int green, int blue) {
NULL,
};
notification_message(app->notification, &notification_sequence);
furi_thread_flags_wait(0, FuriFlagWaitAny, 10); //Delay, prevent removal from RAM before LED value set
furi_thread_flags_wait(
0, FuriFlagWaitAny, 10); //Delay, prevent removal from RAM before LED value set
}
void hex_viewer_led_reset(void* context) {
@@ -34,6 +33,7 @@ void hex_viewer_led_reset(void* context) {
notification_message(app->notification, &sequence_reset_red);
notification_message(app->notification, &sequence_reset_green);
notification_message(app->notification, &sequence_reset_blue);
furi_thread_flags_wait(0, FuriFlagWaitAny, 300); //Delay, prevent removal from RAM before LED value set
furi_thread_flags_wait(
0, FuriFlagWaitAny, 300); //Delay, prevent removal from RAM before LED value set
}