[Taranis] Issue #554 - Default is now :0 (all trims linked to the

default phase)
This commit is contained in:
Bertrand Songis
2014-01-27 11:28:14 +01:00
parent 046a4d253d
commit 16c1bd01c6
4 changed files with 30 additions and 67 deletions
+5 -5
View File
@@ -1667,9 +1667,9 @@ int getTrimValue(uint8_t phase, uint8_t idx)
else {
phase = p;
if (v.mode % 2 == 0)
result += v.value;
else
result = 0;
else
result += v.value;
}
}
}
@@ -1692,11 +1692,11 @@ void setTrimValue(uint8_t phase, uint8_t idx, int trim)
break;;
}
else if (v.mode % 2 == 0) {
v.value = limit<int>(-500, trim - getTrimValue(p, idx), 500);
break;
phase = p;
}
else {
phase = p;
v.value = limit<int>(-500, trim - getTrimValue(p, idx), 500);
break;
}
}
#elif defined(PCBSTD)