mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AR_Motors: add option to disable relay and servorelay libraries
This commit is contained in:
parent
234bae6816
commit
dbfa718020
@ -846,6 +846,7 @@ void AP_MotorsUGV::output_throttle(SRV_Channel::Aux_servo_function_t function, f
|
||||
throttle = get_rate_controlled_throttle(function, throttle, dt);
|
||||
|
||||
// set relay if necessary
|
||||
#if AP_SERVORELAYEVENTS_ENABLED && AP_RELAY_ENABLED
|
||||
if (_pwm_type == PWM_TYPE_BRUSHED_WITH_RELAY) {
|
||||
auto &_relayEvents { *AP::servorelayevents() };
|
||||
|
||||
@ -880,6 +881,7 @@ void AP_MotorsUGV::output_throttle(SRV_Channel::Aux_servo_function_t function, f
|
||||
// invert the output to always have positive value calculated by calc_pwm
|
||||
throttle = reverse_multiplier * fabsf(throttle);
|
||||
}
|
||||
#endif // AP_SERVORELAYEVENTS_ENABLED && AP_RELAY_ENABLED
|
||||
|
||||
// output to servo channel
|
||||
switch (function) {
|
||||
|
Loading…
Reference in New Issue
Block a user