the slap
Dependencies: Encoder HIDScope MODSERIAL TextLCD mbed-dsp mbed
Fork of The_SLAP_5_1 by
Revision 11:ea9fe75faf63, committed 2014-10-30
- Comitter:
- DominiqueC
- Date:
- Thu Oct 30 09:12:18 2014 +0000
- Parent:
- 10:d156dc2efe5c
- Commit message:
- pour Rianne
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d156dc2efe5c -r ea9fe75faf63 main.cpp --- a/main.cpp Wed Oct 29 20:40:14 2014 +0000 +++ b/main.cpp Thu Oct 30 09:12:18 2014 +0000 @@ -99,12 +99,12 @@ *in > min ? *in < max? : *in = max: *in = min; } -float pidkm(float setpointkm, float measurementkm) //PID Regelaar Kleine motor +float pidkm(float setpointkm, float measurementkm) //PID Regelaar kleine motor { float error_km; static float prev_error_km = 0; float out_p_km = 0; - static float out_i_km = 0; //waarom static float?????? + static float out_i_km = 0; //static, want dan wordt vorige waarde onthouden float out_d_km = 0; error_km = setpointkm-measurementkm; out_p_km = error_km*K_P_KM;