From 899de332588e2b8fbfc7439702da9d4122025015 Mon Sep 17 00:00:00 2001 From: Yossi Date: Tue, 11 Apr 2017 19:31:06 +0300 Subject: [PATCH] cleanup :clapper: --- classes/gps.py | 4 ++-- mainPi.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)