Library for the Sparkfun 5- Way Tact Switch (Part# BOB- 1187) Board is modified for use with a single analog input.
Fork of FivePosSwitch by
Revision 5:413df8008ce3, committed 2015-10-08
- Comitter:
- electromotivated
- Date:
- Thu Oct 08 23:54:31 2015 +0000
- Parent:
- 4:10c4b7cb4e8c
- Commit message:
- enum DOWN (=4) definition had compile conflicts with cmath.h, which apparently has a #define something 4. This would cause problems when using the DOWN tag. Just made values negative to hopefully avoid the evil #define errors;
Changed in this revision
| FivePosSwitch.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/FivePosSwitch.h Sun Oct 04 20:07:52 2015 +0000
+++ b/FivePosSwitch.h Thu Oct 08 23:54:31 2015 +0000
@@ -48,7 +48,7 @@
#define FIVE_POS_SWITCH
#include "mbed.h"
-enum ACTIVE_POSITION{NONE, UP, CENTER, LEFT, DOWN, RIGHT};
+enum ACTIVE_POSITION{NONE = 0, UP = -1, CENTER = -2, LEFT = -3, DOWN = -4, RIGHT = -5};
class FivePosSwitch{
public:
