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.
AccCar.h
00001 #ifndef _ACC_CAR_H_ 00002 #define _ACC_CAR_H_ 00003 00004 #include "mbed.h" 00005 #include "Road.h" 00006 #include "Communication.h" 00007 00008 class Road; 00009 00010 class AccCar{ 00011 public: 00012 int id; 00013 int position; 00014 int speed; 00015 int flag; 00016 00017 AccCar(int id, Road* road, int flag); 00018 void set_forward_car(AccCar* car); 00019 void set_target_speed(int speed); 00020 void update(); 00021 void reset(); 00022 00023 protected: 00024 int target_speed; 00025 int cycle; 00026 bool waited; 00027 AccCar* forward_car; 00028 00029 Road* road; 00030 Thread* thread; 00031 }; 00032 #endif
Generated on Wed Jul 13 2022 14:30:32 by
1.7.2