diff --git a/radio/src/bluetooth.cpp b/radio/src/bluetooth.cpp index 95245ffcc..984c0aa0b 100644 --- a/radio/src/bluetooth.cpp +++ b/radio/src/bluetooth.cpp @@ -341,6 +341,13 @@ void bluetoothWakeup(void) #else // PCBX9E void bluetoothWakeup() { + if (bluetoothState != BLUETOOTH_STATE_OFF) { + bluetoothWriteWakeup(); + if (bluetoothIsWriting()) { + return; + } + } + tmr10ms_t now = get_tmr10ms(); if (now < bluetoothWakeupTime) @@ -360,13 +367,6 @@ void bluetoothWakeup() bluetoothState = BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT; } - if (bluetoothState != BLUETOOTH_STATE_OFF) { - bluetoothWriteWakeup(); - if (bluetoothIsWriting()) { - return; - } - } - if (bluetoothState == BLUETOOTH_STATE_FACTORY_BAUDRATE_INIT) { bluetoothWriteString("AT+BAUD4\r\n"); bluetoothState = BLUETOOTH_STATE_BAUDRATE_SENT;