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: mbed QEI mbed-rtos
Diff: main.cpp
- Revision:
- 11:9747752435d1
- Parent:
- 10:0984c90b820b
- Child:
- 12:459af534d1ee
diff -r 0984c90b820b -r 9747752435d1 main.cpp
--- a/main.cpp Sat Nov 24 12:01:02 2012 +0000
+++ b/main.cpp Thu Nov 29 09:25:56 2012 +0000
@@ -1,5 +1,5 @@
// DC motor control program using H-bridge driver (ex. TA7291P) and 360 resolution rotary encoder with A, B phase.
-// ver. 121124a by Kosaka lab.
+// ver. 121129a by Kosaka lab.
#include "mbed.h"
#include "rtos.h"
#include "QEI.h"
@@ -253,7 +253,7 @@
_i = y;
_u = u;
#else
- _u = _iref; // without current control.
+ _u = _iref/IMAX*VMAX; // without current control.
#endif
u2Hbridge(_u); // input u to TA7291 driver