|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <conditional_timer.hpp>
Public Member Functions | |
| ConditionalTimer (uint32_t timeout) | |
| void | restart () |
| void | restart (uint32_t newTimeout) |
| void | stop () |
| bool | execute (bool condition) |
| bool | isStopped () |
A timeout that will only run while the given Check functor is true. Resets the timer if the condition is checked and returns false.
| Time | A timeout object that implements the interface described in timeout.hpp |
|
inlineexplicit |
| [in] | timeout | the timeout for this timer to use |
|
inline |
Returns true if the condition is true and the timer has expired If the condition parameter is false then the timer is reset and this function returns false
| [in] | condition | the condition for whether or not the timer should run. If false then the timer is reset. |
true if the timer has expired (timeout has been reached) since last restart()
|
inline |
|
inline |
Set the timer to expire this->timeout units of time away from the time at which this function was called.
|
inline |
Similar to restart() but redefine the period of the timer.
| [in] | period | the new period to use for this PeriodicTimer |
|
inline |
Stop the timer.