Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Road.cpp
00001 #include "Road.h" 00002 00003 Road::Road() { 00004 active_cars = 0x00; 00005 } 00006 00007 void Road::add_car(Car* car) { 00008 this->car1 = car; 00009 00010 active_cars = active_cars | car->flag; 00011 } 00012 00013 void Road::add_acc_car(AccCar* car) { 00014 this->car2 = car; 00015 00016 active_cars = active_cars | car->flag; 00017 } 00018 00019 void Road::let_cars_update() { 00020 go_flags.set(active_cars); 00021 } 00022 00023 void Road::wait_for_car_update() { 00024 done_flags.wait_all(active_cars); 00025 }
Generated on Wed Jul 27 2022 10:46:49 by
1.7.2