SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
resettable.cpp
Go to the documentation of this file.
1#include "resettable.h"
2
3#include "sensesp.h"
4
5namespace sensesp {
6
7std::priority_queue<Resettable*, std::vector<Resettable*>, ResettableCompare>
8 Resettable::reset_list;
9
10Resettable::Resettable(int priority) : priority(priority) {
11 reset_list.push(this);
12}
13
15 debugI("Resetting all resettable objects");
16 while (!reset_list.empty()) {
17 auto& resettable = *reset_list.top();
18 resettable.reset();
19 reset_list.pop();
20 }
21}
22
23} // namespace sensesp
Construct a new transform based on a single function.
static void reset_all()
Resettable(int priority=0)
#define debugI(fmt,...)
Definition local_debug.h:48