11namespace rotary_encoder {
81 void setup()
override;
BedjetMode mode
BedJet operating mode.
virtual void play(Ts... x)=0
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
RotaryEncoderAnticlockwiseTrigger(RotaryEncoderSensor *parent)
RotaryEncoderClockwiseTrigger(RotaryEncoderSensor *parent)
void set_max_value(int32_t max_value)
RotaryEncoderRestoreMode restore_mode_
void set_publish_initial_value(bool publish_initial_value)
void set_value(int value)
Manually set the value of the counter.
void set_pin_a(InternalGPIOPin *pin_a)
CallbackManager< void()> on_anticlockwise_callback_
void set_pin_b(InternalGPIOPin *pin_b)
void dump_config() override
CallbackManager< void(int32_t)> listeners_
CallbackManager< void()> on_clockwise_callback_
RotaryEncoderSensorStore store_
void set_min_value(int32_t min_value)
void add_on_anticlockwise_callback(std::function< void()> callback)
void set_reset_pin(GPIOPin *pin_i)
float get_setup_priority() const override
bool publish_initial_value_
Index pin, if this is not nullptr, the counter will reset to 0 once this pin is HIGH.
void register_listener(std::function< void(uint32_t)> listener)
void set_resolution(RotaryEncoderResolution mode)
Set the resolution of the rotary encoder.
void add_on_clockwise_callback(std::function< void()> callback)
void set_restore_mode(RotaryEncoderRestoreMode restore_mode)
Set the restore mode of the rotary encoder.
RotaryEncoderSetValueAction(RotaryEncoderSensor *encoder)
TEMPLATABLE_VALUE(int, value) void play(Ts... x) override
RotaryEncoderSensor * encoder_
Base-class for all sensors.
RotaryEncoderResolution
All possible resolutions for the rotary encoder.
@ ROTARY_ENCODER_2_PULSES_PER_CYCLE
increment counter by 1 with every A-B cycle, slow response but accurate
@ ROTARY_ENCODER_4_PULSES_PER_CYCLE
increment counter by 2 with every A-B cycle
@ ROTARY_ENCODER_1_PULSE_PER_CYCLE
RotaryEncoderRestoreMode
All possible restore modes for the rotary encoder.
@ ROTARY_ENCODER_RESTORE_DEFAULT_ZERO
@ ROTARY_ENCODER_ALWAYS_ZERO
try to restore counter, otherwise set to zero
Providing packet encoding functions for exchanging data with a remote host.
std::array< int8_t, 8 > rotation_events
RotaryEncoderResolution resolution
static void gpio_intr(RotaryEncoderSensorStore *arg)
bool rotation_events_overflow