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: 4DGL-uLCD-SE PID QEI SDFileSystem mbed
Revision 4:05e4ebafbcaf, committed 2015-11-28
- Comitter:
- electromotivated
- Date:
- Sat Nov 28 03:15:54 2015 +0000
- Parent:
- 3:2151f4b584b5
- Commit message:
- Added comments;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Nov 27 15:29:13 2015 +0000
+++ b/main.cpp Sat Nov 28 03:15:54 2015 +0000
@@ -213,10 +213,10 @@
*/
// printf("\r\n*************USER INPUT**********************************\r\n");
parse_input(buff, &setpoint, &kp, &ki, &kd);
- setpoint = clip(setpoint, -999.99, 999.99);
- kp = clip(kp, 0.00, 999.99);
- ki = clip(ki, 0.00, 999.99);
- kd = clip(kd, 0.00, 999.99);
+ setpoint = clip(setpoint, -999.99, 999.99); // -999.99 is max size that can be updated to webpage, i.e. field is 7 digits (see html)
+ kp = clip(kp, 0.00, 999.99); // 999.99 is max size that can be updated to webpage, i.e. field is 6 digits (see html)
+ ki = clip(ki, 0.00, 999.99); // 999.99 is max size that can be updated to webpage, i.e. field is 6 digits (see html)
+ kd = clip(kd, 0.00, 999.99); // 999.99 is max size that can be updated to webpage, i.e. field is 6 digits (see html)
// printf("User Entered: \nSetpoint: %7.2f\nKp: %6.2f\nKi: %6.2f\nKd: %6.2f\n", setpoint, kp, ki, kd);
pid.set_parameters(kp, ki, kd, Ts_init); // Updata PID params
// printf("Updated to Kp: %1.2f Ki: %1.2f Kd: %1.2f Ts: %1.2f\r\n",