diff --git a/compLib/Motor.py b/compLib/Motor.py index 4968581..858041d 100644 --- a/compLib/Motor.py +++ b/compLib/Motor.py @@ -80,7 +80,12 @@ class Motor(object): :param percent: Percentage of max speed. between -100 and 100 :raises: IndexError """ - Motor.power_raw(port, Motor.__linearizePower(MOTOR_CURVE, percent)) + if percent > 0: + Motor.power_raw(port, Motor.__linearizePower(MOTOR_CURVE, percent)) + elif percent < 0: + Motor.power_raw(port, -Motor.__linearizePower(MOTOR_CURVE, -percent)) + else: + Motor.power_raw(port, 0) @staticmethod def all_off():