SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
press_repeater.h
Go to the documentation of this file.
1#ifndef _press_repeater_H_
2#define _press_repeater_H_
3
4#include <elapsedMillis.h>
5
8#include "transform.h"
9
10namespace sensesp {
11
42 public:
44 int repeat_start_interval = 1500, int repeat_interval = 250);
45
46 virtual void start() override;
47
48 virtual void set_input(bool new_value, uint8_t input_channel = 0) override;
49 virtual void set_input(int new_value, uint8_t input_channel = 0) override;
50
51 virtual void get_configuration(JsonObject& doc) override;
52 virtual bool set_configuration(const JsonObject& config) override;
53 virtual String get_config_schema() override;
54
55 protected:
60 bool pushed_;
62};
63
64} // namespace sensesp
65#endif
Construct a new transform based on a single function.
A transform that takes boolean inputs and adds button behaviors familiar to many device end users.
virtual void get_configuration(JsonObject &doc) override
elapsedMillis last_value_sent_
virtual bool set_configuration(const JsonObject &config) override
virtual String get_config_schema() override
virtual void set_input(bool new_value, uint8_t input_channel=0) override
virtual void start() override
A common type of transform that consumes, transforms, then outputs values of the same data type.
Definition transform.h:95