Add binding options to ARM non FRSKY boards (2.3 branch)

This commit is contained in:
3djc
2018-10-11 10:07:55 +02:00
parent c19e363025
commit b393976879
+3 -3
View File
@@ -198,7 +198,6 @@ enum MenuModelSetupItems {
#endif
#if defined(PCBTARANIS)
void onBindMenu(const char * result)
{
uint8_t moduleIdx = CURRENT_MODULE_EDITED(menuVerticalPosition);
@@ -225,7 +224,6 @@ void onBindMenu(const char * result)
moduleFlag[moduleIdx] = MODULE_BIND;
}
#endif
void menuModelSetup(event_t event)
@@ -1031,6 +1029,8 @@ void menuModelSetup(event_t event)
if (isModuleR9M(moduleIdx) || (isModuleXJT(moduleIdx) && g_model.moduleData[moduleIdx].rfProtocol== RF_PROTO_X16)) {
#if defined(PCBXLITE)
if (EVT_KEY_MASK(event) == KEY_ENTER) {
#elif defined(PCBSKY9X) || defined(AR9X)
if (event == EVT_KEY_FIRST(KEY_ENTER)) {
#else
if (event == EVT_KEY_BREAK(KEY_ENTER)) {
#endif
@@ -1052,7 +1052,7 @@ void menuModelSetup(event_t event)
if (BIND_TELEM_ALLOWED(moduleIdx))
POPUP_MENU_ADD_ITEM(STR_BINDING_9_16_TELEM_ON);
POPUP_MENU_ADD_ITEM(STR_BINDING_9_16_TELEM_OFF);
default_selection = g_model.moduleData[INTERNAL_MODULE].pxx.receiver_telem_off + (g_model.moduleData[INTERNAL_MODULE].pxx.receiver_channel_9_16 << 1);
default_selection = g_model.moduleData[moduleIdx].pxx.receiver_telem_off + (g_model.moduleData[moduleIdx].pxx.receiver_channel_9_16 << 1);
}
POPUP_MENU_SELECT_ITEM(default_selection);
POPUP_MENU_START(onBindMenu);