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.
Diff: photointerruptRoutines.h
- Revision:
- 50:c0c299bf54a6
- Parent:
- 49:731c95cd5852
- Child:
- 53:c703e0bf5e87
- Child:
- 56:389436192e63
--- a/photointerruptRoutines.h Fri Mar 24 16:57:35 2017 +0000
+++ b/photointerruptRoutines.h Fri Mar 24 17:30:41 2017 +0000
@@ -71,12 +71,13 @@
void i_edge(){
state = updateState();
-// motorOut((state-orState+lead+6)%6, velocityDuty);
+ motorOut((state-orState+lead+6)%6, velocityDuty);
}
inline void i3rise(){
state = updateState();
- w3 = angle/dt_I3.read(); //Calc angular velocity
+ motorOut((state-orState+lead+6)%6, velocityDuty);
+ w3 = 1/dt_I3.read(); //Calc angular velocity
dt_I3.reset();
if (I2.read() == 1) //Only count revolutions if the
