From 2b3f07ee8c138aa23d901eab40d1de920dd81c71 Mon Sep 17 00:00:00 2001 From: Evangelos Oulis Date: Wed, 22 Jan 2020 15:14:45 +0200 Subject: [PATCH 1/2] Update v1.3 --- serverNode/serv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverNode/serv.py b/serverNode/serv.py index f358075..93230b7 100644 --- a/serverNode/serv.py +++ b/serverNode/serv.py @@ -88,7 +88,7 @@ class Parking(Resource): parks = None try: parks = getParkings() - except mysql.connector.errors.DatabaseError as e: + except (mysql.connector.errors.DatabaseError, mysql.connector.errors.InterfaceError) as e: mydb.reconnect(attempts=1, delay=0) return parks, 200 From ab4e2ed6b1d5c19e740afda80397344c8f8b478c Mon Sep 17 00:00:00 2001 From: cs161079 Date: Wed, 22 Jan 2020 15:47:34 +0200 Subject: [PATCH 2/2] Update v1.1 --- autonomousCar/autonomousCar.ino | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/autonomousCar/autonomousCar.ino b/autonomousCar/autonomousCar.ino index 5f7ca08..0663af0 100644 --- a/autonomousCar/autonomousCar.ino +++ b/autonomousCar/autonomousCar.ino @@ -124,8 +124,6 @@ void setup() { void serialFlush(){ while(Serial.available() > 0) { char t = Serial.read(); - if(t == '\0') - break; } } @@ -286,9 +284,8 @@ void park(int parkingNo) { absolute(255); while(getDistance()>10){ - absolute(255); forward(); - delay(300); + delay(100); } motor_stop(); } @@ -319,13 +316,13 @@ int Serial_Input() void loop() { // Calculating the distance - //distance= getDistance(); + distance= getDistance(); // Prints the distance on the Serial Monitor //Serial.print("Distance: "); - //Serial.println(distance); + // Serial.println(distance); // Read serial input: - park(Serial_Input()); + park(Serial_Input()); //delay(800); // if (distance <15) { // // Change direction to motors