From 9c54528920a03fe046c50bc582067d8f2514d1c8 Mon Sep 17 00:00:00 2001 From: damic014 Date: Sun, 13 Oct 2019 22:14:47 -0500 Subject: 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. --- System_Python/motor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'System_Python/motor.py') 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 -- cgit v1.2.3