Eduardo de Mier / UIEncoder

Files at this revision

API Documentation at this revision

Comitter:
eduardoG26
Date:
Wed May 20 18:16:22 2015 +0000
Parent:
7:c7daa056b152
Commit message:
Changes for easy ebugging

Changed in this revision

Encoder.cpp Show annotated file Show diff for this revision Revisions of this file
EncoderConfig.h Show annotated file Show diff for this revision Revisions of this file
--- a/Encoder.cpp	Thu Mar 26 14:21:57 2015 +0000
+++ b/Encoder.cpp	Wed May 20 18:16:22 2015 +0000
@@ -107,6 +107,11 @@
 // State machine. Runs in IRQ. Static.
 static void EncoderTickIRQ()
 {
+#if DEBUG_ENC
+    DebugPin = 0;
+    DebugPin = 1;
+    DebugPin = 0;
+#endif
     // Encoder section
     // If-then-else structure is good because every pin is read max. once.
     if(PinB) {
--- a/EncoderConfig.h	Thu Mar 26 14:21:57 2015 +0000
+++ b/EncoderConfig.h	Wed May 20 18:16:22 2015 +0000
@@ -39,7 +39,7 @@
 // 250µs is a good value for cheap 24 ppr encoders (ALPS EC12E24...) with strong bouncing.
 // 1000µs is a good value for quality 24 ppr encoders (ALPS EC12E24...) with low bouncing.
 // 250µs is a good value for fast 24+ ppr encoders (Sparkfun, Some Bourns types, ...).
-#define ENCODER_SAMPLE_PERIOD_US (125)
+#define ENCODER_SAMPLE_PERIOD_US (250)
 
 // Pushbutton debouncing in milliseconds
 #define ENCODER_PB_DEBOUNCE_MS (125uL)