Class Timers¶
Defined in File BlackBox_timers.hpp
Class Documentation¶
-
class
BlackBox
::
Timers
¶ Public Functions
-
uint16_t
schedule
(uint32_t period_ms, std::function<bool()> callback)¶ Schedule callback to fire after period (in millisecond).
Return true from the callback to schedule periodically, false to not (singleshot timer).
- Parametry
period_ms – is period in which will be the schedule callback fired
callback – is a function which will be schedule with the set period.
- Vrací
timer ID that you can use to cancel the timer.
-
bool
reset
(uint16_t id, uint32_t period_ms)¶
-
bool
cancel
(uint16_t id)¶
-
bool
stop
(uint16_t id)¶
-
bool
isOnTimerTask
() const¶
Public Static Functions
-
static void
deleteFreeRtOsTimerTask
()¶ If you don’t plan to use FreeRTOS SW timers, call this to free up 2KB of heap.
Public Static Attributes
-
static constexpr uint16_t
INVALID_ID
= 0¶
-
uint16_t