DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/RotaryEncoder.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 * © 2023 Peter Cole
4 *
5 * This is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * It is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this code. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef ROTARYENCODER_H
20#define ROTARYENCODER_H
21
22#include "Defines.h"
23#include "Rotary.h"
25
29public:
32
34 void begin() override;
35
42
43private:
47 unsigned long _lastUpThrottleStep;
48 unsigned long _lastDownThrottleStep;
49};
50
51#endif // ROTARYENCODER_H
UserSelectionAction
User selection action data types available.
Definition UserSelectionInterface.h:23
Class to implement a physical rotary encoder for user selection activities Clockwise moves down/incre...
Definition RotaryEncoder.h:28
Rotary * _rotary
Definition RotaryEncoder.h:44
unsigned long _throttleStepFastestThreshold
Definition RotaryEncoder.h:46
UserSelectionAction getUserSelectionAction() override
Check for any user selection actions This should be called at least once per main loop iteration Note...
Definition RotaryEncoder.cpp:32
RotaryEncoder()
Constructor for the rotary encoder object.
Definition RotaryEncoder.cpp:21
void begin() override
Not implemented for this device type.
Definition RotaryEncoder.cpp:30
unsigned long _lastDownThrottleStep
Definition RotaryEncoder.h:48
unsigned long _throttleStepFasterThreshold
Definition RotaryEncoder.h:45
unsigned long _lastUpThrottleStep
Definition RotaryEncoder.h:47
Definition Rotary.h:25
Interface class to abstract user selection actions from physical implementations All physical user se...
Definition UserSelectionInterface.h:31