Rover: remove unused throttle_failsafe_active method

This commit is contained in:
Randy Mackay 2017-08-22 15:55:06 +09:00
parent 415cb41c7f
commit 82e61d7198
2 changed files with 0 additions and 20 deletions

View File

@ -510,7 +510,6 @@ private:
void rudder_arm_disarm_check(); void rudder_arm_disarm_check();
void read_radio(); void read_radio();
void control_failsafe(uint16_t pwm); void control_failsafe(uint16_t pwm);
bool throttle_failsafe_active();
void trim_control_surfaces(); void trim_control_surfaces();
void trim_radio(); void trim_radio();

View File

@ -175,25 +175,6 @@ void Rover::control_failsafe(uint16_t pwm)
} }
} }
/*
return true if throttle level is below throttle failsafe threshold
or RC input is invalid
*/
bool Rover::throttle_failsafe_active(void)
{
if (!g.fs_throttle_enabled) {
return false;
}
if (millis() - failsafe.last_valid_rc_ms > 1000) {
// we haven't had a valid RC frame for 1 seconds
return true;
}
if (channel_throttle->get_reverse()) {
return channel_throttle->get_radio_in() >= g.fs_throttle_value;
}
return channel_throttle->get_radio_in() <= g.fs_throttle_value;
}
void Rover::trim_control_surfaces() void Rover::trim_control_surfaces()
{ {
read_radio(); read_radio();