Fix warning in motor
This commit is contained in:
parent
b4eae06eb6
commit
7228af5e40
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ class Motor(object):
|
||||||
raise IndexError("Invalid Motor speed specified! Speed is between -100 and 100 percent!")
|
raise IndexError("Invalid Motor speed specified! Speed is between -100 and 100 percent!")
|
||||||
|
|
||||||
if log_metric:
|
if log_metric:
|
||||||
MetricsLogging.put("MotorRaw", percent, port)
|
MetricsLogging.put("MotorRaw", float(percent), port)
|
||||||
|
|
||||||
mode = MotorMode.COAST
|
mode = MotorMode.COAST
|
||||||
if percent < 0:
|
if percent < 0:
|
||||||
|
@ -89,7 +89,7 @@ class Motor(object):
|
||||||
elif percent < 0:
|
elif percent < 0:
|
||||||
raw_power = -Motor.__linearizePower(MOTOR_CURVE, -percent)
|
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)
|
Motor.power_raw(port, raw_power, False)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Reference in a new issue