0xPIT / encoder

Atmel AVR C++ RotaryEncoder Implementation
309 stars 162 forks source link

Compilation error with WITHOUT_BUTTON defined #4

Closed jsleroy closed 7 years ago

jsleroy commented 9 years ago

Hello,

In the last revision of the Arduino branch, there is a compilation error when WITHOUT_BUTTON is defined:

ClickEncoder.h: In member function 'void ClickEncoder::setAccelerationEnabled(const bool&)': 
ClickEncoder.h:86:5: error: 'accelerationEnabled' was not declared in this scope
     accelerationEnabled = a;

To fix this issue, swap the lines 112/113 in ClickEncoder.h.

Before:

bool accelerationEnabled;
#endif

After:

#endif
bool accelerationEnabled;
0xPIT commented 7 years ago

A fix by @andyhunti (Thanks!) has been merged on Jan, 15th.