diff --git a/src/js/remotebuzzer_server.js b/src/js/remotebuzzer_server.js index be19f9b59..76ad80511 100644 --- a/src/js/remotebuzzer_server.js +++ b/src/js/remotebuzzer_server.js @@ -526,7 +526,12 @@ const watchRotaryClk = function watchRotaryClk(err, gpioValue) { } if (gpioValue) { - if (rotaryClkPin) { + if (rotaryDtPin) { + /* rotation */ + if (cnt > 0) { + /*delete click count for opposite direction */ + cnt = 0; + } /* rotation */ if (cnt < -3) { photoboothAction('rotary-cw'); @@ -554,7 +559,12 @@ const watchRotaryDt = function watchRotaryDt(err, gpioValue) { } if (gpioValue) { - if (rotaryDtPin) { + if (rotaryClkPin) { + /* rotation */ + if (cnt > 0) { + /*delete click count for opposite direction */ + cnt = 0; + } /* rotation */ if (cnt > 3) { photoboothAction('rotary-ccw');