From 686e0f08d6e481686ace25be0c4af4b3ca9b9c5a Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 7 Feb 2017 19:45:50 -0800 Subject: [PATCH] AP_HAL: RCOutput: add optional timer_tick() method This is common enough across the HAL implementaions so add a method for it to avoid the need for casts inside the HALs. --- libraries/AP_HAL/RCOutput.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL/RCOutput.h b/libraries/AP_HAL/RCOutput.h index 2dfff6f270..529621e12e 100644 --- a/libraries/AP_HAL/RCOutput.h +++ b/libraries/AP_HAL/RCOutput.h @@ -112,7 +112,13 @@ public: enable SBUS out at the given rate */ virtual bool enable_sbus_out(uint16_t rate_gz) { return false; } - + + /* + * Optional method to control the update of the motors. Derived classes + * can implement it if their HAL layer requires. + */ + virtual void timer_tick(void) { } + /* output modes. Allows for support of oneshot */