Fork with cleaned up main and brakes class. Implementation or regen, friction and emergency stop now in brakes.cpp and called in main

Dependencies:   mbed millis

dashboard.h

Committer:
cdevarakonda
Date:
24 months ago
Revision:
33:9198b292a8eb
Parent:
0:4788e1df7b55

File content as of revision 33:9198b292a8eb:

#ifndef _DASHBOARD_H_
#define _DASHBOARD_H_

#include <mbed.h>

class Dashboard {
    public:
        Dashboard(InterruptIn& hallSensor);    // CONSTRUCTOR
        
        void tachoInterrupt();
        void getCurrentSpeed();
        
        int currentSpeed;
        float currentDistance;
        
    private:
        InterruptIn& _hallSensor;
        Timer tachoTimer;
        int passedTime_ms;
        float passedTime;
        float lastTime;
        float wheelFreq;
        float wheelCircumference;
        int numberOfMagnets;
        int tachoCounter;
        int currentTime;
};

#endif