From 7bd0fedb20d021fbd9f409e461f58e73fb05db06 Mon Sep 17 00:00:00 2001 From: Stefan Hechenberger Date: Sun, 12 Aug 2012 18:14:13 +0200 Subject: [PATCH] bugfix: door sensor input was incorrectly reversed in the last couple of updates --- flash.py | 2 +- sense_control.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flash.py b/flash.py index 69c3fdb88..718fea7b8 100644 --- a/flash.py +++ b/flash.py @@ -85,7 +85,7 @@ def build(): os.system('%(size)s *.hex *.elf *.o' % {'size':AVRSIZEAPP}) - os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -D -Uflash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME}) + os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -Uflash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME}) # os.system('%(dude)s -c %(programmer)s -b %(bps)s -P %(port)s -p %(device)s -C %(dudeconf)s -B 10 -F -U flash:w:%(product)s.hex:i' % {'dude':AVRDUDEAPP, 'programmer':PROGRAMMER, 'bps':BITRATE, 'port':SERIAL_PORT, 'device':DEVICE, 'dudeconf':AVRDUDECONFIG, 'product':BUILDNAME}) diff --git a/sense_control.h b/sense_control.h index 7d27f7ed2..a86dfad15 100644 --- a/sense_control.h +++ b/sense_control.h @@ -24,7 +24,7 @@ void sense_init(); #define SENSE_POWER_OFF !((SENSE_PIN >> POWER_BIT) & 1) #define SENSE_CHILLER_OFF !((SENSE_PIN >> CHILLER_BIT) & 1) -#define SENSE_DOOR_OPEN ((SENSE_PIN >> DOOR_BIT) & 1) +#define SENSE_DOOR_OPEN !((SENSE_PIN >> DOOR_BIT) & 1) #define SENSE_X1_LIMIT !((LIMIT_PIN >> X1_LIMIT_BIT) & 1) #define SENSE_X2_LIMIT !((LIMIT_PIN >> X2_LIMIT_BIT) & 1) #define SENSE_Y1_LIMIT !((LIMIT_PIN >> Y1_LIMIT_BIT) & 1)