added volatile to variables susceptible to be changed in a ISR

(i.e. all member variables in this case...)
This commit is contained in:
cmdgears 2021-10-20 17:37:00 +02:00
parent b5d2645340
commit c22c02722c

View file

@ -38,12 +38,12 @@ public:
protected:
uint32_t _cnt;
float _sum;
float _min;
float _max;
bool _useStdDev;
float _ssqdif; // sum of squares difference
volatile uint32_t _cnt;
volatile float _sum;
volatile float _min;
volatile float _max;
volatile bool _useStdDev;
volatile float _ssqdif; // sum of squares difference
};