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: serial_connected_mcu_nucleo rotary_encoder_mbed serial_connected_mcu_nucleo omuni_speed_pid ... more
Fork of rotary_encoder by
Revision 5:817222abfd86, committed 2016-04-15
- Comitter:
- inst
- Date:
- Fri Apr 15 08:53:57 2016 +0000
- Parent:
- 4:d07f58c46a79
- Commit message:
Changed in this revision
| rotary_encoder_base/rotary_encoder_base.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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() {}
