Added advanced settings

This commit is contained in:
Magnus Persson
2022-04-25 21:41:00 +02:00
parent 902d123a68
commit cf143c0e73
18 changed files with 404 additions and 65 deletions

View File

@ -65,6 +65,21 @@ class PushTarget {
bool getLastSuccess() { return _lastSuccess; }
};
class PushIntervalTracker {
private:
int _counters[5] = { 0, 0, 0, 0, 0 };
void update(const int index, const int defaultValue);
public:
bool useHttp1() { return _counters[0] == 0 ? true : false; }
bool useHttp2() { return _counters[1] == 0 ? true : false; }
bool useHttp3() { return _counters[2] == 0 ? true : false; }
bool useInflux() { return _counters[3] == 0 ? true : false; }
bool useMqtt() { return _counters[4] == 0 ? true : false; }
void load();
void save();
};
#endif // SRC_PUSHTARGET_HPP_
// EOF