fix(radio): GV calculation and menu navigation in weight/offset/expo fields (#5564)

This commit is contained in:
philmoz
2024-10-10 11:43:14 +10:00
committed by GitHub
parent fcc75bd6b7
commit 7f727cb15c
6 changed files with 31 additions and 25 deletions
+2 -2
View File
@@ -437,8 +437,8 @@ char *getValueOrSrcVarString(char *dest, size_t len, gvar_t value, gvar_t vmin,
SourceNumVal v;
v.rawValue = value;
if (v.isSource) {
if (v.value >= MIXSRC_FIRST_GVAR && v.value <= MIXSRC_LAST_GVAR) {
getGVarString(dest, v.value - MIXSRC_FIRST_GVAR);
if (abs(v.value) >= MIXSRC_FIRST_GVAR && v.value <= MIXSRC_LAST_GVAR) {
getGVarString(dest, (v.value < 0) ? v.value + MIXSRC_FIRST_GVAR - 1 : v.value - MIXSRC_FIRST_GVAR);
} else {
const char* s = getSourceString(v.value);
strncpy(dest, s, len);