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: backdrive backdrive_3
Diff: encoder.cpp
- Revision:
- 5:32ee588c735d
- Parent:
- 4:c99eb511ac08
- Child:
- 6:36805e006b09
--- a/encoder.cpp Sat Jan 05 07:16:33 2019 +0000
+++ b/encoder.cpp Tue Apr 30 04:11:47 2019 +0000
@@ -2,7 +2,7 @@
Encoder::Encoder(PinName a_phase , PinName b_phase ) : aPhase(a_phase) , bPhase(b_phase) {}
-void Encoder::calState(){
+void Encoder::calculate(){
//パルスの差分を更新
count[DELTA][ONE_BEFORE] = count[NORMAL][ONE_BEFORE] - count[NORMAL][TWO_BEFORE];
count[DELTA][CURRENT] = count[NORMAL][CURRENT] - count[NORMAL][ONE_BEFORE];