vtol_att_control: merge methods to disable a selection of motors

- moved methods used to modify channel maximum pwm value to VtolType
class so that the can be shared by the differnt vtol types

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2018-04-12 09:19:47 +02:00
committed by Roman Bapst
parent 00f98c64db
commit 744f806214
11 changed files with 236 additions and 204 deletions
+3 -3
View File
@@ -214,7 +214,7 @@ void Tailsitter::update_transition_state()
} else if (_vtol_schedule.flight_mode == TRANSITION_BACK) {
if (!flag_idle_mc) {
flag_idle_mc = enable_mc_motors();
flag_idle_mc = set_idle_mc();
}
// create time dependant pitch angle set point stating at -pi/2 + 0.2 rad overlap over the switch value
@@ -260,7 +260,7 @@ void Tailsitter::update_mc_state()
// set idle speed for rotary wing mode
if (!flag_idle_mc) {
flag_idle_mc = enable_mc_motors();
flag_idle_mc = set_idle_mc();
}
}
@@ -269,7 +269,7 @@ void Tailsitter::update_fw_state()
VtolType::update_fw_state();
if (flag_idle_mc) {
flag_idle_mc = !disable_mc_motors();
flag_idle_mc = !set_idle_fw();
}
}