4 #include <freertos/FreeRTOS.h>
5 #include <freertos/task.h>
12 template <
typename T,
typename... Args>
13 T
clamp(T value, T min, T max,
const char* tag =
"",
14 const char* msg = NULL, Args... args) {
20 }
else if (value > max) {
30 vTaskDelay(ms / portTICK_PERIOD_MS);
33 inline void delay(std::chrono::duration<uint32_t, std::milli>
delay) {
34 vTaskDelay(
delay.count() / portTICK_PERIOD_MS);
The base namespace. Contains some logging functions, too.
Definition: half_duplex_uart.cpp:53
FormatString logWarning(const std::string &tag, const std::string &message, Args... args)
Definition: RBControl_logger.hpp:31
void delayMs(int ms)
Definition: RBControl_util.hpp:29
T clamp(T value, T min, T max, const char *tag="", const char *msg=NULL, Args... args)
Definition: RBControl_util.hpp:13
void delay(std::chrono::duration< uint32_t, std::milli > delay)
Definition: RBControl_util.hpp:33