diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-02-07 02:44:21 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-02-07 02:44:21 +0000 |
commit | b35386c799b1595b672d48451aa8b060e1c3b160 (patch) | |
tree | 439ea9c2ce77a4f3c7480ffbf7f7215c49ee1edc /usb-i2c-sl018/limits.c | |
parent | fixed manual pin polarity (diff) |
fixed low pass filtering
git-svn-id: https://svn.spreadspace.org/avr/trunk@169 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'usb-i2c-sl018/limits.c')
-rw-r--r-- | usb-i2c-sl018/limits.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-i2c-sl018/limits.c b/usb-i2c-sl018/limits.c index 5807151..db0e4ee 100644 --- a/usb-i2c-sl018/limits.c +++ b/usb-i2c-sl018/limits.c @@ -40,7 +40,7 @@ void init_limits(void) uint8_t limits_get_close(uint8_t pin) { - static uint8_t last_state = 0; + static uint8_t last_state = 1<<LIMITS_CLOSE; static uint8_t lp_cnt = 0; uint8_t state = pin & (1<<LIMITS_CLOSE); @@ -59,7 +59,7 @@ uint8_t limits_get_close(uint8_t pin) uint8_t limits_get_open(uint8_t pin) { - static uint8_t last_state = 0; + static uint8_t last_state = 1<<LIMITS_OPEN; static uint8_t lp_cnt = 0; uint8_t state = pin & (1<<LIMITS_OPEN); |