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: HIDScope MODSERIAL QEI biquadFilter mbed
Fork of EMG_controlled_Inv_Kin_PID_Control by
Revision 3:9f0c4e8e21db, committed 2016-11-01
- Comitter:
- JeffreyBrimm
- Date:
- Tue Nov 01 09:53:08 2016 +0000
- Parent:
- 2:6523e21391e5
- Commit message:
- removed obsolete code in void update_encoder. Now only prints variables.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Nov 01 09:23:01 2016 +0000
+++ b/main.cpp Tue Nov 01 09:53:08 2016 +0000
@@ -104,11 +104,7 @@
void update_encoder()
{
- //q1 = wheel_M1.getPulses()/(1334.355/2);
- //q2 = wheel_M2.getPulses()/(1334.355/2);
- //pc.printf("q1 = %f \tq1_ref = %f \tq2 = %f \tq2_ref = %f \ttotalerr1 = %f \ttotalerr2 = %f\n\r",q1, q1_ref,q2,q2_ref,q1_total_error,q2_total_error);
pc.printf("vx = %f \tvy = %f \tq1_r = %f \tq2_r = %f \tq1 = %f \tq2 = %f \tpwm_M1 = %f \tpwm_M2 = %f\n\r",vx,vy,q1_ref,q2_ref,q1,q2,pwm_M1.read(),pwm_M2.read());
- //pc.printf("q1_err = %0.9f \tq2_err = %0.9f \tq1IntErr = %0.9f \tq2IntErr = %0.9f \tTotErr1 = %0.9f \tTotErr2 = %0.9f\n\r",q1_error,q2_error,q1IntError,q2IntError,q1_total_error,q2_total_error);
}
Ticker end_calibration_biceps_ticker;
@@ -400,6 +396,7 @@
q1_error_prev = 0;
q2_error_prev = 0;
}
+
q1_ref_prev = q1_ref;
q2_ref_prev = q2_ref;
@@ -499,7 +496,7 @@
go_flag_emgsample = false;
emgsample();
}
- // update encoder
+ // print variables v, q, qref, pwm
if (go_flag_update_encoder == true) {
go_flag_update_encoder = false;
update_encoder();
