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
+7 -7
View File
@@ -889,13 +889,13 @@ char *getSourceCustomValueString(char (&dest)[L], source_t source, int32_t val,
BitmapBuffer::formatNumberAsString(dest, len, val, flags);
}
else if (source <= MIXSRC_LAST_CH) {
#if defined(PPM_UNIT_PERCENT_PREC1)
val = calcRESXto1000(val);
BitmapBuffer::formatNumberAsString(dest, len, val, flags | PREC1);
#else
val = calcRESXto100(val);
BitmapBuffer::formatNumberAsString(dest, len, val, flags);
#endif
if (g_eeGeneral.ppmunit == PPM_PERCENT_PREC1) {
val = calcRESXto1000(val);
BitmapBuffer::formatNumberAsString(dest, len, val, flags | PREC1);
} else {
val = calcRESXto100(val);
BitmapBuffer::formatNumberAsString(dest, len, val, flags);
}
}
else {
BitmapBuffer::formatNumberAsString(dest, len, val, flags);