Baguette Boys / Mbed 2 deprecated Billon-Mazgaj__Drawing_Robot

Dependencies:   mbed Servo Motordriver SDFileSystem

Revision:
4:067fefe01204
Parent:
2:baa00f631c7e
--- a/HallEffectEncoder.h	Sat Apr 18 00:57:09 2020 +0000
+++ b/HallEffectEncoder.h	Thu Apr 30 00:02:07 2020 +0000
@@ -6,27 +6,28 @@
 class HallEffectEncoder {
     
 public:
-
+    //CTOR
     HallEffectEncoder(PinName pin, float update_speed);
     
-    int   getCount();    // get the count of the encoder
-    void  reset();       // reset the count to 0
-    float getDist();     // get the distance 
+    //PUBLIC API
+    float getDist();     // get the distance             //WIP has Wheel Diameter encoded
     float getSpeed();    // get the speed of the wheel
-    void  updateSpeed(); // updates the speed of the wheel
+    int   getCount();    // get the count of the encoder
+    
+    void  reset();       // reset the count to 0
 
-private:
     
-    InterruptIn _encoder;       //Input Pin
+private:
+    /* Encoder Input */
+    InterruptIn _encoder;       // Input Pin
+    void callback_transition(); // Pole transitions callback
     
-    /* Ticker Speed Update*/
-    float ticker_update_speed;  //Update Period
+    /* Speed Update Ticker */
+    float ticker_update_speed;  // Update Period
     Ticker _speed_ticker;
+    void  updateSpeed();        // Updates the speed of the wheel
     
-    // Pole transitions callback
-    void callback_transition();
-    
-    //Internals
+    /* Internals */
     int   count; // Transitions count
     float speed; // Speed is in cm / s