summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-03-03 22:59:40 +0000
committerChristian Pointner <equinox@spreadspace.org>2014-03-03 22:59:40 +0000
commit5afd76717d1b656913f5d18dc95976643bee55b8 (patch)
treeecbb19cbe3254510f464a4b895e1b6e735753e85
parentjson stateless info update, topheater pwm, etc (diff)
increased delay time for ajar sensor (now less sensitive against short state changes)
git-svn-id: https://svn.spreadspace.org/avr/trunk@250 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r--tuer-rfid/ajar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tuer-rfid/ajar.c b/tuer-rfid/ajar.c
index 08a698a..e136f75 100644
--- a/tuer-rfid/ajar.c
+++ b/tuer-rfid/ajar.c
@@ -30,7 +30,7 @@
#define AJAR_DDR DDRC
#define AJAR_BIT 7
-#define AJAR_LP_MAX 255
+#define AJAR_LP_MAX 20000
void ajar_init(void)
{
@@ -41,7 +41,7 @@ void ajar_init(void)
ajar_t ajar_get(void)
{
static uint8_t last_state = (1<<AJAR_BIT);
- static uint8_t lp_cnt = 0;
+ static uint16_t lp_cnt = 0;
uint8_t state = AJAR_PIN & (1<<AJAR_BIT);
if(state != last_state)