Bluetooth fixes (reconnection issues, telemetry mode not working) (#5186)
Bluetooth fixes (reconnection issues, telemetry mode not working)
This commit is contained in:
@@ -86,6 +86,10 @@ void bluetoothInit(uint32_t baudrate)
|
||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||
NVIC_Init(&NVIC_InitStructure);
|
||||
|
||||
btRxFifo.clear();
|
||||
btTxFifo.clear();
|
||||
bluetoothWriteState = BLUETOOTH_WRITE_IDLE;
|
||||
|
||||
GPIO_ResetBits(BT_EN_GPIO, BT_EN_GPIO_PIN); // open bluetooth
|
||||
}
|
||||
|
||||
@@ -137,3 +141,8 @@ void bluetoothWriteWakeup(void)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t bluetoothIsWriting(void)
|
||||
{
|
||||
return bluetoothWriteState != BLUETOOTH_WRITE_IDLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user