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.
Diff: ReceiverIR.cpp
- Revision:
- 15:b56a97811380
- Parent:
- 14:2fafd2e7dea8
- Child:
- 16:3922b10d4606
diff -r 2fafd2e7dea8 -r b56a97811380 ReceiverIR.cpp
--- a/ReceiverIR.cpp Wed Jun 05 18:39:46 2019 +0000
+++ b/ReceiverIR.cpp Thu Jun 06 11:16:22 2019 +0000
@@ -18,9 +18,9 @@
evt.rise(this, &ReceiverIR::isr_rise);
evt.mode(PullUp);
ticker.attach_us(this, &ReceiverIR::isr_wdt, 10 * 1000);
- Speed_L = 0.95 ;
+ Speed_L = 0.45 ;
//Speed_R = _speed *1.005;
- Speed_R = 0.945 ;
+ Speed_R = 0.445 ;
init_sp_l = Speed_L;
init_sp_r = Speed_R;
}
@@ -133,7 +133,7 @@
// Speed_L = 0.5;
// }
// pwma = Speed_L;
- kp += 0.5;
+ max += 5;
}
void ReceiverIR::speeddown_l(void){
//Speed_L -= 0.0005;
@@ -141,7 +141,7 @@
// Speed_L = 0;
// }
// pwma = Speed_L;
- kp -= 0.5;
+ max -= 5;
}
void ReceiverIR::speedup_r(void){
// Speed_R += 0.0005;
@@ -151,7 +151,7 @@
// pwmb = Speed_R;
//max += 5;
- kd += 1;
+ ki += 500;
}
void ReceiverIR::speeddown_r(void){
// Speed_R -= 0.0005;
@@ -161,7 +161,7 @@
// pwmb = Speed_R;
//max -= 5;
- kd -= 1;
+ ki -= 500;
}
void ReceiverIR::speed_l(float sp_l){