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 2:d17ccaf938f6, committed 2015-12-23
- Comitter:
- b0ssiz
- Date:
- Wed Dec 23 13:20:18 2015 +0000
- Parent:
- 1:2b18f3240c31
- Child:
- 3:cad240b32dd6
- Child:
- 4:9fbe67ca2f1b
- Commit message:
- debug
Changed in this revision
| BEAR_Protocol.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BEAR_Protocol.cpp Wed Dec 23 13:08:23 2015 +0000
+++ b/BEAR_Protocol.cpp Wed Dec 23 13:20:18 2015 +0000
@@ -1,6 +1,6 @@
#include "mbed.h"
#include "BEAR_Protocol.h"
-
+#define RS485_DELAY 90
DigitalOut rs485_dirc(RS485_DIRC);
Bear_Communicate::Bear_Communicate(PinName tx,PinName rx,int baudrate)
@@ -68,9 +68,6 @@
*up_angle=(float)package.parameter[0];
*low_angle=(float)package.parameter[1];
-#ifdef SERIAL_DEBUG
- printf("up_angle : %f low_angle : %f \r\n", *up_angle,*low_angle);
-#endif
}
return status;
}
@@ -153,9 +150,6 @@
*Kp=package.parameter[0];
*Ki=package.parameter[1];
*Kd=package.parameter[2];
-#ifdef SERIAL_DEBUG
- //printf("Kp : 0x%02X Ki : 0x%02X Kd : 0x%02X \r\n", *Kp,*Ki,*Kd);
-#endif
}
return status;
}
@@ -203,9 +197,6 @@
if(status == ANDANTE_ERRBIT_NONE) {
*margin=package.parameter[0];
-#ifdef SERIAL_DEBUG
- //printf("Margin : 0x%02X \r\n", *margin);
-#endif
}
return status;
}
@@ -250,9 +241,6 @@
*height = package.parameter[0];
-#ifdef SERIAL_DEBUG
- //printf("Height : 0x%02X \r\n", *height);
-#endif
}
return status;
}
@@ -296,10 +284,6 @@
if(status == ANDANTE_ERRBIT_NONE) {
*WheelPos = package.parameter[0];
-
-#ifdef SERIAL_DEBUG
- //printf("Wheel_position : 0x%02X \r\n", *WheelPos);
-#endif
}
return status;
}
@@ -350,10 +334,6 @@
*y_min=package.parameter[4];
*z_min=package.parameter[5];
-
-#ifdef SERIAL_DEBUG
- printf("X_max : 0x%02X Y_max : 0x%02X Z_max : 0x%02X X_min : 0x%02X Y_min : 0x%02X Z_min : 0x%02X \r\n",x_max,y_max,z_max,x_min,y_min,z_min);
-#endif
}
return status;
}
@@ -399,10 +379,6 @@
*offset_y=package.parameter[0];
*offset_z=package.parameter[1];
-
-#ifdef SERIAL_DEBUG
- //printf("Offset_Y : 0x%02X Offset_Z : 0x%02X \r\n",*offset_y,*offset_z);
-#endif
}
return status;
}
@@ -447,10 +423,6 @@
if(status == ANDANTE_ERRBIT_NONE) {
*body_length=package.parameter[0];
-
-#ifdef SERIAL_DEBUG
- //printf("Body_Length : 0x%02X \r\n",*body_length);
-#endif
}
return status;
}
@@ -497,9 +469,6 @@
*max_angle=package.parameter[0];
*min_angle=package.parameter[1];
-#ifdef SERIAL_DEBUG
- //printf("Max_angle : 0x%02X Min_angle : 0x%02X \r\n",*max_angle,*min,angle);
-#endif
}
return status;
}
\ No newline at end of file
