]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/common/can_ids.h
0b4440d376df4e723301e3ab19b26e14c5b5f5dd
[eurobot/public.git] / src / common / can_ids.h
1 /**
2  * @file   can_ids.h
3  * @author Michal Sojka <sojkam1@fel.cvut.cz>
4  * @date   Wed Feb 25 14:28:26 2009
5  * 
6  * @brief  IDs of CAN bus messages
7  *
8  */
9 #ifndef _CAN_IDS_H
10 #define _CAN_IDS_H
11
12 #define to_boa(x) x
13 #define to_mot(x) x
14 #define to_per(x) x
15 #define to_las(x) x
16
17 /**
18  * @addtogroup canmsg
19  * @{
20  * @nosubgrouping
21  */
22
23 #define CAN_PWR_ALERT   to_boa(0x05)    /**< alert power status */
24
25 #define CAN_CORR_TRIG   to_boa(0x008)   /* ULoPoS: correlation started */
26 #define CAN_CORR_DIST   to_boa(0x009)   /* ULoPoS: measured distances */
27
28 #define CAN_ROBOT_CMD   to_boa(0x10)    /**< robot command (start, ..) */
29
30 #define CAN_ODO_RESET   to_boa(0x14) /* ODO->BOA */
31 #define CAN_ODO_DATA    to_boa(0x15) /* ODO->BOA */
32
33 #define CAN_MOTION_RESET           to_mot(0x20) /* BOA->MOT */
34 #define CAN_MOTION_CMD             to_mot(0x21) /* BOA->MOT */
35 #define CAN_MOTION_ODOMETRY_SIMPLE to_boa(0x22) /* MOT->BOA */
36 #define CAN_MOTION_STATUS          to_boa(0x23) /* MOT->BOA */
37
38
39
40 #define CAN_ROBOT_SWITCHES      to_boa(0x30)
41
42 // ids of can-peripherials
43 #define CAN_CHELAE to_per(0x32)          /**< BOA->PER @copydetails set_chelae() front view  1st B  left,  2nd B right */ 
44 #define CAN_ADC_1 to_boa(0x33)          /* PER->BOA */
45 #define CAN_ADC_2 to_boa(0x34)          /* PER->BOA */
46 #define CAN_IR    to_boa(0x35)          /* PER->BOA */
47 #define CAN_LED   to_per(0x36)          /* BOA->PER */
48 #define CAN_ADC_3 to_boa(0x37)          /* PER->BOA */
49
50 #define CAN_BELTS to_per(0x38)  /**< BOA->PER @copydetails set_belts()*/
51
52
53 #define CAN_PWR to_per(0x40)            /* BOA->PER */
54                                         /* spodni 3 bity: zapnout. dalsi 3 b zapnout */
55
56 #define CAN_PWR_ADC1 to_boa(0x41)       /* PER->BOA */
57 #define CAN_PWR_ADC2 to_boa(0x42)       /* PER->BOA */
58                                         /* napeti na jednotlivych vetvich, 4B hodnoty */
59
60 //#define CAN_BRUSHES_STATUS    to_boa(0x44)    // FIXME: (F.J.) rename me, ...
61
62 #define CAN_PUCK                to_boa(0x43)
63
64
65 #define CAN_CMU                 to_boa(0x46)            /* PER->BOA */
66 #define CAN_HOKUYO_PITCH        to_per(0x47)            /* BOA->PER */
67
68 //#define CAN_ERROR             to_boa(0x48)    // FIXME: (F.J.) rename me, ...
69
70
71 #define CAN_VIDLE_STATUS        to_boa(0x48)
72 #define CAN_VIDLE_CMD           to_per(0x49)
73
74 // #undef to_boa
75 // #undef to_mot
76 // #undef to_per
77 // #undef to_las
78
79 #define CAN_DB_LP               to_boa(0x100)   // debug messages
80
81
82 /** @{ */
83
84
85 #endif