Robot's source code

Dependencies:   mbed

Revision:
74:88be86f83d17
Parent:
39:09c04fd42c94
Child:
109:53918ba98306
--- a/AX12/AX12.h	Sat Apr 11 10:36:56 2015 +0000
+++ b/AX12/AX12.h	Mon Apr 13 16:53:19 2015 +0000
@@ -85,7 +85,7 @@
      *    0 = Positional, default
      *    1 = Continuous rotation
      */
-    int SetMode(int mode);
+    int setMode(int mode);
 
     /** Set baud rate of all attached servos
      * @param mode
@@ -99,7 +99,7 @@
      *    0x67 =    19,200 bps
      *    0xCF =     9,600 bp
      */
-    int SetBaud(int baud);
+    int setBaud(int baud);
 
 
     /** Set goal angle in integer degrees, in positional mode
@@ -110,7 +110,14 @@
      *    flags[1] = register, activate with a broadcast trigger
      *
      */
-    int SetGoal(int degrees, int flags = 0);
+    int setGoal(int degrees, int flags = 0);
+    
+    
+    /** Set the torque limit of the servo
+     *
+     * @param maxTorque, 0-1024
+     */
+    int setMaxTorque(int maxTorque);
 
 
     /** Set the speed of the servo in continuous rotation mode
@@ -119,20 +126,20 @@
      *   -1.0 = full speed counter clock wise
      *    1.0 = full speed clock wise
      */
-    int SetCRSpeed(float speed);
+    int setCRSpeed(float speed);
 
 
     /** Set the clockwise limit of the servo
      *
      * @param degrees, 0-300
      */
-    int SetCWLimit(int degrees);
+    int setCWLimit(int degrees);
     
     /** Set the counter-clockwise limit of the servo
      *
      * @param degrees, 0-300
      */
-    int SetCCWLimit(int degrees);
+    int setCCWLimit(int degrees);
 
     // Change the ID
 
@@ -144,7 +151,7 @@
      * If a servo ID is not know, the broadcast address of 0 can be used for CurrentID.
      * In this situation, only one servo should be connected to the bus
      */
-    int SetID(int CurrentID, int NewID);
+    int setID(int CurrentID, int NewID);
 
 
     /** Poll to see if the servo is moving
@@ -161,19 +168,19 @@
      *
      * @returns float in the range 0.0-300.0
      */
-    float GetPosition();
+    float getPosition();
 
     /** Read the temperature of the servo
      *
      * @returns float temperature 
      */
-    float GetTemp(void);
+    float getTemp(void);
 
     /** Read the supply voltage of the servo
      *
      * @returns float voltage
      */
-    float GetVolts(void);
+    float getVolts(void);
 
     int read(int ID, int start, int length, char* data);
     int write(int ID, int start, int length, char* data, int flag=0);