|
|
@ -786,7 +786,10 @@ void RadioComponentController::_writeCalibration(void) |
|
|
|
paramFact->setRawValue((float)info->rcMax); |
|
|
|
paramFact->setRawValue((float)info->rcMax); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// APM has a backwards interpretation of "reversed" on the Pitch control. So be careful.
|
|
|
|
// For multi-rotor we can determine reverse setting during radio cal. For anything other than multi-rotor, servo installation
|
|
|
|
|
|
|
|
// may affect channel reversing so we can't automatically determine it.
|
|
|
|
|
|
|
|
if (_vehicle->multiRotor()) { |
|
|
|
|
|
|
|
// APM multi-rotor has a backwards interpretation of "reversed" on the Pitch control. So be careful.
|
|
|
|
float reversedParamValue; |
|
|
|
float reversedParamValue; |
|
|
|
if (_px4Vehicle() || info->function != rcCalFunctionPitch) { |
|
|
|
if (_px4Vehicle() || info->function != rcCalFunctionPitch) { |
|
|
|
reversedParamValue = info->reversed ? -1.0f : 1.0f; |
|
|
|
reversedParamValue = info->reversed ? -1.0f : 1.0f; |
|
|
@ -798,6 +801,7 @@ void RadioComponentController::_writeCalibration(void) |
|
|
|
paramFact->setRawValue(reversedParamValue); |
|
|
|
paramFact->setRawValue(reversedParamValue); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Write function mapping parameters
|
|
|
|
// Write function mapping parameters
|
|
|
|
for (size_t i=0; i<rcCalFunctionMax; i++) { |
|
|
|
for (size_t i=0; i<rcCalFunctionMax; i++) { |
|
|
|