Issue #797 fixed. Global variables need again to be tested :(

This commit is contained in:
bsongis
2014-03-17 14:35:23 +01:00
parent 0c9b45e738
commit 0a70142067
2 changed files with 8 additions and 15 deletions
+2 -3
View File
@@ -1973,8 +1973,8 @@ uint8_t getGVarFlightPhase(uint8_t phase, uint8_t idx)
int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase)
{
if (GV_IS_GV_VALUE(x,min,max)) {
int8_t idx = GV_INDEX_CALCULATION(x,max);
if (GV_IS_GV_VALUE(x, min, max)) {
int8_t idx = GV_INDEX_CALCULATION(x, max);
int8_t mul = 1;
if (idx < 0) {
@@ -1984,7 +1984,6 @@ int16_t getGVarValue(int16_t x, int16_t min, int16_t max, int8_t phase)
x = GVAR_VALUE(idx, getGVarFlightPhase(phase, idx)) * mul;
}
return limit(min, x, max);
}