Dependents:   serial_connected_mcu_nucleo rotary_encoder_mbed serial_connected_mcu_nucleo omuni_speed_pid ... more

Fork of rotary_encoder by tarou yamada

このライブラリは以下のプログラムに基いています https://developer.mbed.org/users/gregeric/code/Nucleo_Hello_Encoder/

Revision:
5:817222abfd86
Parent:
4:d07f58c46a79
--- a/rotary_encoder_base/rotary_encoder_base.cpp	Sun Apr 03 06:30:19 2016 +0000
+++ b/rotary_encoder_base/rotary_encoder_base.cpp	Fri Apr 15 08:53:57 2016 +0000
@@ -7,14 +7,11 @@
 rotary_encoder_base::rotary_encoder_base(TIM_TypeDef* timer_type,
                                         uint32_t encoder_mode,
                                         size_t resolution) : rotary_encoder(resolution) {
-                                            
-                                            
     
     // todo:delete debug
     encoder_mode = TIM_ENCODERMODE_TI12;
     resolution = 400;
     
-    
     timer_handler_.Instance              = timer_type;
     timer_handler_.Init.Period           = max_counts_;
     timer_handler_.Init.CounterMode      = TIM_COUNTERMODE_UP;
@@ -41,6 +38,8 @@
     }
     //printf("%d end\n", cnt++);
     ///////////////////////////////////////////
+    
+    reset();
 }
 
 rotary_encoder_base::~rotary_encoder_base() {}