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 "Car.h" 00006 #include "Road.h" 00007 #include "Communication.h" 00008 00009 class Road; 00010 class Car; 00011 00012 class AccCar { 00013 public: 00014 // Inherited from class Car 00015 int position; 00016 int speed; 00017 int flag; 00018 00019 AccCar(int id, Road* road, int flag, Communication* c); 00020 void set_forward_car(AccCar* car); 00021 void update(); 00022 void reset(int speed); 00023 void stop(); 00024 00025 public: 00026 int id; 00027 int target_speed; 00028 AccCar* forward_car; 00029 00030 Road* road; 00031 Thread* thread; 00032 Communication *comm; 00033 00034 char* topic_position; 00035 char* topic_control; 00036 00037 protected: 00038 int cycle; 00039 }; 00040 #endif
Generated on Fri Jul 22 2022 13:26:47 by
1.7.2