From 7228af5e40b03d1948f20a0f76ec255fe2f25ed2 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 2 Oct 2021 11:50:10 +0100 Subject: [PATCH] Fix warning in motor --- compLib/Motor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compLib/Motor.py b/compLib/Motor.py index b524d9d..4570026 100644 --- a/compLib/Motor.py +++ b/compLib/Motor.py @@ -61,7 +61,7 @@ class Motor(object): raise IndexError("Invalid Motor speed specified! Speed is between -100 and 100 percent!") if log_metric: - MetricsLogging.put("MotorRaw", percent, port) + MetricsLogging.put("MotorRaw", float(percent), port) mode = MotorMode.COAST if percent < 0: @@ -89,7 +89,7 @@ class Motor(object): elif percent < 0: raw_power = -Motor.__linearizePower(MOTOR_CURVE, -percent) - MetricsLogging.put("Motor", percent, port) + MetricsLogging.put("Motor", float(percent), port) Motor.power_raw(port, raw_power, False) @staticmethod