fix: Throttle invert and gimbal dead zone (#3864)

This commit is contained in:
Raphael Coeffic
2023-07-30 21:37:21 +10:00
committed by GitHub
parent 032d581821
commit 1912697616
2 changed files with 26 additions and 2 deletions
+2 -2
View File
@@ -526,7 +526,7 @@ void evalInputs(uint8_t mode)
#if defined(STICK_DEAD_ZONE)
// dead zone invented by FlySky in my opinion it should goes into ADC
// float calculations are not efficient
if (g_eeGeneral.stickDeadZone && ch != inputMappingConvertMode(inputMappingGetThrottle())) {
if (g_eeGeneral.stickDeadZone && ch != inputMappingGetThrottle()) {
if (v > P_OFFSET) {
// y=ax+b
v = (int)((aParam * (float)v) - bParam);
@@ -539,7 +539,7 @@ void evalInputs(uint8_t mode)
}
#endif
if (g_model.throttleReversed && ch==inputMappingConvertMode(inputMappingGetThrottle())) {
if (g_model.throttleReversed && ch == inputMappingGetThrottle()) {
v = -v;
}