Fix warning in motor

This commit is contained in:
root 2021-10-02 11:50:10 +01:00
parent b4eae06eb6
commit 7228af5e40

View file

@ -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