Bluetooth fixes (reconnection issues, telemetry mode not working) (#5186)

Bluetooth fixes (reconnection issues, telemetry mode not working)
This commit is contained in:
Bertrand Songis
2017-09-05 18:21:29 +02:00
committed by GitHub
parent 5b5c88fb4e
commit bd6bd4deeb
12 changed files with 239 additions and 128 deletions
@@ -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;
}