fix(bw): bluetooth discovery popup menu lockup (#5918)
This commit is contained in:
@@ -430,8 +430,7 @@ void onBluetoothConnectMenu(const char * result)
|
|||||||
uint8_t index = (result - reusableBuffer.moduleSetup.bt.devices[0]) / sizeof(reusableBuffer.moduleSetup.bt.devices[0]);
|
uint8_t index = (result - reusableBuffer.moduleSetup.bt.devices[0]) / sizeof(reusableBuffer.moduleSetup.bt.devices[0]);
|
||||||
strncpy(bluetooth.distantAddr, reusableBuffer.moduleSetup.bt.devices[index], LEN_BLUETOOTH_ADDR);
|
strncpy(bluetooth.distantAddr, reusableBuffer.moduleSetup.bt.devices[index], LEN_BLUETOOTH_ADDR);
|
||||||
bluetooth.state = BLUETOOTH_STATE_BIND_REQUESTED;
|
bluetooth.state = BLUETOOTH_STATE_BIND_REQUESTED;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
reusableBuffer.moduleSetup.bt.devicesCount = 0;
|
reusableBuffer.moduleSetup.bt.devicesCount = 0;
|
||||||
bluetooth.state = BLUETOOTH_STATE_DISCOVER_END;
|
bluetooth.state = BLUETOOTH_STATE_DISCOVER_END;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -337,8 +337,8 @@ void POPUP_MENU_TITLE(const char * s)
|
|||||||
|
|
||||||
void POPUP_MENU_START(PopupMenuHandler handler)
|
void POPUP_MENU_START(PopupMenuHandler handler)
|
||||||
{
|
{
|
||||||
killAllEvents();
|
|
||||||
if (handler != popupMenuHandler) {
|
if (handler != popupMenuHandler) {
|
||||||
|
killAllEvents();
|
||||||
AUDIO_KEY_PRESS();
|
AUDIO_KEY_PRESS();
|
||||||
popupMenuHandler = handler;
|
popupMenuHandler = handler;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user