Matthew Goldsmith
/
cis441projMS2b
Diff: main.cpp
- Revision:
- 10:8df624795295
- Parent:
- 9:f5981ced0b47
- Child:
- 11:2ab3397b6e30
--- a/main.cpp Thu Dec 12 22:28:02 2019 +0000 +++ b/main.cpp Thu Dec 12 23:14:19 2019 +0000 @@ -31,7 +31,9 @@ int return_cars[MAX_CARS]; - do { + do { + Road::ready(0); + int new_cars = road1.try_enter_car(time); road1.let_cars_update(); @@ -73,7 +75,10 @@ road1.publish_car_info(); Communication::publish_road_ready(); printf("published car info\r\n"); - road1.wait_for_sync(); + int do_nothing = 1; + while(Road::ready(-1) == 0) { + do_nothing++; + } } while( road1.active_cars > 0x00); // ----------------------------------------------------------------------