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.
Dependents: harurobo1006 harurobo_1026
Fork of EC by
Diff: EC.cpp
- Revision:
- 26:45a53e3c81b1
- Parent:
- 11:b96009f8b9fd
- Child:
- 32:297384f9d261
diff -r d73c40fd4b55 -r 45a53e3c81b1 EC.cpp
--- a/EC.cpp Fri Jul 07 09:05:42 2017 +0000
+++ b/EC.cpp Wed Aug 02 06:55:54 2017 +0000
@@ -77,6 +77,7 @@
if((signalA!=NC)&&(signalB!=NC)){
S=0;stateA=0;stateB=0;count=0;pre_count=0.0;
+ timer.start();
signalA_.rise(this,&Ec::upA);
signalA_.fall(this,&Ec::downA);
signalB_.rise(this,&Ec::upB);
@@ -84,7 +85,6 @@
}
if(signalZ!=NC){
first=false; rev=0; old_time=0; RPM=0; RPM_old=0;
- timer.start();
signalZ_.rise(this,&Ec::upZ);
signalZ_.fall(this,&Ec::downZ);
}
