IRC Ghost 12 bit support

This commit is contained in:
Štěpán Dalecký
2022-01-22 13:43:30 +01:00
committed by Raphael Coeffic
parent a177264759
commit 77386e6391
8 changed files with 94 additions and 52 deletions
+4
View File
@@ -1651,6 +1651,10 @@ void menuModelSetup(event_t event)
lcdDrawTextAlignedLeft(y, STR_WARN_BATTVOLTAGE);
putsVolts(lcdLastRightPos, y, getBatteryVoltage(), attr | PREC2 | LEFT);
}
else if (isModuleGhost(moduleIdx)) {
auto & module = g_model.moduleData[moduleIdx];
module.ghost.raw12bits = editCheckBox(module.ghost.raw12bits , MODEL_SETUP_2ND_COLUMN, y, INDENT "Raw 12 bits", attr, event);
}
break;
}
+4
View File
@@ -1431,6 +1431,10 @@ void menuModelSetup(event_t event)
lcdDrawTextAlignedLeft(y, STR_WARN_BATTVOLTAGE);
putsVolts(lcdLastRightPos, y, getBatteryVoltage(), attr | PREC2 | LEFT);
}
else if (isModuleGhost(moduleIdx)) {
auto & module = g_model.moduleData[moduleIdx];
module.ghost.raw12bits = editCheckBox(module.ghost.raw12bits , MODEL_SETUP_2ND_COLUMN, y, INDENT "Raw 12 bits", attr, event);
}
}
break;
+5
View File
@@ -1255,6 +1255,11 @@ class ModuleWindow : public FormGroup {
grid.nextLine();
}
if (isModuleGhost(moduleIdx)) {
new StaticText(this, grid.getLabelSlot(true), "Raw 12 bits", 0, COLOR_THEME_PRIMARY1);
new CheckBox(this, grid.getFieldSlot(), GET_SET_DEFAULT(g_model.moduleData[moduleIdx].ghost.raw12bits));
}
auto par = getParent();
par->moveWindowsTop(top() + 1, adjustHeight());
par->adjustInnerHeight();
+2
View File
@@ -361,6 +361,8 @@ inline uint8_t MODULE_OPTION_ROW(uint8_t moduleIdx) {
return TITLE_ROW;
if(isModuleAFHDS3(moduleIdx))
return HIDDEN_ROW;
if(isModuleGhost(moduleIdx))
return 0;
return MULTIMODULE_OPTIONS_ROW(moduleIdx);
}