diff --git a/radio/src/pulses/afhds3.cpp b/radio/src/pulses/afhds3.cpp index 911ba5340dc..cc2339806e0 100644 --- a/radio/src/pulses/afhds3.cpp +++ b/radio/src/pulses/afhds3.cpp @@ -811,7 +811,15 @@ void ProtoState::applyConfigFromModel() inline int16_t ProtoState::convert(int channelValue) { - return ::limit(AFHDS3_FAILSAFE_MIN, channelValue * 14.65, AFHDS3_FAILSAFE_MAX); + //pulseValue = limit(0, 988 + ((channelValue + 1024) / 2), 0xfff); + //988 - 750 = 238 + //238 * 20 = 4760 + //2250 - 2012 = 238 + //238 * 20 = 4760 + // 988 ---- 2012 + //-10240 ---- 10240 + //-1024 ---- 1024 + return ::limit(AFHDS3_FAILSAFE_MIN, channelValue * 10, AFHDS3_FAILSAFE_MAX); } uint8_t ProtoState::setFailSafe(int16_t* target, uint8_t rfchannelsCount )