Browse Source

R1 Neo: Disable blue LED

Sometimes, when device is disconnected from phone, the blue LED turns
on and does not shut down even when the app connects to the companion
again. Sending a message turns off the LED. This does not happen all the
time when phone is disconnected and unfortunately I do not know how to
reproduce. But other users in old Discord instance also confirmed the
same issue.

The main problem is that turned on LED drain the battery.

I've checked, other variants of the same just disable this LED at all,
so followed the same pattern here. Tested the firmware on my own device.
pull/2601/head
Povilas Balzaravičius 2 months ago
parent
commit
796f55486b
  1. 4
      variants/muziworks_r1_neo/R1NeoBoard.h
  2. 2
      variants/muziworks_r1_neo/variant.h

4
variants/muziworks_r1_neo/R1NeoBoard.h

@ -27,14 +27,14 @@ public:
#if defined(P_LORA_TX_LED)
void onBeforeTransmit() override {
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED on
#if defined(LED_BLUE)
#if defined(LED_BLUE) && LED_BLUE >= 0
// turn off that annoying blue LED before transmitting
digitalWrite(LED_BLUE, LOW);
#endif
}
void onAfterTransmit() override {
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED off
#if defined(LED_BLUE)
#if defined(LED_BLUE) && LED_BLUE >= 0
// do it after transmitting too, just in case
digitalWrite(LED_BLUE, LOW);
#endif

2
variants/muziworks_r1_neo/variant.h

@ -80,7 +80,7 @@ extern "C"
/* LEDs */
#define LED_GREEN (36) // P1.04 (28) GRN_LED_RAK
#define LED_BLUE (28) // P0.28 (31) BLU_LED_RAK
#define LED_BLUE (-1) // Disable annoying flashing caused by Bluefruit
#define LED_BUILTIN (0xFF)

Loading…
Cancel
Save