From c5793c93d5ea037fd2468e41768ca607141a717b Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Tue, 2 Apr 2019 10:45:21 +0200 Subject: [PATCH] Bluetooth channels rate fix (it was 60ms instead of 20ms) --- radio/src/bluetooth.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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;