22#ifndef _EMBOT_TOOLS_H_
23#define _EMBOT_TOOLS_H_
35namespace embot {
namespace tools {
43 std::uint64_t
min {0};
44 std::uint64_t
max {0};
47 Config(std::uint64_t mi, std::uint64_t ma, std::uint32_t st) :
min(mi),
max(ma),
step(st) {}
67 bool add(std::uint64_t value);
91namespace embot {
namespace tools {
114 bool init(
const Config &config);
119 bool tick(std::uint64_t currtime_usec, std::uint64_t &deltatime_usec);
128 bool alert(std::uint64_t &deltatime_usec)
const;
138 static bool initted =
false;
141 init({5000, 5000+50, 1000000,
165namespace embot {
namespace tools {
188 bool init(
const Config &config);
193 bool tick(std::uint64_t deltatime_usec, std::uint64_t timestamp);
202 bool alert(std::uint64_t &deltatime_usec)
const;