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 207:56ab30e84525, committed 2018-02-14
- Comitter:
- bwang
- Date:
- Wed Feb 14 04:16:31 2018 +0000
- Parent:
- 206:5c848ea69028
- Child:
- 208:3f3fe99c73ad
- Commit message:
- 02/13/2018 23:15 - cmd_flush() now works in all modes (otherwise the controller would only ever boot up in MODE_CFG)
Changed in this revision
| CHANGELOG.txt | Show annotated file Show diff for this revision Revisions of this file |
| CommandProcessor/cmd_set_get.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/CHANGELOG.txt Wed Feb 14 01:33:47 2018 +0000 +++ b/CHANGELOG.txt Wed Feb 14 04:16:31 2018 +0000 @@ -47,4 +47,5 @@ 02/11/2018 20:13 - scrambled the mode and error handling code in commutate() to be cleaner 02/11/2018 21:11 - further improvements to mode handling, output overrides and output disabling now live in their own functions 02/11/2018 21:21 - cmd_exit() checks that motor is not running -02/13/2017 20:33 - set serial RX interrupt to be lower priority than commutation interrupt \ No newline at end of file +02/13/2017 20:33 - set serial RX interrupt to be lower priority than commutation interrupt +02/13/2018 23:15 - cmd_flush() now works in all modes (otherwise the controller would only ever boot up in MODE_CFG); \ No newline at end of file
--- a/CommandProcessor/cmd_set_get.cpp Wed Feb 14 01:33:47 2018 +0000
+++ b/CommandProcessor/cmd_set_get.cpp Wed Feb 14 04:16:31 2018 +0000
@@ -161,11 +161,10 @@
}
void cmd_flush(Serial *pc, PreferenceWriter *pref) {
- if (BREMS_mode == MODE_RUN || BREMS_mode == MODE_ZERO || BREMS_mode == MODE_CHR) {
- pc->printf("%s\n", "Can only do that in CFG mode");
+ if (control.user_cmd != 0.0f || control.torque_percent != 0.0f) {
+ pc->printf("%s\n", "Turn off motor first");
return;
}
-
io.logger->disable();
if (!pref->ready()) pref->open();
_PREFS_VALID = 1;