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.
Dependencies: Communication_Robot
Fork of BEAR_Protocol by
Revision 6:07749b50d600, committed 2016-01-16
- Comitter:
- b0ssiz
- Date:
- Sat Jan 16 00:15:38 2016 +0000
- Parent:
- 5:6f30b4ea4020
- Child:
- 7:ce4234c56410
- Commit message:
- Fix bug setMotorPos parameter
Changed in this revision
| BEAR_Protocol.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BEAR_Protocol.cpp Fri Jan 15 17:02:08 2016 +0000
+++ b/BEAR_Protocol.cpp Sat Jan 16 00:15:38 2016 +0000
@@ -98,18 +98,18 @@
uint8_t status = com->receiveCommunicatePacket(&package);
if(status == ANDANTE_ERRBIT_NONE) {
- IntUpAngle[0]=package.parameter[1];
- IntUpAngle[1]=package.parameter[2];
- FloatUpAngle[0]=package.parameter[3];
- FloatUpAngle[1]=package.parameter[4];
+ IntUpAngle[0]=package.parameter[0];
+ IntUpAngle[1]=package.parameter[1];
+ FloatUpAngle[0]=package.parameter[2];
+ FloatUpAngle[1]=package.parameter[3];
int_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(IntUpAngle);
float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatUpAngle)/FLOAT_CONVERTER;
*up_angle=int_buffer+float_buffer;
- IntLowAngle[0]=package.parameter[5];
- IntLowAngle[1]=package.parameter[6];
- FloatLowAngle[0]=package.parameter[7];
- FloatLowAngle[1]=package.parameter[8];
+ IntLowAngle[0]=package.parameter[4];
+ IntLowAngle[1]=package.parameter[5];
+ FloatLowAngle[0]=package.parameter[6];
+ FloatLowAngle[1]=package.parameter[7];
int_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(IntLowAngle);
float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatLowAngle)/FLOAT_CONVERTER;
*low_angle=int_buffer+float_buffer;;
