diff --git a/src/open9x.cpp b/src/open9x.cpp index 4cb7b7bc1..b35a1648b 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1168,7 +1168,7 @@ int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase) return limit(min, x, max); } -void setGVarValue(uint8_t idx, int8_t value, int8_t phase) +void setGVarValue(uint8_t idx, int16_t value, int8_t phase) { phase = getGVarFlightPhase(phase, idx); if (GVAR_VALUE(idx, phase) != value) { diff --git a/src/open9x.h b/src/open9x.h index c36d4887a..958fffd93 100644 --- a/src/open9x.h +++ b/src/open9x.h @@ -747,7 +747,7 @@ extern void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim); #else uint8_t getGVarFlightPhase(uint8_t phase, uint8_t idx); int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase); - void setGVarValue(uint8_t x, int8_t value, int8_t phase); + void setGVarValue(uint8_t x, int16_t value, int8_t phase); #define GET_GVAR(x, min, max, p) getGVarValue(x, min, max, p) #define SET_GVAR(idx, val, p) setGVarValue(idx, val, p) #endif