diff --git a/compLib/Motor.py b/compLib/Motor.py index 5eca21b..ba1bac3 100644 --- a/compLib/Motor.py +++ b/compLib/Motor.py @@ -34,16 +34,16 @@ class Motor(object): if port == 1: Spi.write(Register.MOTOR_1_PWM_H, 2, pwm) - Spi.write(Register.MOTOR_1_CTRL, 1, int(mode)) + Spi.write(Register.PWM_1_CTRL, 1, int(mode)) elif port == 2: Spi.write(Register.MOTOR_2_PWM_H, 2, pwm) - Spi.write(Register.MOTOR_2_CTRL, 1, int(mode)) + Spi.write(Register.PWM_2_CTRL, 1, int(mode)) elif port == 3: Spi.write(Register.MOTOR_3_PWM_H, 2, pwm) - Spi.write(Register.MOTOR_3_CTRL, 1, int(mode)) + Spi.write(Register.PWM_3_CTRL, 1, int(mode)) elif port == 4: Spi.write(Register.MOTOR_4_PWM_H, 2, pwm) - Spi.write(Register.MOTOR_4_CTRL, 1, int(mode)) + Spi.write(Register.PWM_4_CTRL, 1, int(mode)) @staticmethod def power(port: int, percent: float):