diff --git a/libraries/AP_HAL/Scheduler.h b/libraries/AP_HAL/Scheduler.h index 92ea71ed74..fa144b8f49 100644 --- a/libraries/AP_HAL/Scheduler.h +++ b/libraries/AP_HAL/Scheduler.h @@ -11,7 +11,7 @@ class AP_HAL::Scheduler { public: Scheduler() {} virtual void init(void* implspecific) = 0; - virtual void delay(uint32_t ms) = 0; + virtual void delay(uint16_t ms) = 0; virtual uint32_t millis() = 0; virtual uint32_t micros() = 0; virtual void delay_microseconds(uint16_t us) = 0; diff --git a/libraries/AP_HAL_AVR/Scheduler.cpp b/libraries/AP_HAL_AVR/Scheduler.cpp index 6381a50463..d811f6fdea 100644 --- a/libraries/AP_HAL_AVR/Scheduler.cpp +++ b/libraries/AP_HAL_AVR/Scheduler.cpp @@ -64,7 +64,7 @@ void AVRScheduler::delay_microseconds(uint16_t us) { _timer.delay_microseconds(us); } -void AVRScheduler::delay(uint32_t ms) +void AVRScheduler::delay(uint16_t ms) { uint32_t start = _timer.micros(); diff --git a/libraries/AP_HAL_AVR/Scheduler.h b/libraries/AP_HAL_AVR/Scheduler.h index f557ee83c7..f03742f813 100644 --- a/libraries/AP_HAL_AVR/Scheduler.h +++ b/libraries/AP_HAL_AVR/Scheduler.h @@ -25,7 +25,7 @@ public: /* init: implementation-specific void* argument expected to be an * AP_HAL_AVR::ISRRegistry*. */ void init(void *isrregistry); - void delay(uint32_t ms); + void delay(uint16_t ms); uint32_t millis(); uint32_t micros(); void delay_microseconds(uint16_t us); diff --git a/libraries/AP_HAL_AVR_SITL/Scheduler.cpp b/libraries/AP_HAL_AVR_SITL/Scheduler.cpp index f273ca8423..b3a8adaa99 100644 --- a/libraries/AP_HAL_AVR_SITL/Scheduler.cpp +++ b/libraries/AP_HAL_AVR_SITL/Scheduler.cpp @@ -60,7 +60,7 @@ void SITLScheduler::delay_microseconds(uint16_t usec) } } -void SITLScheduler::delay(uint32_t ms) +void SITLScheduler::delay(uint16_t ms) { uint32_t start = micros(); diff --git a/libraries/AP_HAL_AVR_SITL/Scheduler.h b/libraries/AP_HAL_AVR_SITL/Scheduler.h index 755e513ed9..5ae4d84792 100644 --- a/libraries/AP_HAL_AVR_SITL/Scheduler.h +++ b/libraries/AP_HAL_AVR_SITL/Scheduler.h @@ -16,7 +16,7 @@ public: /* AP_HAL::Scheduler methods */ void init(void *unused); - void delay(uint32_t ms); + void delay(uint16_t ms); uint32_t millis(); uint32_t micros(); void delay_microseconds(uint16_t us); diff --git a/libraries/AP_HAL_Empty/Scheduler.cpp b/libraries/AP_HAL_Empty/Scheduler.cpp index 0698a3b3de..de4de5843d 100644 --- a/libraries/AP_HAL_Empty/Scheduler.cpp +++ b/libraries/AP_HAL_Empty/Scheduler.cpp @@ -11,7 +11,7 @@ EmptyScheduler::EmptyScheduler() void EmptyScheduler::init(void* machtnichts) {} -void EmptyScheduler::delay(uint32_t ms) +void EmptyScheduler::delay(uint16_t ms) {} uint32_t EmptyScheduler::millis() { diff --git a/libraries/AP_HAL_Empty/Scheduler.h b/libraries/AP_HAL_Empty/Scheduler.h index e64a4d7c52..e624291d5b 100644 --- a/libraries/AP_HAL_Empty/Scheduler.h +++ b/libraries/AP_HAL_Empty/Scheduler.h @@ -8,7 +8,7 @@ class Empty::EmptyScheduler : public AP_HAL::Scheduler { public: EmptyScheduler(); void init(void* machtnichts); - void delay(uint32_t ms); + void delay(uint16_t ms); uint32_t millis(); uint32_t micros(); void delay_microseconds(uint16_t us);