Disable rotary encoder rotation while pressed (will hopefully prevent some of the common unwanted edits when pressing, thanks 3djc for the idea)

This commit is contained in:
Andre Bernet
2016-12-10 18:44:09 +01:00
parent 98b695c284
commit 86b85aabc5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ uint8_t keyDown()
void checkRotaryEncoder()
{
uint32_t newpos = ROTARY_ENCODER_POSITION();
if (newpos != rotencPosition) {
if (newpos != rotencPosition && !keyState(KEY_ENTER)) {
if ((rotencPosition & 0x01) ^ ((newpos & 0x02) >> 1)) {
--rotencValue[0];
}
+1 -1
View File
@@ -89,7 +89,7 @@ uint8_t keyDown()
void checkRotaryEncoder()
{
uint32_t newpos = ROTARY_ENCODER_POSITION();
if (newpos != rotencPosition) {
if (newpos != rotencPosition && !keyState(KEY_ENTER)) {
if ((rotencPosition & 0x01) ^ ((newpos & 0x02) >> 1)) {
--rotencValue[0];
}