AP_Motors: Block Spoolup: stop advance from ground idle

This commit is contained in:
Iampete1 2022-09-06 15:00:39 +01:00 committed by Peter Hall
parent ee31f2322e
commit f3dc805978
2 changed files with 4 additions and 6 deletions

View File

@ -612,8 +612,11 @@ void AP_MotorsMulticopter::output_logic()
// constrain ramp value and update mode
if (_spin_up_ratio >= 1.0f) {
_spin_up_ratio = 1.0f;
if (!get_spoolup_block()) {
// Only advance from ground idle if spoolup checks have passed
_spool_state = SpoolState::SPOOLING_UP;
}
}
break;
case DesiredSpoolState::GROUND_IDLE:

View File

@ -77,11 +77,6 @@ void AP_Motors::armed(bool arm)
void AP_Motors::set_desired_spool_state(DesiredSpoolState spool)
{
// check if spoolup has been blocked
if (_spoolup_block && (spool == DesiredSpoolState::THROTTLE_UNLIMITED)) {
return;
}
if (_armed || (spool == DesiredSpoolState::SHUT_DOWN)) {
_spool_desired = spool;
}