Copter:Heli - governor set_rpm call independent of frame type

This commit is contained in:
ChristopherOlson authored and Randy Mackay committed 2019-06-03 07:53:01 +09:00
1 parent 2f7d198196
commit 9d03b44cf7
1 file changed
+6 -3
+6 -3
View File
@@ -146,7 +146,7 @@ void Copter::heli_update_rotor_speed_targets()
}
switch (rsc_control_mode) {
case ROTOR_CONTROL_MODE_SPEED_PASSTHROUGH:
// pass through pilot desired rotor speed if control input is higher than 10, creating a deadband at the bottom
// pass through pilot desired rotor speed from the RC
if (motors->get_interlock()) {
motors->set_desired_rotor_speed(rsc_control_deglitched);
} else {
@@ -156,9 +156,12 @@ void Copter::heli_update_rotor_speed_targets()
case ROTOR_CONTROL_MODE_SPEED_SETPOINT:
case ROTOR_CONTROL_MODE_OPEN_LOOP_POWER_OUTPUT:
case ROTOR_CONTROL_MODE_CLOSED_LOOP_POWER_OUTPUT:
// pass setpoint through as desired rotor speed, this is almost pointless as the Setpoint serves no function in this mode
// other than being used to create a crude estimate of rotor speed
// pass setpoint through as desired rotor speed. Needs work, this is pointless as it is
// not used by closed loop control. Being used as a catch-all for other modes regardless
// of whether or not they actually use it
// set rpm from rotor speed sensor
if (motors->get_interlock()) {
motors->set_rpm(rpm_sensor.get_rpm(0));
motors->set_desired_rotor_speed(motors->get_rsc_setpoint());
}else{
motors->set_desired_rotor_speed(0.0f);