This library is a library for controlling a motor by Sabertooth2x25(Packetized Serial Mode).

Dependents:   2doejemplo

Files at this revision

API Documentation at this revision

Comitter:
nucho
Date:
Sun Nov 13 02:20:48 2011 +0000
Parent:
2:6a3a047c1ce1
Commit message:

Changed in this revision

Sabertooth2x25.cpp Show annotated file Show diff for this revision Revisions of this file
Sabertooth2x25.h Show annotated file Show diff for this revision Revisions of this file
diff -r 6a3a047c1ce1 -r 482383d9a5de Sabertooth2x25.cpp
--- a/Sabertooth2x25.cpp	Sun Oct 16 23:33:36 2011 +0000
+++ b/Sabertooth2x25.cpp	Sun Nov 13 02:20:48 2011 +0000
@@ -17,7 +17,7 @@
     sendCommand(device_address, DRIVE_FORWARD_MOTOR_ONE , speed);
 }
 
-void Sabertooth2x25::backwards_motor_1(int device_address, int speed) {
+void Sabertooth2x25::backward_motor_1(int device_address, int speed) {
     sendCommand(device_address, DRIVE_BACKWARD_MOTOR_ONE, speed);
 }
 
@@ -33,7 +33,7 @@
     sendCommand(device_address, DRIVE_FORWARD_MOTOR_TWO, speed);
 }
 
-void Sabertooth2x25::backwards_motor_2(int device_address, int speed) {
+void Sabertooth2x25::backward_motor_2(int device_address, int speed) {
     sendCommand(device_address, DRIVE_BACKWARD_MOTOR_TWO, speed);
 }
 
@@ -49,7 +49,7 @@
     sendCommand(device_address, DRIVE_FORWARD_MIXED_MODE, speed);
 }
 
-void Sabertooth2x25::drive_backwards_mixed_mode(int device_address, int speed) {
+void Sabertooth2x25::drive_backward_mixed_mode(int device_address, int speed) {
     sendCommand(device_address, DRIVE_BACKWARD_MIXED_MODE, speed);
 }
 
diff -r 6a3a047c1ce1 -r 482383d9a5de Sabertooth2x25.h
--- a/Sabertooth2x25.h	Sun Oct 16 23:33:36 2011 +0000
+++ b/Sabertooth2x25.h	Sun Nov 13 02:20:48 2011 +0000
@@ -38,14 +38,14 @@
      */
     void forward_motor_1(int device_address, int speed);
 
-    /**This is used to command motor 1  to drive backwards.
-     * This is used to command motor 1  to drive backwards. Valid data is 0-127 for off to full reverse drive.
+    /**This is used to command motor 1  to drive backward.
+     * This is used to command motor 1  to drive backward. Valid data is 0-127 for off to full reverse drive.
      * If a command of 0 is given, Sabertooth will go into power save mode for motor 1 after approximately 4 seconds.
      *
      * @param device_address The set device address 
      * @param speed motor spped(Valid data is 0-127)
      */
-    void backwards_motor_1(int device_address, int speed);
+    void backward_motor_1(int device_address, int speed);
 
     /** This is used to set a custom minimum voltage for the battery feeding the Sabertooth.
      * This is used to set a custom minimum voltage for the battery feeding the Sabertooth.  If the battery voltage drops below this value, the output will shut down.
@@ -81,14 +81,14 @@
      */
     void forward_motor_2(int device_address, int speed);
 
-    /** This is used to command motor 2 to drive backwards.
-     * This is used to command motor 2 to drive backwards. Valid data is 0-127 for off to full reverse drive.
+    /** This is used to command motor 2 to drive backward.
+     * This is used to command motor 2 to drive backward. Valid data is 0-127 for off to full reverse drive.
      * If a command of 0 is given, the Sabertooth will go into power save mode after approximately 4 seconds.
      *
      * @param device_address The set device address
      * @param data Value = Desired Volts*5.12 (0-25v
      */
-    void backwards_motor_2(int device_address, int speed);
+    void backward_motor_2(int device_address, int speed);
 
     /** This command is used to drive motor 1.
      * This command is used to drive motor 1. Instead of the standard commands 0 and 1, this one command can be used to drive motor 1 forward or in reverse,
@@ -122,7 +122,7 @@
      * @param device_address The set device address
      * @param Valid data is 0-127 for off to full reverse drive.
      */
-    void drive_backwards_mixed_mode(int device_address, int speed);
+    void drive_backward_mixed_mode(int device_address, int speed);
 
     /** This is used to command the vehicle to turn right in mixed mode.
      * This is used to command the vehicle to turn right in mixed mode. Valid data is 0-127 for zero to maximum turning speed.