diff --git a/Firmware/RTK_Everywhere/Bluetooth.ino b/Firmware/RTK_Everywhere/Bluetooth.ino index c04ece987..b88270d57 100644 --- a/Firmware/RTK_Everywhere/Bluetooth.ino +++ b/Firmware/RTK_Everywhere/Bluetooth.ino @@ -46,7 +46,7 @@ void bluetoothCallback(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) { systemPrintln("BT client Connected"); bluetoothState = BT_CONNECTED; - bluetoothLedOn(); + //LED is controlled by tickerBluetoothLedUpdate() } if (event == ESP_SPP_CLOSE_EVT) @@ -58,7 +58,6 @@ void bluetoothCallback(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) printEndpoint = PRINT_ENDPOINT_SERIAL; bluetoothState = BT_NOTCONNECTED; - bluetoothLedOff(); } } diff --git a/Firmware/RTK_Everywhere/Tasks.ino b/Firmware/RTK_Everywhere/Tasks.ino index 4db3ed1e4..3a8489282 100644 --- a/Firmware/RTK_Everywhere/Tasks.ino +++ b/Firmware/RTK_Everywhere/Tasks.ino @@ -1456,8 +1456,13 @@ void buttonCheckTask(void *e) // Beep shortly before the shutdown IC takes over else if (userBtn->pressedFor(2100)) { + systemPrintln("Shutting down"); + tickerStop(); // Stop controlling LEDs via ticker task + pinMode(pin_gnssStatusLED, OUTPUT); + pinMode(pin_bluetoothStatusLED, OUTPUT); + gnssStatusLedOn(); bluetoothLedOn(); @@ -1470,6 +1475,9 @@ void buttonCheckTask(void *e) delay(500); // We will be shutting off during this delay but this prevents another beepMultiple() // from firing } + + while(1) + ; } } // End productVariant == Torch else // RTK EVK, RTK Facet v2, RTK Facet mosaic