diff --git a/src/rotaryencoder/rotaryencoder.h b/src/rotaryencoder/rotaryencoder.h index e23ee8ec..2cf6bff0 100644 --- a/src/rotaryencoder/rotaryencoder.h +++ b/src/rotaryencoder/rotaryencoder.h @@ -88,14 +88,14 @@ namespace upm { */ int position(); + private: /** * Interrupt service routine (ISR) for signal A * * @param ctx User context for the ISR (*this pointer) */ static void signalAISR(void *ctx); - - private: + volatile int m_position; mraa_gpio_context m_gpioA; mraa_gpio_context m_gpioB;