Railway Challenge
/
challenge
Uncommenting of part that allow supercaps to charge up from the batteries
dashboard.h@0:4788e1df7b55, 2020-03-13 (annotated)
- Committer:
- rwcjoliver
- Date:
- Fri Mar 13 11:48:04 2020 +0000
- Revision:
- 0:4788e1df7b55
Uncommented RegenBRaking lines to allow capacitors to charge up from the batteries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rwcjoliver | 0:4788e1df7b55 | 1 | #ifndef _DASHBOARD_H_ |
rwcjoliver | 0:4788e1df7b55 | 2 | #define _DASHBOARD_H_ |
rwcjoliver | 0:4788e1df7b55 | 3 | |
rwcjoliver | 0:4788e1df7b55 | 4 | #include <mbed.h> |
rwcjoliver | 0:4788e1df7b55 | 5 | |
rwcjoliver | 0:4788e1df7b55 | 6 | class Dashboard { |
rwcjoliver | 0:4788e1df7b55 | 7 | public: |
rwcjoliver | 0:4788e1df7b55 | 8 | Dashboard(InterruptIn& hallSensor); // CONSTRUCTOR |
rwcjoliver | 0:4788e1df7b55 | 9 | |
rwcjoliver | 0:4788e1df7b55 | 10 | void tachoInterrupt(); |
rwcjoliver | 0:4788e1df7b55 | 11 | void getCurrentSpeed(); |
rwcjoliver | 0:4788e1df7b55 | 12 | |
rwcjoliver | 0:4788e1df7b55 | 13 | int currentSpeed; |
rwcjoliver | 0:4788e1df7b55 | 14 | float currentDistance; |
rwcjoliver | 0:4788e1df7b55 | 15 | |
rwcjoliver | 0:4788e1df7b55 | 16 | private: |
rwcjoliver | 0:4788e1df7b55 | 17 | InterruptIn& _hallSensor; |
rwcjoliver | 0:4788e1df7b55 | 18 | Timer tachoTimer; |
rwcjoliver | 0:4788e1df7b55 | 19 | int passedTime_ms; |
rwcjoliver | 0:4788e1df7b55 | 20 | float passedTime; |
rwcjoliver | 0:4788e1df7b55 | 21 | float lastTime; |
rwcjoliver | 0:4788e1df7b55 | 22 | float wheelFreq; |
rwcjoliver | 0:4788e1df7b55 | 23 | float wheelCircumference; |
rwcjoliver | 0:4788e1df7b55 | 24 | int numberOfMagnets; |
rwcjoliver | 0:4788e1df7b55 | 25 | int tachoCounter; |
rwcjoliver | 0:4788e1df7b55 | 26 | int currentTime; |
rwcjoliver | 0:4788e1df7b55 | 27 | }; |
rwcjoliver | 0:4788e1df7b55 | 28 | |
rwcjoliver | 0:4788e1df7b55 | 29 | #endif |