Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of AX12 by
Revision 4:0cb4b015fe23, committed 2015-06-30
- 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;