added code for ToF and inserted e_button thread
Dependencies: wheelchaircontrol1
Diff: main.cpp
- Revision:
- 13:7fe71170d157
- Parent:
- 11:73b4380d82bf
- Child:
- 14:67133c127740
diff -r c61ea1cd6488 -r 7fe71170d157 main.cpp --- a/main.cpp Mon Jul 01 06:04:13 2019 +0000 +++ b/main.cpp Mon Jul 01 16:36:54 2019 +0000 @@ -75,7 +75,9 @@ //added // int emerg_button = e_button; - + Watchdog dog; // Creates Watchdog object + dog.Configure(watchdogLimit); // Configures timeout for Watchdog + pc.printf("Code initiated\n"); int set = 0; while(1) { if( pc.readable()) { @@ -139,10 +141,10 @@ wait(process); -/* t.stop(); + t.stop(); pc.printf("Time elapsed: %f seconds and iteration = %d\n", t.read(), iteration); dog.Service(); // Service the Watchdog so it does not cause a system reset - "Kicking"/"Feeding" the dog - */ + } }