From c70d81fdad7cf1392c990ca421527f872e84e82d Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Thu, 23 Apr 2015 08:41:50 -0400 Subject: [PATCH] Rename open_door() to unlock_door() This is a better name for what the function actually does. Signed-off-by: Anna Schumaker --- doors.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doors.py b/doors.py index a8f256f..153d787 100755 --- a/doors.py +++ b/doors.py @@ -54,9 +54,8 @@ OFF = 0 # Low voltage, ground ON = 1 # High voltage -#When door is open -def open_door(): - print("Door is open"); +def unlock_door(): + print("Door is unlocked"); GPIO.output(DOOR_STRIKE, ON) GPIO.output(RED_LED, OFF) GPIO.output(GREEN_LED, ON) @@ -99,7 +98,7 @@ def verify_key(key): GPIO.output(YELLOW_LED, ON); with request.urlopen(SERVER + ("/%s" % key)) as f: if f.read().decode() == "OK": - open_door() + unlock_door() time.sleep(5) close_door()