this code is completely restructured, but should do the same thing. did not want to directly commit, since it may not work at all. compiles though.
Dependencies: AVEncoder mbed-src-AV
Fork of Test by
pid.h@13:5f08195456a4, 2015-12-15 (annotated)
- Committer:
- jimmery
- Date:
- Tue Dec 15 08:56:36 2015 +0000
- Revision:
- 13:5f08195456a4
HUGE RESTRUCTURING OF THE CODE.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jimmery | 13:5f08195456a4 | 1 | #ifndef PID_H |
jimmery | 13:5f08195456a4 | 2 | #define PID_H |
jimmery | 13:5f08195456a4 | 3 | |
jimmery | 13:5f08195456a4 | 4 | const float set_x_speed = .75; |
jimmery | 13:5f08195456a4 | 5 | const float set_w_speed = 0; |
jimmery | 13:5f08195456a4 | 6 | |
jimmery | 13:5f08195456a4 | 7 | const float left_max_speed = 5; // max speed is 6 encoder pulses per ms. |
jimmery | 13:5f08195456a4 | 8 | const float right_max_speed = 5; |
jimmery | 13:5f08195456a4 | 9 | |
jimmery | 13:5f08195456a4 | 10 | const float line_propo = 0; |
jimmery | 13:5f08195456a4 | 11 | const float line_deriv = 0; |
jimmery | 13:5f08195456a4 | 12 | |
jimmery | 13:5f08195456a4 | 13 | const float gyro_propo = 6.5; |
jimmery | 13:5f08195456a4 | 14 | const float gyro_deriv = 10; |
jimmery | 13:5f08195456a4 | 15 | |
jimmery | 13:5f08195456a4 | 16 | const float enco_propo = 6; |
jimmery | 13:5f08195456a4 | 17 | const float enco_deriv = 1000;//.0002; |
jimmery | 13:5f08195456a4 | 18 | |
jimmery | 13:5f08195456a4 | 19 | const float gyro_falloff = 1.0005; |
jimmery | 13:5f08195456a4 | 20 | |
jimmery | 13:5f08195456a4 | 21 | #endif |