File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ class ServerHelper:
1717 cID = 0 #client ID, used for LED color changing
1818 armed = True
1919 disarmed_lcd_showed = False
20+ breached = False
2021
2122
2223 def __init__ (self ,c ,addr ):
@@ -42,10 +43,11 @@ def RunAlarmTriggerTimer(self):
4243 elif (self .alarm_triggered == False and self .armed == True ):
4344 lcd_text ("All clients\n OK" )
4445 elif (self .alarm_triggered == False and self .armed == False ):
45- lcd_text ("Client " + self .cID + "\n Disarmed" )
46+ lcd_text ("Client " + str ( self .cID ) + "\n Disarmed" )
4647
4748 def PoundAlarm (self ):
48- alarm (self )
49+ GPIOServerSide .alarm (self )
50+ self .breached = True
4951 print ("Client" ,self .cID ,"breached! Please investigate!" )
5052 #alarm(self) #needs to be fired in seperate thread, to prevent blocking on main thread of client.
5153
Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ def AlarmDisarm(helper):
4646 helper .alarm_triggered = False
4747 helper .timer = 0 #time in sec.
4848 helper .armed = False
49+ helper .breached = False
4950
5051def AlarmArm (helper ):
5152 helper .alarm_triggered = False
5253 helper .timer = 0 #time in sec.
5354 helper .armed = True
55+ helper .breached = False
5456 #armed()
5557
5658
You can’t perform that action at this time.
0 commit comments