Stm for the project "Fahradlicht"
STM_Fahrrad_Licht.h@0:3d7042171419, 2018-11-23 (annotated)
- Committer:
- lordofthestorm12
- Date:
- Fri Nov 23 15:26:49 2018 +0000
- Revision:
- 0:3d7042171419
stm class;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lordofthestorm12 | 0:3d7042171419 | 1 | #ifndef STM_FAHRRAD_LICHT_H |
lordofthestorm12 | 0:3d7042171419 | 2 | #define STM_FAHRRAD_LICHT_H |
lordofthestorm12 | 0:3d7042171419 | 3 | |
lordofthestorm12 | 0:3d7042171419 | 4 | #include "mbed.h" |
lordofthestorm12 | 0:3d7042171419 | 5 | #include "Led_Func_Lib.h" |
lordofthestorm12 | 0:3d7042171419 | 6 | |
lordofthestorm12 | 0:3d7042171419 | 7 | enum CurState{OFF, ALL, LL, LR, BLINKI, DEFBLINKI,POLICELIGHT}; |
lordofthestorm12 | 0:3d7042171419 | 8 | |
lordofthestorm12 | 0:3d7042171419 | 9 | class StateDefine : Led_Func{ |
lordofthestorm12 | 0:3d7042171419 | 10 | |
lordofthestorm12 | 0:3d7042171419 | 11 | public: |
lordofthestorm12 | 0:3d7042171419 | 12 | StateDefine(); |
lordofthestorm12 | 0:3d7042171419 | 13 | void st_off(); |
lordofthestorm12 | 0:3d7042171419 | 14 | void st_all(); |
lordofthestorm12 | 0:3d7042171419 | 15 | void st_ll(); |
lordofthestorm12 | 0:3d7042171419 | 16 | void st_lr(); |
lordofthestorm12 | 0:3d7042171419 | 17 | void st_blinki(); |
lordofthestorm12 | 0:3d7042171419 | 18 | void st_defblinki(); |
lordofthestorm12 | 0:3d7042171419 | 19 | void st_policelight(); |
lordofthestorm12 | 0:3d7042171419 | 20 | |
lordofthestorm12 | 0:3d7042171419 | 21 | void STATEChange(CurState aCS, float aCurTimerVal); |
lordofthestorm12 | 0:3d7042171419 | 22 | |
lordofthestorm12 | 0:3d7042171419 | 23 | private: |
lordofthestorm12 | 0:3d7042171419 | 24 | |
lordofthestorm12 | 0:3d7042171419 | 25 | Led_Func _STMLed; |
lordofthestorm12 | 0:3d7042171419 | 26 | |
lordofthestorm12 | 0:3d7042171419 | 27 | protected: |
lordofthestorm12 | 0:3d7042171419 | 28 | |
lordofthestorm12 | 0:3d7042171419 | 29 | Timer _stmTimer; |
lordofthestorm12 | 0:3d7042171419 | 30 | int _curLEDPos; |
lordofthestorm12 | 0:3d7042171419 | 31 | float _timerval; |
lordofthestorm12 | 0:3d7042171419 | 32 | |
lordofthestorm12 | 0:3d7042171419 | 33 | }; |
lordofthestorm12 | 0:3d7042171419 | 34 | |
lordofthestorm12 | 0:3d7042171419 | 35 | #endif |