feat: Convert PPM_UNIT build option to runtime radio setting (#3993)

This commit is contained in:
philmoz
2023-10-10 19:47:50 +10:00
committed by GitHub
parent b05044091a
commit 837677b3ef
58 changed files with 248 additions and 188 deletions
@@ -96,11 +96,11 @@ void menuRadioTrainer(event_t event)
int32_t chVal = trainerInput[i] - g_eeGeneral.trainer.calib[i];
chVal *= g_eeGeneral.trainer.mix[i].studWeight * 10;
chVal /= 512;
#if defined (PPM_UNIT_PERCENT_PREC1)
lcdDrawNumber(x, MENU_HEADER_HEIGHT+1+6*FH, chVal, PREC1|RIGHT);
#else
lcdDrawNumber(x, MENU_HEADER_HEIGHT+1+6*FH, chVal / 10, RIGHT);
#endif
if (g_eeGeneral.ppmunit == PPM_PERCENT_PREC1) {
lcdDrawNumber(x, MENU_HEADER_HEIGHT+1+6*FH, chVal, PREC1|RIGHT);
} else {
lcdDrawNumber(x, MENU_HEADER_HEIGHT+1+6*FH, chVal / 10, RIGHT);
}
}
if (attr) {