AR_Motors: add option to disable relay and servorelay libraries

This commit is contained in:
Peter Barker 2023-06-06 18:05:06 +10:00 committed by Peter Barker
parent 234bae6816
commit dbfa718020
1 changed files with 2 additions and 0 deletions

View File

@ -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) {