![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All the commit done for assignment 3
Dependencies: MCP23017 Servo WattBob_TextLCD mbed mbed-rtos
Diff: main.cpp
- Revision:
- 2:b9c8c2e5fc90
- Parent:
- 1:b1b14911f265
- Child:
- 3:e8046c9a605c
--- a/main.cpp Tue Apr 04 16:11:42 2017 +0000 +++ b/main.cpp Tue Apr 04 16:17:52 2017 +0000 @@ -127,12 +127,12 @@ void Timer1_void(void const *args) { -Task_11_emulate_car(); // runs every time, so at 20 Hz +Task_11_emulate_car(); // runs every time, so at 10 Hz sw_timer1 = !sw_timer1; -if(sw_timer1) { // runs just every second time, so at 10 hz +if(sw_timer1) { // runs just every second time, so at 10 hz Task_1_break_accelerate(); sw_timer11 = !sw_timer11; -if(sw_timer11) { // runs just every fourth time, so at 5 hz +if(sw_timer11) { // runs just every fourth time, so at 0.5 hz Task_10_calc_avg_speed(); } } @@ -213,6 +213,7 @@ SemBreak_Accelerate.wait(); accerlator = AinAccel; // save the accerlator value brake = AinBreak; // save the brake value + // Let the Semaphores release SemBreak_Accelerate.release(); }