Subversion Repositories programming

Rev

Rev 329 | Rev 331 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 329 Rev 330
Line 14... Line 14...
14
/* Custom #defines for just the elevator class */
14
/* Custom #defines for just the elevator class */
15
#define MOVE_UP     0
15
#define MOVE_UP     0
16
#define MOVE_DOWN   1
16
#define MOVE_DOWN   1
17
#define IDLE        2
17
#define IDLE        2
18
 
18
 
19
#define ELEVATOR_TIME_MOVE_AMOUNT   0.05   //0.1
19
#define ELEVATOR_TIME_MOVE_AMOUNT   0.1
20
#define ELEVATOR_TIME_DELAY_USEC    250000 //500000
20
#define ELEVATOR_TIME_DELAY_USEC    500000
21
#define ELEVATOR_TIME_PAUSE_USEC    50000
21
#define ELEVATOR_TIME_PAUSE_USEC    50000
22
 
22
 
23
class Elevator
23
class Elevator
24
{
24
{
25
    public:
25
    public:
Line 27... Line 27...
27
        ~Elevator ();
27
        ~Elevator ();
28
 
28
 
29
        // Service Functions
29
        // Service Functions
30
        int floors_above_current ();
30
        int floors_above_current ();
31
        int floors_below_current ();
31
        int floors_below_current ();
32
        bool has_any_floors_to_stop_at ();
-
 
33
        void push_button (int floor);
32
        void push_button (int floor);
34
        bool button_is_pushed (int floor);
33
        bool button_is_pushed (int floor);
35
 
34
 
36
        // Getters and Setters
35
        // Getters and Setters
37
        int get_direction ();
36
        int get_direction ();