mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_Motors: fixed col max and min for dual heli
fixes H_SV_MAN behaviour
This commit is contained in:
parent
0f4c54aaa6
commit
8a49c84d57
@ -166,8 +166,9 @@ const AP_Param::GroupInfo AP_MotorsHeli::var_info[] = {
|
|||||||
// init
|
// init
|
||||||
void AP_MotorsHeli::init(motor_frame_class frame_class, motor_frame_type frame_type)
|
void AP_MotorsHeli::init(motor_frame_class frame_class, motor_frame_type frame_type)
|
||||||
{
|
{
|
||||||
// remember frame type
|
// remember frame class and type
|
||||||
_frame_type = frame_type;
|
_frame_type = frame_type;
|
||||||
|
_frame_class = frame_class;
|
||||||
|
|
||||||
// set update rate
|
// set update rate
|
||||||
set_update_rate(_speed_hz);
|
set_update_rate(_speed_hz);
|
||||||
@ -293,14 +294,24 @@ void AP_MotorsHeli::output_disarmed()
|
|||||||
_roll_in = 0.0f;
|
_roll_in = 0.0f;
|
||||||
_pitch_in = 0.0f;
|
_pitch_in = 0.0f;
|
||||||
_throttle_filter.reset(1.0f);
|
_throttle_filter.reset(1.0f);
|
||||||
_yaw_in = 1.0f;
|
if (_frame_class == MOTOR_FRAME_HELI_DUAL ||
|
||||||
|
_frame_class == MOTOR_FRAME_HELI_QUAD) {
|
||||||
|
_yaw_in = 0;
|
||||||
|
} else {
|
||||||
|
_yaw_in = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SERVO_CONTROL_MODE_MANUAL_MIN:
|
case SERVO_CONTROL_MODE_MANUAL_MIN:
|
||||||
// fixate min collective
|
// fixate min collective
|
||||||
_roll_in = 0.0f;
|
_roll_in = 0.0f;
|
||||||
_pitch_in = 0.0f;
|
_pitch_in = 0.0f;
|
||||||
_throttle_filter.reset(0.0f);
|
_throttle_filter.reset(0.0f);
|
||||||
_yaw_in = -1.0f;
|
if (_frame_class == MOTOR_FRAME_HELI_DUAL ||
|
||||||
|
_frame_class == MOTOR_FRAME_HELI_QUAD) {
|
||||||
|
_yaw_in = 0;
|
||||||
|
} else {
|
||||||
|
_yaw_in = -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SERVO_CONTROL_MODE_MANUAL_OSCILLATE:
|
case SERVO_CONTROL_MODE_MANUAL_OSCILLATE:
|
||||||
// use servo_test function from child classes
|
// use servo_test function from child classes
|
||||||
|
@ -224,4 +224,5 @@ protected:
|
|||||||
uint8_t _servo_test_cycle_counter = 0; // number of test cycles left to run after bootup
|
uint8_t _servo_test_cycle_counter = 0; // number of test cycles left to run after bootup
|
||||||
|
|
||||||
motor_frame_type _frame_type;
|
motor_frame_type _frame_type;
|
||||||
|
motor_frame_class _frame_class;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user