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: mbed Servo SDFileSystem
Revision 24:8e38cc14150c, committed 2015-09-10
- Comitter:
- taoqiuyang
- Date:
- Thu Sep 10 00:09:31 2015 +0000
- Parent:
- 23:cc06a8226f72
- Child:
- 25:30966ed7f7e8
- Commit message:
- shell code added for navigation
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Sep 06 23:02:48 2015 +0000
+++ b/main.cpp Thu Sep 10 00:09:31 2015 +0000
@@ -185,6 +185,7 @@
}
+
void printStateIMU() {
//pc.printf("IMU_Y: %s, IMU_P: %s, IMU_R: %s\n",IMU_Y.c_str(), IMU_P.c_str(), IMU_R.c_str());
pc.printf("D_IMU_Y: %f, D_IMU_P: %f, D_IMU_R: %f\n",D_IMU_Y, D_IMU_P, D_IMU_R);
@@ -274,6 +275,17 @@
led4= !led4;
}
+
+
+void update_controller() {
+ /*Input: angle(deg) difference between heading from IMU and path point航向与目的点之间的夹角
+ distance(meter) to the next path point
+
+ Function: drive two servos to navigate the sailboat to the desired path point
+ */
+
+}
+
void set_servo_position(Servo targetServo, float angleDeg, float minDeg, float minNorVal, float maxDeg, float maxNorVal){
/*angleDeg: desired angle
minDeg: minimum angle in degrees