Skip to content

Commit 9f95041

Browse files
authored
Updates per @danh
1 parent 0eef868 commit 9f95041

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Feather_Freezer_Alarm/code.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ def connected():
112112
microcontroller.reset()
113113
io.publish(alarmfeed, 0)
114114
io.publish(resolvedfeed, 0)
115-
#io.publish(reconnectedfeed, 1)
116-
#time.sleep(.25)
117-
#io.publish(reconnectedfeed, 0)
118115

119116
while True:
120117
try:
@@ -192,7 +189,7 @@ def connected():
192189
io.publish(resolvedfeed, 0)
193190

194191
#check motion sensor if there is no alarm
195-
if(alarm1 is False and alarm2 is False and prealarm is False):
192+
if(not alarm1 and not alarm2 and not prealarm):
196193
#update pir sensor
197194
motion.update()
198195
#if motion stopped
@@ -219,7 +216,7 @@ def connected():
219216

220217
print("\n")
221218

222-
# Explicitly pump the message loop.
219+
# Explicitly pump the message loop to avoid MQTT timeouts.
223220
io.loop()
224221

225222
#check difference between time now and start times if more than N seconds start beeping

0 commit comments

Comments
 (0)