diff options
author | damic014 <damic014@umn.edu> | 2019-10-13 22:14:47 -0500 |
---|---|---|
committer | damic014 <damic014@umn.edu> | 2019-10-13 22:14:47 -0500 |
commit | 9c54528920a03fe046c50bc582067d8f2514d1c8 (patch) | |
tree | 001e66d5200982387158b3bda93b27d53b2743cb /System_Python/motor.py | |
parent | Encoder class (diff) | |
download | ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar.gz ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar.bz2 ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar.lz ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar.xz ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.tar.zst ee4511w-9c54528920a03fe046c50bc582067d8f2514d1c8.zip |
Add System library and system test file. Still need to finalize some implementation details (linear encoder, motor orientation, etc.). Need to compile and test on RPi still.
Convert naming in other libraries to follow Python naming scheme.
Diffstat (limited to 'System_Python/motor.py')
-rw-r--r-- | System_Python/motor.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/System_Python/motor.py b/System_Python/motor.py index 0f7d891..b22dbe2 100644 --- a/System_Python/motor.py +++ b/System_Python/motor.py @@ -26,7 +26,7 @@ class Motor: # Move the motor at a given speed, given as a floating point percentage (-100 <= x <= 100)
# If speed is less than 0, motor will run in reverse, otherwise it will run forward
- def Move(self, speed):
+ def move(self, speed):
if speed < -100.0 or speed > 100.0:
return
# Stop any previous movements
@@ -47,7 +47,7 @@ class Motor: # Stop the motor from spinning.
# To brake the motor, both direction outputs are set to HIGH
- def Brake(self):
+ def brake(self):
# Stop any current PWM signals
self.speed_pwm.stop()
# Set the direction outputs to brake
@@ -57,7 +57,7 @@ class Motor: # Set the motor to coast (i.e. Do not provide power to the motor, but still allow it to spin)
# To coast the motor, both direction outputs are set to LOW
- def Coast(self):
+ def coast(self):
# Stop any current PWM signals
self.speed_pwm.stop()
# Set the direction outputs to coast
|