diff --git a/libraries/AP_ServoRelayEvents/AP_ServoRelayEvents.cpp b/libraries/AP_ServoRelayEvents/AP_ServoRelayEvents.cpp index 3915c4fa77..f43fb4c664 100644 --- a/libraries/AP_ServoRelayEvents/AP_ServoRelayEvents.cpp +++ b/libraries/AP_ServoRelayEvents/AP_ServoRelayEvents.cpp @@ -99,11 +99,11 @@ bool AP_ServoRelayEvents::do_repeat_relay(uint8_t relay_num, int16_t _repeat, ui */ void AP_ServoRelayEvents::update_events(void) { - if (repeat == 0 || (hal.scheduler->millis() - start_time_ms) < delay_ms) { + if (repeat == 0 || (AP_HAL::millis() - start_time_ms) < delay_ms) { return; } - start_time_ms = hal.scheduler->millis(); + start_time_ms = AP_HAL::millis(); switch (type) { case EVENT_TYPE_SERVO: