]> git.tnoah.ca Git - lora-radio.git/commitdiff
RGB LED indications for RNode NG
authorMark Qvist <mark@unsigned.io>
Sat, 11 Jun 2022 14:50:07 +0000 (16:50 +0200)
committerMark Qvist <mark@unsigned.io>
Sat, 11 Jun 2022 14:50:07 +0000 (16:50 +0200)
Config.h
Utilities.h

index 0ca9a13ccc58bfa30f4f07084fd384b3e8d92003..99f8c1eee2c38052e062b0c3c676be17e74497e4 100644 (file)
--- a/Config.h
+++ b/Config.h
@@ -4,7 +4,7 @@
        #define CONFIG_H
 
        #define MAJ_VERS  0x01
-       #define MIN_VERS  0x1C
+       #define MIN_VERS  0x1D
 
        #define PLATFORM_AVR   0x90
     #define PLATFORM_ESP32 0x80
index 528e9c104f34adab7589e99ad04cb4e7e7365a61..d6750e22954f9e7331d8a3bb54917275c470aacf 100644 (file)
@@ -122,6 +122,7 @@ void led_indicate_error(int cycles) {
                        delay(100);
                        npset(0xFF, 0x50, 0x00);
                        delay(100);
+                       if (!forever) cycles--;
                }
                npset(0,0,0);
        #else
@@ -169,6 +170,7 @@ void led_indicate_warning(int cycles) {
                        delay(100);
                        npset(0x00, 0x00, 0x00);
                        delay(100);
+                       if (!forever) cycles--;
                }
                npset(0,0,0);
        #else
@@ -176,11 +178,11 @@ void led_indicate_warning(int cycles) {
                cycles = forever ? 1 : cycles;
                digitalWrite(pin_led_tx, HIGH);
                while(cycles > 0) {
-               led_tx_off();
-               delay(100);
-               led_tx_on();
-               delay(100);
-               if (!forever) cycles--;
+      led_tx_off();
+      delay(100);
+      led_tx_on();
+      delay(100);
+      if (!forever) cycles--;
     }
     led_tx_off();
        #endif
@@ -210,6 +212,7 @@ void led_indicate_warning(int cycles) {
                        delay(100);
                        npset(0x00, 0x00, 0x00);
                        delay(100);
+                       if (!forever) cycles--;
                  }
                  npset(0,0,0);
                }