diff --git a/libuavcan/include/uavcan/timer.hpp b/libuavcan/include/uavcan/timer.hpp index df9a78deeb..34f6d747b8 100644 --- a/libuavcan/include/uavcan/timer.hpp +++ b/libuavcan/include/uavcan/timer.hpp @@ -58,31 +58,31 @@ public: }; -template +template class TimerEventForwarder : public Timer { - Functor functor_; + Callback callback_; public: TimerEventForwarder(Scheduler& node) : Timer(node) - , functor_() + , callback_() { } - TimerEventForwarder(Scheduler& node, Functor functor) + TimerEventForwarder(Scheduler& node, Callback callback) : Timer(node) - , functor_(functor) + , callback_(callback) { } - const Functor& getFunctor() const { return functor_; } - void setFunctor(const Functor& functor) { functor_ = functor; } + const Callback& getCallback() const { return callback_; } + void setCallback(const Callback& callback) { callback_ = callback; } void onTimerEvent(const TimerEvent& event) { - if (try_implicit_cast(functor_, true)) - functor_(event); + if (try_implicit_cast(callback_, true)) + callback_(event); else - handleFatalError("Invalid timer functor"); + handleFatalError("Invalid timer callback"); } };