Project

General

Profile

Statistics
| Revision:

root / branches / autonomous_recharging / code / projects / autonomous_recharging / charging_station / bays.h @ 98

History | View | Annotate | Download (863 Bytes)

1
#ifndef _BAYS_H_
2
#define _BAYS_H_
3

    
4
#define ENABLE_PIN        _PIN_A0
5
#define BOM_PIN                _PIN_A1
6
#define SELECT_0        _PIN_A2
7
#define SELECT_1        _PIN_A3
8
#define SELECT_2        _PIN_A4
9

    
10
#define NUM_BAYS 4
11

    
12
#define MAX_ROBOTS 20
13
char sensors[MAX_ROBOTS]; //from wl_charging_station...probably should be there instead of here, but assign_bay needs for now
14

    
15
int bayStates[NUM_BAYS]; //holds robot id of robot in each bay 0-3 (255 if empty)
16
int robot_seeking; //robot if of the robot currently seeking (255 if none)
17

    
18
int active_bay;
19

    
20
void bay_tester(void);
21
void print_bays_debug(void);
22
void do_consistency_checks(void);
23

    
24
void bays_init(void);
25

    
26
int assign_bay(int robot);
27
int robot_assignment(int robot);
28
int is_empty(void);
29

    
30
// bom & beacon functions
31
void lbom_on(void);
32
void lbom_off(void);
33
void bay_enable(int which);
34
void bay_disable(void);
35

    
36
#endif
37