Cosmetics
This commit is contained in:
@@ -289,7 +289,6 @@ void Bluetooth::wakeup(void)
|
|||||||
else {
|
else {
|
||||||
static tmr10ms_t waitEnd = 0;
|
static tmr10ms_t waitEnd = 0;
|
||||||
if (state != BLUETOOTH_STATE_IDLE) {
|
if (state != BLUETOOTH_STATE_IDLE) {
|
||||||
|
|
||||||
if (state == BLUETOOTH_INIT) {
|
if (state == BLUETOOTH_INIT) {
|
||||||
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
|
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
|
||||||
char command[32];
|
char command[32];
|
||||||
@@ -470,11 +469,14 @@ void Bluetooth::flashFirmware(const char * filename)
|
|||||||
|
|
||||||
pausePulses();
|
pausePulses();
|
||||||
|
|
||||||
|
/* go to bootloader mode */
|
||||||
|
bluetoothDone();
|
||||||
|
|
||||||
drawProgressScreen(getBasename(filename), "Device reset...", 0, 0);
|
drawProgressScreen(getBasename(filename), "Device reset...", 0, 0);
|
||||||
|
|
||||||
/* wait 2s off */
|
/* wait 100ms */
|
||||||
watchdogSuspend(2000);
|
watchdogSuspend(100);
|
||||||
RTOS_WAIT_MS(2000);
|
RTOS_WAIT_MS(100);
|
||||||
|
|
||||||
const char * result = nullptr;
|
const char * result = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ void bluetoothInit(uint32_t baudrate)
|
|||||||
|
|
||||||
void bluetoothDone()
|
void bluetoothDone()
|
||||||
{
|
{
|
||||||
GPIO_SetBits(BT_EN_GPIO, BT_EN_GPIO_PIN); // close bluetooth
|
GPIO_SetBits(BT_EN_GPIO, BT_EN_GPIO_PIN); // close bluetooth (recent modules will go to bootloader mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void BT_USART_IRQHandler(void)
|
extern "C" void BT_USART_IRQHandler(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user