diff --git a/src/ui/QGCPX4VehicleConfig.cc b/src/ui/QGCPX4VehicleConfig.cc index 768d96d03ac06dd711650f51d1a44a3ea41f217f..6842937378224860890169f884da1c339707eefd 100644 --- a/src/ui/QGCPX4VehicleConfig.cc +++ b/src/ui/QGCPX4VehicleConfig.cc @@ -1423,6 +1423,7 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval) } } + // Reverse raw value rcValueReversed[chan] = (rcRev[chan]) ? rcMax[chan] - (fval - rcMin[chan]) : fval; // Normalized value @@ -1441,7 +1442,7 @@ void QGCPX4VehicleConfig::remoteControlChannelRawChanged(int chan, float fval) normalized = (rcRev[chan]) ? -1.0f*normalized : normalized; // Find correct mapped channel - rcMappedValueRev[rcToFunctionMapping[chan]] = (rcRev[chan]) ? rcMax[chan] - (fval - rcMin[chan]) : fval; + rcMappedValueRev[rcToFunctionMapping[chan]] = rcValueReversed[chan]; rcMappedValue[rcToFunctionMapping[chan]] = fval; // Copy min / max