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.
Revision 211:3193c31cb1b7, committed 2018-04-28
- Comitter:
- bwang
- Date:
- Sat Apr 28 21:33:05 2018 +0000
- Parent:
- 210:f9b722cf8a2c
- Child:
- 212:1e370ffcb73d
- Commit message:
- added vd, vq parameters in cmd_query, changed order of strcmps in cmd_query() to speed up typical use
Changed in this revision
| CommandProcessor/cmd_set_get.cpp | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/CommandProcessor/cmd_set_get.cpp Sat Apr 28 21:21:22 2018 +0000
+++ b/CommandProcessor/cmd_set_get.cpp Sat Apr 28 21:33:05 2018 +0000
@@ -183,12 +183,14 @@
if (strcmp(buf, "pos") == 0) pc->printf("%f\n", foc.p);
else if (strcmp(buf, "w") == 0) pc->printf("%f\n", read.w);
else if (strcmp(buf, "cmd") == 0) pc->printf("%f\n", control.user_cmd);
+ else if (strcmp(buf, "d") == 0) pc->printf("%f\n", foc.d);
+ else if (strcmp(buf, "q") == 0) pc->printf("%f\n", foc.q);
+ else if (strcmp(buf, "vd") == 0) pc->printf("%f\n", foc.vd);
+ else if (strcmp(buf, "vq") == 0) pc->printf("%f\n", foc.vq);
+ else if (strcmp(buf, "tq") == 0) pc->printf("%f\n", control.torque_percent);
else if (strcmp(buf, "ia") == 0) pc->printf("%f\n", foc.ia);
else if (strcmp(buf, "ib") == 0) pc->printf("%f\n", foc.ib);
else if (strcmp(buf, "ic") == 0) pc->printf("%f\n", -foc.ia - foc.ib);
- else if (strcmp(buf, "d") == 0) pc->printf("%f\n", foc.d);
- else if (strcmp(buf, "q") == 0) pc->printf("%f\n", foc.q);
- else if (strcmp(buf, "tq") == 0) pc->printf("%f\n", control.torque_percent);
else if (strcmp(buf, "errors") == 0) cmd_query_err(pc);
else pc->printf("%s\n", "No such parameter");
}
\ No newline at end of file
--- a/main.cpp Sat Apr 28 21:21:22 2018 +0000
+++ b/main.cpp Sat Apr 28 21:33:05 2018 +0000
@@ -173,7 +173,7 @@
}
int main() {
- dq = new InterpolatingLutMapper();
+ dq = new DirectMapper(50.0f, 0.0f);//InterpolatingLutMapper();
th = new LimitingThrottleMapper(1500.0f);
BREMSInit(&io, &read, &foc, &control, false);