diff --git a/config.json b/config.json index 61dbd7f..c7bdec6 100755 --- a/config.json +++ b/config.json @@ -2,7 +2,8 @@ "status_led_pin": 22, "battery_coeff": 2.25, "sumo_id": "xxxxxxxx", - "firmware_version": "0.4.0", + "firmware_timestamp": "2019.04.07 14:44:00", + "firmware_version": "0.4.1", "left_servo_tuning": 33, "right_servo_tuning": 33, "ultrasonic_distance": 40, diff --git a/hal.py b/hal.py index 7164228..0fb9fbc 100755 --- a/hal.py +++ b/hal.py @@ -128,7 +128,7 @@ class Sumorobot(object): sleep_us(10) self.trigger.value(0) # Wait for the pulse and calculate the distance - return (time_pulse_us(self.echo, 1, 30000) / 2) / 29.1 + return round((time_pulse_us(self.echo, 1, 30000) / 2) / 29.1, 2) # Function to get boolean if there is something in front of the SumoRobot def is_opponent(self):