1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00
Also provides a lua function to retrieve module settings
This commit is contained in:
bsongis 2015-05-05 20:02:02 +02:00
parent f4c3610a8c
commit eb6ba88f5a
18 changed files with 109 additions and 57 deletions

View file

@ -700,16 +700,16 @@ void menuModelSetup(uint8_t event)
lcd_putsLeft(y, STR_RXNUM);
}
if (IS_MODULE_XJT(moduleIdx) || IS_MODULE_DSM2(moduleIdx)) {
if (xOffsetBind) lcd_outdezNAtt(MODEL_SETUP_2ND_COLUMN, y, g_model.header.modelId, (l_posHorz==0 ? attr : 0) | LEADING0|LEFT, 2);
if (xOffsetBind) lcd_outdezNAtt(MODEL_SETUP_2ND_COLUMN, y, g_model.header.modelId[moduleIdx], (l_posHorz==0 ? attr : 0) | LEADING0|LEFT, 2);
if (attr && l_posHorz==0) {
if (s_editMode>0) {
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.header.modelId, IS_MODULE_DSM2(moduleIdx) ? 20 : 63);
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.header.modelId[moduleIdx], IS_MODULE_DSM2(moduleIdx) ? 20 : 63);
if (checkIncDec_Ret) {
modelHeaders[g_eeGeneral.currModel].modelId = g_model.header.modelId;
modelHeaders[g_eeGeneral.currModel].modelId[moduleIdx] = g_model.header.modelId[moduleIdx];
}
}
if (s_editMode==0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
checkModelIdUnique(g_eeGeneral.currModel);
checkModelIdUnique(g_eeGeneral.currModel, moduleIdx);
}
}
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+xOffsetBind, y, STR_MODULE_BIND, l_posHorz==1 ? attr : 0);