Fish Feeder

Fork of AX12 by Chris Styles

Files at this revision

API Documentation at this revision

Comitter:
Ricky_Kwon
Date:
Tue Jun 30 03:24:38 2015 +0000
Parent:
3:ced71d1b2558
Commit message:
fix name of Serial function

Changed in this revision

AX12.cpp Show annotated file Show diff for this revision Revisions of this file
AX12.h Show annotated file Show diff for this revision Revisions of this file
diff -r ced71d1b2558 -r 0cb4b015fe23 AX12.cpp
--- a/AX12.cpp	Sun Apr 10 21:20:44 2011 +0000
+++ b/AX12.cpp	Tue Jun 30 03:24:38 2015 +0000
@@ -64,7 +64,7 @@
     }
 
     // 1023 / 300 * degrees
-    short goal = (1023 * degrees) / 300;
+    short goal = degrees;
 #ifdef AX12_DEBUG
     printf("SetGoal to 0x%x\n",goal);
 #endif
@@ -112,7 +112,7 @@
     char data[2];
 
     // 1023 / 300 * degrees
-    short limit = (1023 * degrees) / 300;
+    short limit = (1023 * degrees) / 1023;
 
 #ifdef AX12_DEBUG
     printf("SetCWLimit to 0x%x\n",limit);
diff -r ced71d1b2558 -r 0cb4b015fe23 AX12.h
--- a/AX12.h	Sun Apr 10 21:20:44 2011 +0000
+++ b/AX12.h	Tue Jun 30 03:24:38 2015 +0000
@@ -78,7 +78,7 @@
      * @param pin rx pin 
      * @param int ID, the Bus ID of the servo 1-255 
      */
-    AX12(PinName tx, PinName rx, int ID, int baud=1000000);
+    AX12(PinName tx, PinName rx, int ID, int baud=9600);
 
     /** Set the mode of the servo
      * @param mode
@@ -180,7 +180,7 @@
 
 private :
 
-    SerialHalfDuplex _ax12;
+    Serial _ax12;
     int _ID;
     int _baud;