Spectrum analyser fixes

Compatibily issue when telemetry comes from int + ext modules
This commit is contained in:
Bertrand Songis
2019-04-29 11:52:17 +02:00
parent 14c282110d
commit d70f3a40ef
12 changed files with 13 additions and 39 deletions
@@ -94,7 +94,10 @@ void menuModelModuleOptions(event_t event)
});
if (reusableBuffer.hardwareAndSettings.moduleSettings.state == PXX2_HARDWARE_INFO && moduleState[g_moduleIdx].mode == MODULE_MODE_NORMAL) {
moduleState[g_moduleIdx].readModuleSettings(&reusableBuffer.hardwareAndSettings.moduleSettings);
if (modelId)
moduleState[g_moduleIdx].readModuleSettings(&reusableBuffer.hardwareAndSettings.moduleSettings);
else
moduleState[g_moduleIdx].readModuleInformation(&reusableBuffer.hardwareAndSettings.modules[g_moduleIdx], PXX2_HW_INFO_TX_ID, PXX2_HW_INFO_TX_ID);
}
if (menuEvent) {
+2 -3
View File
@@ -1191,7 +1191,7 @@ void menuModelSetup(event_t event)
if (bluetooth.distantAddr[0]) {
lcdDrawText(INDENT_WIDTH, y+1, bluetooth.distantAddr, TINSIZE);
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, BUTTON(TR_CLEAR), attr);
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
bluetooth.state = BLUETOOTH_STATE_CLEAR_REQUESTED;
memclear(bluetooth.distantAddr, sizeof(bluetooth.distantAddr));
}
@@ -1202,8 +1202,7 @@ void menuModelSetup(event_t event)
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_BUTTON_INIT, attr);
else
lcdDrawText(MODEL_SETUP_2ND_COLUMN, y, STR_BUTTON_DISCOVER, attr);
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
killEvents(KEY_ENTER);
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
if (bluetooth.state < BLUETOOTH_STATE_IDLE) {
bluetooth.state = BLUETOOTH_STATE_OFF;
}