Fix addressing bug in _doSign bitfield
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
|
||||
#ifdef MY_SIGNING_FEATURE
|
||||
// Macros for manipulating signing requirement table
|
||||
#define DO_SIGN(node) (node == 0 ? (~doSign[0]&1) : (~doSign[node>>4]&(node%16)))
|
||||
#define SET_SIGN(node) (node == 0 ? (doSign[0]&=~1) : (doSign[node>>4]&=~(node%16)))
|
||||
#define CLEAR_SIGN(node) (node == 0 ? (doSign[0]|=1) : (doSign[node>>4]|=(node%16)))
|
||||
#define DO_SIGN(node) (~_doSign[node>>3]&(1<<(node%8)))
|
||||
#define SET_SIGN(node) (_doSign[node>>3]&=~(1<<(node%8)))
|
||||
#define CLEAR_SIGN(node) (_doSign[node>>3]|=(1<<(node%8)))
|
||||
#endif
|
||||
|
||||
// Inline function and macros
|
||||
|
||||
@@ -366,7 +366,7 @@ class MySensor
|
||||
|
||||
MyTransport& radio;
|
||||
#ifdef MY_SIGNING_FEATURE
|
||||
uint16_t doSign[16]; // Bitfield indicating which sensors require signed communication
|
||||
uint8_t doSign[32]; // Bitfield indicating which sensors require signed communication
|
||||
MyMessage msgSign; // Buffer for message to sign.
|
||||
MySigning& signer;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user