Railway Challenge
/
challenge-ChaiUpdated-AutostopTest-30Throttle
This is a test from 30%Throttle to stop, using full service brake
dashboard.h
- Committer:
- rwcjoliver
- Date:
- 2020-03-13
- Revision:
- 0:4788e1df7b55
File content as of revision 0:4788e1df7b55:
#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