Open tig opened 3 years ago
In Keypad.h the following macros are defined
Keypad.h
#define OPEN LOW #define CLOSED HIGH
Because of this, any code that includes Keypad.h can't use OPEN or CLOSE for enum names. E.g.
OPEN
CLOSE
enum ActuatorStatus { CLOSED, OPEN, CLOSING, OPENING, TIMEOUT, ERROR = -1 };
In addition, these #defines are duplicated in Key.h.
Key.h
Super annoying.
One way to fix this is to delete the #defines from Keypad.h and replace the ones in Key.h with:
#defines
#define __OPEN LOW #define __CLOSED HIGH
or, even better:
enum ButtonState { OPEN = LOW, CLOSED = HIGH };
Or something similar.
In
Keypad.h
the following macros are definedBecause of this, any code that includes
Keypad.h
can't useOPEN
orCLOSE
for enum names. E.g.In addition, these #defines are duplicated in
Key.h
.Super annoying.
One way to fix this is to delete the
#defines
fromKeypad.h
and replace the ones inKey.h
with:or, even better:
Or something similar.