Fixed reset delay
This commit is contained in:
parent
91884bd433
commit
9e61023e67
3 changed files with 10 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
|
||||
GPIO.setwarnings(False)
|
||||
RESET_PIN = 23
|
||||
|
||||
|
||||
|
@ -13,4 +14,4 @@ class Reset:
|
|||
GPIO.output(RESET_PIN, GPIO.LOW)
|
||||
time.sleep(0.1)
|
||||
GPIO.output(RESET_PIN, GPIO.HIGH)
|
||||
time.sleep(0.5)
|
||||
time.sleep(1.5)
|
||||
|
|
|
@ -164,13 +164,14 @@ class Spi(object):
|
|||
print("Unable to read Version! Make sure the mainboard is connected!")
|
||||
sys.exit()
|
||||
|
||||
@staticmethod
|
||||
def start_health_check_loop():
|
||||
health_check_thread = Thread(target=Spi.health_check_loop)
|
||||
health_check_thread.setDaemon(True)
|
||||
health_check_thread.start()
|
||||
|
||||
@staticmethod
|
||||
def health_check_loop():
|
||||
while True:
|
||||
Spi.health_check()
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
health_check_thread = Thread(target=Spi.health_check_loop)
|
||||
health_check_thread.setDaemon(True)
|
||||
health_check_thread.start()
|
|
@ -19,3 +19,4 @@ except Exception as e:
|
|||
|
||||
compLib.Reset.Reset.reset_bot()
|
||||
compLib.Spi.Spi.health_check()
|
||||
compLib.Spi.Spi.start_health_check_loop()
|
Reference in a new issue