mirror of
https://github.com/bitlair/bitlair_doorduino.git
synced 2025-05-13 12:20:07 +02:00
Update buttons every hour
This commit is contained in:
parent
43c0371177
commit
f0b039558c
1 changed files with 7 additions and 3 deletions
|
@ -220,7 +220,7 @@ def git_update(git_dir):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def git_thread():
|
def update_buttons():
|
||||||
global ser
|
global ser
|
||||||
global buttons
|
global buttons
|
||||||
print("GIT init")
|
print("GIT init")
|
||||||
|
@ -269,6 +269,11 @@ def git_thread():
|
||||||
# else:
|
# else:
|
||||||
# print("should be there " + button)
|
# print("should be there " + button)
|
||||||
|
|
||||||
|
def git_thread():
|
||||||
|
print("Updating buttons")
|
||||||
|
update_buttons()
|
||||||
|
print("Update buttons finished, sleeping for 3600 seconds")
|
||||||
|
time.sleep(3600)
|
||||||
|
|
||||||
|
|
||||||
def threadwrap(threadfunc):
|
def threadwrap(threadfunc):
|
||||||
|
@ -304,8 +309,7 @@ def main(argv):
|
||||||
threading.Thread(target = threadwrap(serial_monitor_thread)).start()
|
threading.Thread(target = threadwrap(serial_monitor_thread)).start()
|
||||||
time.sleep(5) # Give doorduino time to start before sending spacestate data
|
time.sleep(5) # Give doorduino time to start before sending spacestate data
|
||||||
threading.Thread(target = threadwrap(mqtt_thread)).start()
|
threading.Thread(target = threadwrap(mqtt_thread)).start()
|
||||||
# threading.Thread(target = threadwrap(git_thread)).start()
|
threading.Thread(target = threadwrap(git_thread)).start()
|
||||||
git_thread()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue