This is car control simulation by using Mbed controller and real time operating system.
Dependencies: MCP23017 Servo WattBob_TextLCD mbed-rtos mbed
Fork of Ass3 by
CAR.h@4:952a2d814fb1, 2014-04-07 (annotated)
- Committer:
- muaiyd
- Date:
- Mon Apr 07 15:47:10 2014 +0000
- Revision:
- 4:952a2d814fb1
- Parent:
- 1:b409ad65466a
try to make the mail struct as privet
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
muaiyd | 0:68ce46607848 | 1 | #ifndef CAR_H |
muaiyd | 0:68ce46607848 | 2 | #define CAR_H |
muaiyd | 0:68ce46607848 | 3 | #include "rtos.h" |
muaiyd | 0:68ce46607848 | 4 | #include "CommonVariable.h" |
muaiyd | 0:68ce46607848 | 5 | |
muaiyd | 0:68ce46607848 | 6 | class CAR { |
muaiyd | 0:68ce46607848 | 7 | public: |
muaiyd | 1:b409ad65466a | 8 | CAR(); |
muaiyd | 1:b409ad65466a | 9 | static void SAVE_ODO(float value); |
muaiyd | 1:b409ad65466a | 10 | static float GET_ODO(); |
muaiyd | 1:b409ad65466a | 11 | static void Accelero_Brake_Read(void const *args); |
muaiyd | 1:b409ad65466a | 12 | static void Average_Speed_Measure(void const *args); |
muaiyd | 1:b409ad65466a | 13 | static void Average_Speed_Show(void const *args); |
muaiyd | 1:b409ad65466a | 14 | static void OverSpeed(void const *args); |
muaiyd | 1:b409ad65466a | 15 | static void Odometer_Measure(void const *args); |
muaiyd | 1:b409ad65466a | 16 | static void Odometer_Show(void const *args); |
muaiyd | 1:b409ad65466a | 17 | static void SEND_CAR_VALUES (void const *args); |
muaiyd | 1:b409ad65466a | 18 | static void DUMP_CAR_VALUES_En (void const *args); |
muaiyd | 1:b409ad65466a | 19 | static void DUMP_CAR_VALUES(); |
muaiyd | 0:68ce46607848 | 20 | private: |
muaiyd | 4:952a2d814fb1 | 21 | uint32_t Element_Counter_W ; |
muaiyd | 4:952a2d814fb1 | 22 | uint32_t Element_Counter_R ; |
muaiyd | 4:952a2d814fb1 | 23 | typedef struct { |
muaiyd | 4:952a2d814fb1 | 24 | uint8_t Mail_Average_Speed; |
muaiyd | 4:952a2d814fb1 | 25 | float Mail_Accelerometer_Value; |
muaiyd | 4:952a2d814fb1 | 26 | float Mail_Brake_Value; |
muaiyd | 4:952a2d814fb1 | 27 | uint32_t Counter; |
muaiyd | 4:952a2d814fb1 | 28 | } CAR_MAIL; |
muaiyd | 4:952a2d814fb1 | 29 | static Mail<CAR_MAIL, 100> mail_box; |
muaiyd | 0:68ce46607848 | 30 | |
muaiyd | 0:68ce46607848 | 31 | }; |
muaiyd | 0:68ce46607848 | 32 | |
muaiyd | 0:68ce46607848 | 33 | #endif |