AP_WheelEncoder: allow more libraries to compile with no HAL_GCS_ENABLED

This commit is contained in:
Peter Barker 2023-09-02 15:21:36 +10:00 committed by Peter Barker
parent 23ec192854
commit 642d15582a
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ void AP_WheelEncoder_Quadrature::update_pin(uint8_t &pin,
// remove old gpio event callback if present
if (pin != (uint8_t)-1 &&
!hal.gpio->detach_interrupt(pin)) {
gcs().send_text(MAV_SEVERITY_WARNING, "WEnc: Failed to detach from pin %u", pin);
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "WEnc: Failed to detach from pin %u", pin);
// ignore this failure or the user may be stuck
}
@ -51,7 +51,7 @@ void AP_WheelEncoder_Quadrature::update_pin(uint8_t &pin,
bool,
uint32_t),
AP_HAL::GPIO::INTERRUPT_BOTH)) {
gcs().send_text(MAV_SEVERITY_WARNING, "WEnc: Failed to attach to pin %u", pin);
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "WEnc: Failed to attach to pin %u", pin);
}
pin_value = hal.gpio->read(pin);
}