]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robofsm/actuators.h
Merge branch 'master' of zidekm1@rtime.felk.cvut.cz:/var/git/eurobot
[eurobot/public.git] / src / robofsm / actuators.h
1 /**
2  * @file actuators.h
3  * @author Martin Zidek
4  * @date 09/03/25
5  *
6  * @brief Acttuators library
7  */
8
9 /*
10  * actuators.h                  09/02/25
11  *
12  * Robot's actuators control.
13  *
14  * Copyright: (c) 2008 CTU Dragons
15  *            CTU FEE - Department of Control Engineering
16  * License: GNU GPL v.2
17  */
18 /**
19 \defgroup actlib Actuators control library
20
21 Actuators library serves as a single control point for all the actuators 
22 of the robot.
23  */
24
25 #ifndef ACTUATORS_H
26 #define ACTUATORS_H
27
28 /* Chelas */
29 #define CHELA_CLOSED 0xFF
30 #define CHELA_TIGHT  0xA0
31 #define CHELA_OPEN   0x20
32 #define CHELA_LOOSE  0x80
33
34 /* FIXME: (temporary, LPCs not ready) Timeout */
35 #define CHELA_TIMEOUT 0x07
36
37 /* Belts */
38 #define BELTS_IN 0xA0  // 160
39 #define BELTS_OFF 0x64 // 100
40 #define BELTS_OUT 0x28 //  40
41
42 /* Positions of lift */
43 #define FLOOR1 647
44 #define FLOOR2 3478
45
46 /* Holder positions */
47 #define HOLDER_CLOSED 0
48 #define HOLDER_OPEN_MID 20
49 #define HOLDER_OPENED 100
50
51 /* Pusher position */
52 #define PUSHER_INSIDE 0
53 #define PUSHER_OUTSIDE 100
54
55 /* Actuators status bits */
56 #define ACT_ST_LIFT_ERR 0x01    /* TODO */
57
58 #ifdef __cplusplus
59 extern "C" {
60 #endif 
61
62 void act_init(struct robottype_orte_data *ortedata);
63
64 void act_lift(unsigned short int position);
65 void act_chelae(unsigned char left, unsigned char right);
66 void act_belts(unsigned char left, unsigned char right);
67 void act_holder(unsigned char position);
68 void act_pusher(unsigned short int position);
69 void act_hokuyo(unsigned char angle);
70
71 #ifdef __cplusplus
72 }
73 #endif 
74
75 #endif /* ACTUATORS_H */