cis441 project milestone 1a

Dependencies:   TextLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AccCar.h Source File

AccCar.h

00001 #ifndef _ACC_CAR_H_
00002 #define _ACC_CAR_H_
00003 
00004 #include "mbed.h"
00005 #include "Road.h"
00006 
00007 class Road;
00008 
00009 class AccCar{
00010 public:
00011     int id;
00012     int position;
00013     int speed;
00014     int flag;
00015     
00016     AccCar(int id, Road* road, int flag);
00017     void set_forward_car(AccCar* car);
00018     void set_target_speed(int speed);
00019     void update();
00020     void reset();
00021     
00022 protected:
00023     int target_speed;
00024     int cycle;
00025     bool waited;
00026     AccCar* forward_car;
00027     
00028     Road* road;
00029     Thread* thread; 
00030 };
00031 #endif