Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/BluetoothStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,14 @@ class BluetoothStatus : public Status
case ConnectionState::CONNECTED:
LOG_DEBUG("BluetoothStatus CONNECTED");
#ifdef BLE_LED
#ifdef BLE_LED_INVERTED
digitalWrite(BLE_LED, LOW);
#else
digitalWrite(BLE_LED, HIGH);
#endif
digitalWrite(BLE_LED, LED_STATE_ON);
#endif
break;

case ConnectionState::DISCONNECTED:
LOG_DEBUG("BluetoothStatus DISCONNECTED");
#ifdef BLE_LED
#ifdef BLE_LED_INVERTED
digitalWrite(BLE_LED, HIGH);
#else
digitalWrite(BLE_LED, LOW);
#endif
digitalWrite(BLE_LED, LED_STATE_OFF);
#endif
break;
}
Expand Down
10 changes: 4 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,7 @@ void setup()

#ifdef BLE_LED
pinMode(BLE_LED, OUTPUT);
#ifdef BLE_LED_INVERTED
digitalWrite(BLE_LED, HIGH);
#else
digitalWrite(BLE_LED, LOW);
#endif
digitalWrite(BLE_LED, LED_STATE_OFF);
#endif

concurrency::hasBeenSetup = true;
Expand Down Expand Up @@ -493,7 +489,9 @@ void setup()
// The ThinkNodes have their own blink logic
// ledPeriodic = new Periodic("Blink", elecrowLedBlinker);
#else

ledPeriodic = new Periodic("Blink", ledBlinker);

#endif

fsInit();
Expand Down Expand Up @@ -834,7 +832,7 @@ void setup()
SPI.begin();
#endif
#else
// ESP32
// ESP32
#if defined(HW_SPI1_DEVICE)
SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
Expand Down
6 changes: 1 addition & 5 deletions src/nimble/NimbleBluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,7 @@ void NimbleBluetooth::deinit()
isDeInit = true;

#ifdef BLE_LED
#ifdef BLE_LED_INVERTED
digitalWrite(BLE_LED, HIGH);
#else
digitalWrite(BLE_LED, LOW);
#endif
digitalWrite(BLE_LED, LED_STATE_OFF);
#endif
#ifndef NIMBLE_TWO
NimBLEDevice::deinit();
Expand Down
1 change: 0 additions & 1 deletion variants/esp32/wiphone/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#undef GPS_TX_PIN
#define NO_GPS 1
#define HAS_GPS 0
#define NO_SCREEN
#define HAS_SCREEN 0

// Default SPI1 will be mapped to the display
Expand Down
1 change: 0 additions & 1 deletion variants/esp32s3/esp32-s3-pico/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define EXT_NOTIFY_OUT 22
#define BUTTON_PIN 0 // 17

// #define LED_PIN PIN_LED
// Board has RGB LED 21
#define HAS_NEOPIXEL // Enable the use of neopixels
#define NEOPIXEL_COUNT 1 // How many neopixels are connected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ extern "C" {
#define PIN_LED2 LED_BLUE
#define PIN_LED3 LED_RED

#define PIN_LED PIN_LED1

#define LED_STATE_ON 1 // State when LED is lit

// XIAO Wio-SX1262 Shield User button
Expand Down
1 change: 0 additions & 1 deletion variants/nrf52840/t-echo-lite/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ extern "C" {
#define LED_GREEN PIN_LED1

#define BLE_LED LED_BLUE
#define BLE_LED_INVERTED 1
#define LED_STATE_ON 0 // State when LED is lit

// Buttons
Expand Down
2 changes: 1 addition & 1 deletion variants/rp2040/challenger_2040_lora/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define ADC_RESOLUTION (12u)

// LEDs
#define PIN_LED (24u)
#define LED_PIN (24u)

// Serial
#define PIN_SERIAL1_TX (16u)
Expand Down
2 changes: 0 additions & 2 deletions variants/rp2040/challenger_2040_lora/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#define EXT_NOTIFY_OUT 0xFFFFFFFF
#define BUTTON_PIN 0xFFFFFFFF

#define LED_PIN PIN_LED

#define USE_RF95 // RFM95/SX127x

#undef LORA_SCK
Expand Down
3 changes: 1 addition & 2 deletions variants/rp2040/rak11310/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;

// LEDs
#define PIN_LED (23u)
#define PIN_LED1 PIN_LED
#define PIN_LED1 (23u)
#define LED_NOTIFICATION (24u)

#define ADC_RESOLUTION 12
Expand Down
2 changes: 1 addition & 1 deletion variants/rp2040/rak11310/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define I2C_SDA1 2
#define I2C_SCL1 3

#define LED_PIN PIN_LED
#define LED_PIN PIN_LED1
#define ledOff(pin) pinMode(pin, INPUT)

#define BUTTON_PIN 9
Expand Down
3 changes: 1 addition & 2 deletions variants/rp2040/senselora_rp2040/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;

// LEDs
#define PIN_LED (23u)
#define PIN_LED1 PIN_LED
#define PIN_LED1 (23u)

#define ADC_RESOLUTION 12

Expand Down
2 changes: 1 addition & 1 deletion variants/rp2040/senselora_rp2040/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define BUTTON_PIN 2
#define BUTTON_NEED_PULLUP

#define LED_PIN PIN_LED
#define LED_PIN PIN_LED1
#define ledOff(pin) pinMode(pin, INPUT)

#undef BATTERY_PIN
Expand Down