SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
press_repeater.h
Go to the documentation of this file.
1#ifndef SENSESP_TRANSFORMS_PRESS_REPEATER_H_
2#define SENSESP_TRANSFORMS_PRESS_REPEATER_H_
3
4#include <elapsedMillis.h>
5
9#include "transform.h"
10
11namespace sensesp {
12
44 public:
45 PressRepeater(const String& config_path = "", int integer_false = 0,
46 int repeat_start_interval = 1500, int repeat_interval = 250);
47
48 virtual void set(const bool& new_value) override;
49
50 virtual bool to_json(JsonObject& root) override;
51 virtual bool from_json(const JsonObject& config) override;
52
53 protected:
57 elapsedMillis last_value_sent_;
58 bool pushed_;
60};
61
62const String ConfigSchema(const PressRepeater& obj);
63
64} // namespace sensesp
65#endif
A transform that takes boolean inputs and adds button behaviors familiar to many device end users....
virtual bool from_json(const JsonObject &config) override
PressRepeater(const String &config_path="", int integer_false=0, int repeat_start_interval=1500, int repeat_interval=250)
elapsedMillis last_value_sent_
virtual bool to_json(JsonObject &root) override
virtual void set(const bool &new_value) override
A common type of transform that consumes, transforms, then outputs values of the same data type.
Definition transform.h:94
const String ConfigSchema(const SmartSwitchController &obj)