GVARs display/adjust was truncated to 8 bits

This commit is contained in:
bernet.andre@gmail.com
2013-02-26 15:29:54 +00:00
parent 42b41e8f03
commit fbd1488b62
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1168,7 +1168,7 @@ int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase)
return limit(min, x, max); 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); phase = getGVarFlightPhase(phase, idx);
if (GVAR_VALUE(idx, phase) != value) { if (GVAR_VALUE(idx, phase) != value) {
+1 -1
View File
@@ -747,7 +747,7 @@ extern void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim);
#else #else
uint8_t getGVarFlightPhase(uint8_t phase, uint8_t idx); uint8_t getGVarFlightPhase(uint8_t phase, uint8_t idx);
int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase); 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 GET_GVAR(x, min, max, p) getGVarValue(x, min, max, p)
#define SET_GVAR(idx, val, p) setGVarValue(idx, val, p) #define SET_GVAR(idx, val, p) setGVarValue(idx, val, p)
#endif #endif