Keypad
Keypad copied to clipboard
Don't #define OPEN and CLOSED
In Keypad.h the following macros are defined
#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.
enum ActuatorStatus
{
CLOSED,
OPEN,
CLOSING,
OPENING,
TIMEOUT,
ERROR = -1
};

In addition, these #defines are duplicated in 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:
#define __OPEN LOW
#define __CLOSED HIGH
or, even better:
enum ButtonState {
OPEN = LOW,
CLOSED = HIGH
};
Or something similar.