mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
AP_Motors: Tradheli- fixes servo_test function for Dual Heli frame
This commit is contained in:
parent
0e71aa6f89
commit
63bafa2c7f
@ -562,10 +562,10 @@ void AP_MotorsHeli_Dual::servo_test()
|
|||||||
_pitch_test -= (1.0f / (_loop_rate/2));
|
_pitch_test -= (1.0f / (_loop_rate/2));
|
||||||
_oscillate_angle += 8 * M_PI / _loop_rate;
|
_oscillate_angle += 8 * M_PI / _loop_rate;
|
||||||
} else if (_servo_test_cycle_time >= 5.0f && _servo_test_cycle_time < 6.0f){ // Raise swash to top
|
} else if (_servo_test_cycle_time >= 5.0f && _servo_test_cycle_time < 6.0f){ // Raise swash to top
|
||||||
_collective_test += (1.0f / _loop_rate);
|
_collective_test = 1.0f;
|
||||||
_oscillate_angle += 2 * M_PI / _loop_rate;
|
_oscillate_angle += 2 * M_PI / _loop_rate;
|
||||||
} else if (_servo_test_cycle_time >= 11.0f && _servo_test_cycle_time < 12.0f){ // Lower swash to bottom
|
} else if (_servo_test_cycle_time >= 11.0f && _servo_test_cycle_time < 12.0f){ // Lower swash to bottom
|
||||||
_collective_test -= (1.0f / _loop_rate);
|
_collective_test = 0.0f;
|
||||||
_oscillate_angle += 2 * M_PI / _loop_rate;
|
_oscillate_angle += 2 * M_PI / _loop_rate;
|
||||||
} else { // reset cycle
|
} else { // reset cycle
|
||||||
_servo_test_cycle_time = 0.0f;
|
_servo_test_cycle_time = 0.0f;
|
||||||
@ -581,7 +581,7 @@ void AP_MotorsHeli_Dual::servo_test()
|
|||||||
|
|
||||||
// over-ride servo commands to move servos through defined ranges
|
// over-ride servo commands to move servos through defined ranges
|
||||||
|
|
||||||
_throttle_in = _collective_test;
|
_throttle_filter.reset(_collective_test);
|
||||||
_roll_in = _roll_test;
|
_roll_in = _roll_test;
|
||||||
_pitch_in = _pitch_test;
|
_pitch_in = _pitch_test;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user