From 73ba032939986ef1c214b6294019ffa62abcb91f Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 15 Sep 2017 17:58:40 +0700 Subject: [PATCH] clean up --- libraries/RotaryEncoder/SwRotaryEncoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/RotaryEncoder/SwRotaryEncoder.cpp b/libraries/RotaryEncoder/SwRotaryEncoder.cpp index b10e9299..a42fcd2d 100644 --- a/libraries/RotaryEncoder/SwRotaryEncoder.cpp +++ b/libraries/RotaryEncoder/SwRotaryEncoder.cpp @@ -120,13 +120,13 @@ void SwRotaryEncoder::clearAbs(void) void SwRotaryEncoder::_irq_handler(void) { - uint8_t val = digitalRead(_pina); + uint8_t val = (uint8_t) digitalRead(_pina); if ( val != _a_last ) { int32_t step = 0; - if ( val != digitalRead(_pinb) ) + if ( val != ((uint8_t) digitalRead(_pinb)) ) { step = 1; }else