diff --git a/classes/gps.py b/classes/gps.py index 5c601e7..47c45b6 100644 --- a/classes/gps.py +++ b/classes/gps.py @@ -34,8 +34,8 @@ def getPos(self): @classmethod def getSpeed(self): - ser = serial.Serial(port, baudrate = 9600, timeout = 1) - speed = 0; + ser = serial.Serial(port, baudrate = 9600, timeout = 0.5) + speed = -1; while True: data = ser.readline() diff --git a/mainPi.py b/mainPi.py index 105ee7f..66124be 100644 --- a/mainPi.py +++ b/mainPi.py @@ -42,7 +42,7 @@ def run_program(): # get speed from GPS speed = GPS.getSpeed() - if (config['calibration']['adas'] and speed > config['activation_speed']) or config['in_calibration']: + if (config['adas'] and speed > config['activation_speed']) or config['in_calibration']: # Start ADAS process frameAnalyzer.analyze_frame(frame, True, True, True)