Skip to content

Commit

Permalink
updated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Lind committed Dec 4, 2022
1 parent e18cf31 commit 8849f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MotorTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from time import time

from Motorlib import Motor, MotorType, RunMode
from Motorlib.PWMDriver import GoBildaControl
from Motorlib import GoBildaControl

# Time to run the motor, in seconds
RUN_TIME = 10
Expand All @@ -15,7 +15,7 @@
encoder = (11, 12)

# Establish a motor object for a gobilda 312 RPM motor, with the specified pwm and encoder ports and position type control
my_motor = Motor(MotorType.GOBILDA_312, pwm, *encoder, GoBildaControl, RunMode.POSITION_CONTROL)
my_motor = Motor(MotorType.GOBILDA_312, pwm, *encoder, GoBildaControl, runMode=RunMode.POSITION_CONTROL)

# Set PID for the motor
my_motor.set_pid_coefficients(kP=0.001)
Expand Down
1 change: 1 addition & 0 deletions Motorlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from Motorlib.MotorType import MotorType
from Motorlib.PWMDriver import GoBildaControl, SparkMini, PWMDriver
from Motorlib.BaseEncoder import BaseEncoder
from Motorlib.Motor import Motor, RunMode
from Motorlib.PIDController import PIDController

0 comments on commit 8849f2f

Please sign in to comment.