diff options
-rw-r--r-- | usb-i2c-sl018/limits.c | 4 | ||||
-rw-r--r-- | usb-i2c-sl018/limits.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/usb-i2c-sl018/limits.c b/usb-i2c-sl018/limits.c index 98144ed..471f894 100644 --- a/usb-i2c-sl018/limits.c +++ b/usb-i2c-sl018/limits.c @@ -38,9 +38,9 @@ void init_limits(void) limits_t limits_get(void) { - limits_t state = none; + limits_t state = moving; - uint8_t tmp = LIMITS_PORT; + uint8_t tmp = LIMITS_PORT & (1<<LIMITS_OPEN | 1<<LIMITS_CLOSE); return state; diff --git a/usb-i2c-sl018/limits.h b/usb-i2c-sl018/limits.h index 7624c83..0548bc1 100644 --- a/usb-i2c-sl018/limits.h +++ b/usb-i2c-sl018/limits.h @@ -24,7 +24,7 @@ #ifndef R3TUER_limits_h_INCLUDED #define R3TUER_limits_h_INCLUDED -typedef enum { none, open, close, both } limits_t; +typedef enum { moving, open, close, both } limits_t; void init_limits(void); limits_t limits_get(void); |