Skip to content
Snippets Groups Projects
Commit f820d2e4 authored by Max Horn's avatar Max Horn
Browse files

add volatile to nReceivedValue and some other member vars.

See issue #119
parent 83a22365
No related branches found
No related tags found
No related merge requests found
...@@ -86,10 +86,10 @@ enum { ...@@ -86,10 +86,10 @@ enum {
}; };
#if not defined( RCSwitchDisableReceiving ) #if not defined( RCSwitchDisableReceiving )
unsigned long RCSwitch::nReceivedValue = 0; volatile unsigned long RCSwitch::nReceivedValue = 0;
unsigned int RCSwitch::nReceivedBitlength = 0; volatile unsigned int RCSwitch::nReceivedBitlength = 0;
unsigned int RCSwitch::nReceivedDelay = 0; volatile unsigned int RCSwitch::nReceivedDelay = 0;
unsigned int RCSwitch::nReceivedProtocol = 0; volatile unsigned int RCSwitch::nReceivedProtocol = 0;
int RCSwitch::nReceiveTolerance = 60; int RCSwitch::nReceiveTolerance = 60;
const unsigned int RCSwitch::nSeparationLimit = 4300; const unsigned int RCSwitch::nSeparationLimit = 4300;
// separationLimit: minimum microseconds between received codes, closer codes are ignored. // separationLimit: minimum microseconds between received codes, closer codes are ignored.
......
...@@ -167,10 +167,10 @@ class RCSwitch { ...@@ -167,10 +167,10 @@ class RCSwitch {
#if not defined( RCSwitchDisableReceiving ) #if not defined( RCSwitchDisableReceiving )
static int nReceiveTolerance; static int nReceiveTolerance;
static unsigned long nReceivedValue; volatile static unsigned long nReceivedValue;
static unsigned int nReceivedBitlength; volatile static unsigned int nReceivedBitlength;
static unsigned int nReceivedDelay; volatile static unsigned int nReceivedDelay;
static unsigned int nReceivedProtocol; volatile static unsigned int nReceivedProtocol;
const static unsigned int nSeparationLimit; const static unsigned int nSeparationLimit;
/* /*
* timings[0] contains sync timing, followed by a number of bits * timings[0] contains sync timing, followed by a number of bits
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment