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: FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q
Fork of KL25Z_Camera_Test by
Revision 47:6a58dcef714f, committed 2017-04-27
- Comitter:
- lh14g13
- Date:
- Thu Apr 27 07:40:02 2017 +0000
- Parent:
- 46:6806ea59ffed
- Child:
- 48:daa2a1900ada
- Commit message:
- tweaked values of parameters;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Mar 27 17:53:17 2017 +0000
+++ b/main.cpp Thu Apr 27 07:40:02 2017 +0000
@@ -80,7 +80,7 @@
accc = checkAcc();
}
- if(accc < 0.2f) {
+ if(accc < 0.25f) {
handleStartStop();
} else {
//sendString("up %f", accc);
@@ -161,22 +161,22 @@
case 0:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
speed = 40;
- ed_tune = 1.0f;
+ ed_tune = man_tuner;
break;
case 1:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
- speed = 80;
- ed_tune = 1.0f;
+ speed = 65;
+ ed_tune = man_tuner;
break;
case 2:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
- speed = 100;
- ed_tune = 1.0f;
+ speed = 80;
+ ed_tune = man_tuner;
break;
case 3:
initPID(&servo_pid, 2.2f, 0.6f, 0.f);
- speed = 120;
- ed_tune = 1.0f;
+ speed = 110;
+ ed_tune = man_tuner;
break;
}
@@ -438,9 +438,9 @@
if(left_motor_pid.output > 1.0f) {
left_motor_pid.output = 1.0f;
}
- if(left_motor_pid.output > 0.75f) {
+ /*if(left_motor_pid.output > 0.75f) {
left_motor_pid.output = 0.75f;
- }
+ }*/
if(left_motor_pid.output < 0.0f) {
left_motor_pid.output = 0.0f;
}
@@ -449,9 +449,9 @@
right_motor_pid.output = 1.0f;
}
- if(right_motor_pid.output > 0.75f) {
+ /*if(right_motor_pid.output > 0.75f) {
right_motor_pid.output = 0.75f;
- }
+ }*/
if(right_motor_pid.output < 0.0f) {
right_motor_pid.output = 0.0f;
}
--- a/main.h Mon Mar 27 17:53:17 2017 +0000 +++ b/main.h Thu Apr 27 07:40:02 2017 +0000 @@ -131,7 +131,7 @@ //Accelerometer: float checkAcc(); - + float man_tuner = 1.0f ; #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z) PinName const SDA = PTE25; PinName const SCL = PTE24;
