feat: ImmersionRC Ghost 12 bit support

IRC Ghost 12 bit support
This commit is contained in:
Peter Feerick
2022-01-27 09:58:09 +10:00
committed by GitHub
26 changed files with 511 additions and 343 deletions
+4
View File
@@ -1670,6 +1670,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
@@ -1438,6 +1438,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);
}