Bluetooth channels rate fix (it was 60ms instead of 20ms)

This commit is contained in:
Bertrand Songis
2019-04-02 10:45:21 +02:00
parent 4c04255f96
commit c5793c93d5
+7 -7
View File
@@ -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;