![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
Diff: assignment3tasks.cpp
- Revision:
- 5:f5dda79b93cb
- Parent:
- 4:27340b291c09
- Child:
- 6:abbd51d9b045
--- a/assignment3tasks.cpp Tue Mar 26 14:49:10 2019 +0000 +++ b/assignment3tasks.cpp Tue Mar 26 15:20:57 2019 +0000 @@ -79,5 +79,16 @@ void task4average() { + //lock + for(int i = 0; i < SAMPLESIZE ; i++){ + //speed.raw = (speed.accelvalue - speed.brakevalue)*MAXSPEED; + speed.average += speed.array[i]; + speed.average = (speed.average / SAMPLESIZE); + + + + } + + //unlock } \ No newline at end of file