
Final Commit
Dependencies: mbed
Diff: main.cpp
- Revision:
- 5:27fcb9b36e7e
- Parent:
- 4:a9634970d33e
- Child:
- 6:f3f508cea1c4
--- a/main.cpp Wed Mar 07 15:01:35 2018 +0000 +++ b/main.cpp Tue Mar 13 09:42:49 2018 +0000 @@ -2,7 +2,7 @@ #include "FXOS8700CQ.h" #include "Gamepad.h" #include "N5110.h" -#include "Food.h" +#include "Testing.h" /* ELEC2645 Embedded Systems Project School @@ -14,17 +14,39 @@ Date: 28/02/2018 */ -Food food; +Testing test; int main() { + // ----- Testing Program ----- while(1){ - Position pf = food.get_position(); + if(test.food_test_position()) { + + printf("Passed position test \n"); + + } + + else { + + printf("Failed position test \n"); + + } + + if(test.food_test_range()) { + + printf("Passed Range Test \n"); + + } + + else { + + printf("Failed Range Test \n"); + + } - printf("Position x %i \n Position y %i \n", pf.x, pf.y); + wait(1.0); - wait(0.5); }