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@13:e5b22bfbe67b, 2014-05-07 (annotated)
- Committer:
- muaiyd
- Date:
- Wed May 07 10:25:50 2014 +0000
- Revision:
- 13:e5b22bfbe67b
- Parent:
- 12:8eb2c1cccee6
Final Version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
muaiyd | 13:e5b22bfbe67b | 1 | /*********************************** |
muaiyd | 13:e5b22bfbe67b | 2 | * CAR.h * |
muaiyd | 13:e5b22bfbe67b | 3 | ************************************/ |
muaiyd | 0:68ce46607848 | 4 | #ifndef CAR_H |
muaiyd | 0:68ce46607848 | 5 | #define CAR_H |
muaiyd | 0:68ce46607848 | 6 | #include "rtos.h" |
muaiyd | 0:68ce46607848 | 7 | #include "CommonVariable.h" |
muaiyd | 0:68ce46607848 | 8 | |
muaiyd | 9:d86a6b8cdfa4 | 9 | typedef struct { |
muaiyd | 9:d86a6b8cdfa4 | 10 | uint8_t Mail_Average_Speed; |
muaiyd | 9:d86a6b8cdfa4 | 11 | float Mail_Accelerometer_Value; |
muaiyd | 9:d86a6b8cdfa4 | 12 | float Mail_Brake_Value; |
muaiyd | 9:d86a6b8cdfa4 | 13 | int Counter; |
muaiyd | 9:d86a6b8cdfa4 | 14 | } CAR_MAIL; |
muaiyd | 12:8eb2c1cccee6 | 15 | |
muaiyd | 0:68ce46607848 | 16 | class CAR { |
muaiyd | 0:68ce46607848 | 17 | public: |
muaiyd | 1:b409ad65466a | 18 | CAR(); |
muaiyd | 1:b409ad65466a | 19 | static void SAVE_ODO(float value); |
muaiyd | 1:b409ad65466a | 20 | static float GET_ODO(); |
muaiyd | 12:8eb2c1cccee6 | 21 | |
muaiyd | 12:8eb2c1cccee6 | 22 | static void Car_Simulation(void const *args); |
muaiyd | 13:e5b22bfbe67b | 23 | static uint8_t Measure_Speed(); |
muaiyd | 1:b409ad65466a | 24 | static void Average_Speed_Measure(void const *args); |
muaiyd | 1:b409ad65466a | 25 | static void Average_Speed_Show(void const *args); |
muaiyd | 1:b409ad65466a | 26 | static void OverSpeed(void const *args); |
muaiyd | 13:e5b22bfbe67b | 27 | static void Odo_Show(void const *args); |
muaiyd | 1:b409ad65466a | 28 | static void SEND_CAR_VALUES (void const *args); |
muaiyd | 1:b409ad65466a | 29 | static void DUMP_CAR_VALUES_En (void const *args); |
muaiyd | 1:b409ad65466a | 30 | static void DUMP_CAR_VALUES(); |
muaiyd | 7:a92da438d06c | 31 | static void Side_Light_Flash(void const *args); |
muaiyd | 8:6e55db96c11c | 32 | static void Side_Light(void const *args); |
muaiyd | 0:68ce46607848 | 33 | |
muaiyd | 0:68ce46607848 | 34 | }; |
muaiyd | 0:68ce46607848 | 35 | |
muaiyd | 0:68ce46607848 | 36 | #endif |