Ikenna Adrian Ozoemena 201157039
Dependencies: mbed
Diff: main.cpp
- Revision:
- 52:29772e31a620
- Parent:
- 44:a6a361bea806
- Child:
- 53:3fdc4486f672
--- a/main.cpp Thu May 09 08:42:25 2019 +0000 +++ b/main.cpp Thu May 09 13:22:45 2019 +0000 @@ -1,7 +1,4 @@ -#include "main.h" - /* - ELEC2645 Embedded Systems Project School of Electronic & Electrical Engineering University of Leeds @@ -11,9 +8,21 @@ Date: 20/02/2019 */ +#include "main.h" +/** @file main.cpp + * @brief This file is designated to start the program by calling all the necessary functions in a sequential manner. + */ + + //_______________functions______________________________________________________ int main() { + #ifdef WITH_TESTING + int number_of_failures = run_all_tests(); + + if(number_of_failures > 0) return number_of_failures; + #endif + init(); printf("Init function completed...\n"); @@ -23,17 +32,12 @@ rosen.reset(); printf("reset()\n"); //printf("ycursor = %d",rosen.get_ycursor()); - if(rosen.get_ycursor() == 16) { // printf("get_ycursor() == 16()\n"); while ( pad.check_event(Gamepad::BACK_PRESSED) == false && rosen.dead() == false) { - // printf("play...\n"); rosen.read_input(pad); - // printf("read_input\n"); rosen.update(pad); - // printf("update\n"); render(); - // printf("render()\n"); wait(1.0f/fps); rosen.timer(fps); }