Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void Encoder::init()

void Encoder::compute()
{
static Debouncer stDebouncer, pDebouncer;
static EncoderDebouncer stDebouncer, pDebouncer;

byte eA = !digitalRead( _pinA );
byte eB = !digitalRead( _pinB );
Expand Down Expand Up @@ -181,7 +181,7 @@ void computeEncoder()
EncoderInterrupt.computeAll();
}

bool Debouncer::isDebounced( byte value, byte debounceCount)
bool EncoderDebouncer::isDebounced( byte value, byte debounceCount)
{
if ( _keepValue != value )
{
Expand Down
4 changes: 2 additions & 2 deletions Encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ class EncoderInterruptClass
friend void computeEncoder();
};

class Debouncer
class EncoderDebouncer
{
private:
byte _keepValue;
byte _bounce;

public:
Debouncer():_keepValue(0), _bounce(0) {}
EncoderDebouncer():_keepValue(0), _bounce(0) {}
bool isDebounced( byte value, byte debounceCount);
};

Expand Down