|
|
@ -62,7 +62,7 @@ const AP_Param::GroupInfo AP_MotorsHeli::var_info[] = { |
|
|
|
// @Param: SV_MAN
|
|
|
|
// @Param: SV_MAN
|
|
|
|
// @DisplayName: Manual Servo Mode
|
|
|
|
// @DisplayName: Manual Servo Mode
|
|
|
|
// @Description: Manual servo override for swash set-up. Do not set this manually!
|
|
|
|
// @Description: Manual servo override for swash set-up. Do not set this manually!
|
|
|
|
// @Values: 0:Disabled,1:Passthrough,2:Center
|
|
|
|
// @Values: 0:Disabled,1:Passthrough,2:Max collective,3:Mid collective,4:Min collective
|
|
|
|
// @User: Standard
|
|
|
|
// @User: Standard
|
|
|
|
AP_GROUPINFO("SV_MAN", 6, AP_MotorsHeli, _servo_mode, SERVO_CONTROL_MODE_AUTOMATED), |
|
|
|
AP_GROUPINFO("SV_MAN", 6, AP_MotorsHeli, _servo_mode, SERVO_CONTROL_MODE_AUTOMATED), |
|
|
|
|
|
|
|
|
|
|
@ -247,19 +247,39 @@ void AP_MotorsHeli::output_armed_zero_throttle() |
|
|
|
// output_disarmed - sends commands to the motors
|
|
|
|
// output_disarmed - sends commands to the motors
|
|
|
|
void AP_MotorsHeli::output_disarmed() |
|
|
|
void AP_MotorsHeli::output_disarmed() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// if manual override (i.e. when setting up swash)
|
|
|
|
// manual override (i.e. when setting up swash)
|
|
|
|
if (_servo_mode == SERVO_CONTROL_MODE_MANUAL_PASSTHROUGH) { |
|
|
|
switch (_servo_mode) { |
|
|
|
// pass pilot commands straight through to swash
|
|
|
|
case SERVO_CONTROL_MODE_MANUAL_PASSTHROUGH: |
|
|
|
_roll_control_input = _roll_radio_passthrough; |
|
|
|
// pass pilot commands straight through to swash
|
|
|
|
_pitch_control_input = _pitch_radio_passthrough; |
|
|
|
_roll_control_input = _roll_radio_passthrough; |
|
|
|
_throttle_control_input = _throttle_radio_passthrough; |
|
|
|
_pitch_control_input = _pitch_radio_passthrough; |
|
|
|
_yaw_control_input = _yaw_radio_passthrough; |
|
|
|
_throttle_control_input = _throttle_radio_passthrough; |
|
|
|
} else if (_servo_mode == SERVO_CONTROL_MODE_MANUAL_CENTER) { |
|
|
|
_yaw_control_input = _yaw_radio_passthrough; |
|
|
|
// center and fixate the swash
|
|
|
|
break; |
|
|
|
_roll_control_input = 0; |
|
|
|
case SERVO_CONTROL_MODE_MANUAL_CENTER: |
|
|
|
_pitch_control_input = 0; |
|
|
|
// fixate mid collective
|
|
|
|
_throttle_control_input = 500; |
|
|
|
_roll_control_input = 0; |
|
|
|
_yaw_control_input = 0; |
|
|
|
_pitch_control_input = 0; |
|
|
|
|
|
|
|
_throttle_control_input = 500; |
|
|
|
|
|
|
|
_yaw_control_input = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case SERVO_CONTROL_MODE_MANUAL_MAX: |
|
|
|
|
|
|
|
// fixate max collective
|
|
|
|
|
|
|
|
_roll_control_input = 0; |
|
|
|
|
|
|
|
_pitch_control_input = 0; |
|
|
|
|
|
|
|
_throttle_control_input = 1000; |
|
|
|
|
|
|
|
_yaw_control_input = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case SERVO_CONTROL_MODE_MANUAL_MIN: |
|
|
|
|
|
|
|
// fixate min collective
|
|
|
|
|
|
|
|
_roll_control_input = 0; |
|
|
|
|
|
|
|
_pitch_control_input = 0; |
|
|
|
|
|
|
|
_throttle_control_input = 0; |
|
|
|
|
|
|
|
_yaw_control_input = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
// no manual override
|
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ensure swash servo endpoints haven't been moved
|
|
|
|
// ensure swash servo endpoints haven't been moved
|
|
|
|