]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/common/can_ids.h
added CAN_ERROR, used to inform boa, that carousel couldn't move to the requested...
[eurobot/public.git] / src / common / can_ids.h
1 #ifndef _CAN_IDS_H
2 #define _CAN_IDS_H
3
4 #define to_boa(x) x
5 #define to_mot(x) x
6 #define to_per(x) x
7 #define to_las(x) x
8
9 #define CAN_PWR_ALERT   to_boa(0x05)    /* alert power status */
10
11 #define CAN_ROBOT_CMD   to_boa(0x10)    /* robot command (start, ..) */
12
13 #define CAN_MOTION_RESET           to_mot(0x20) /* BOA->MOT */
14 #define CAN_MOTION_CMD             to_mot(0x21) /* BOA->MOT */
15 #define CAN_MOTION_ODOMETRY_SIMPLE to_boa(0x22) /* MOT->BOA */
16 #define CAN_MOTION_STATUS          to_boa(0x23) /* MOT->BOA */
17
18 //ids of laser navigation can messages
19 #define CAN_LAS1 to_boa(0x25)           /* LAS->BOA */
20 #define CAN_LAS2 to_boa(0x26)
21 #define CAN_LAS3 to_boa(0x27)
22 #define CAN_LAS4 to_boa(0x28)
23 #define CAN_LAS_DATA to_boa(0x29)       /* used to send only period and data */
24 #define CAN_LAS_CMD to_per(0x30)        /* BOA->LAS */
25
26 // ids of can-peripherials
27 #define CAN_SERVO to_per(0x32)          /* BOA->PER */
28 #define CAN_ADC_1 to_boa(0x33)          /* PER->BOA */
29 #define CAN_ADC_2 to_boa(0x34)          /* PER->BOA */
30 #define CAN_IR    to_boa(0x35)          /* PER->BOA */
31 #define CAN_LED   to_per(0x36)          /* BOA->PER */
32 #define CAN_ADC_3 to_boa(0x37)          /* PER->BOA */
33
34 #define CAN_DRIVES to_per(0x38) /* BOA->PER */
35 #define CAN_CAROUSEL to_boa(0x039)  /* BOA->PER */ 
36
37
38 #define CAN_PWR to_per(0x40)            /* BOA->PER */
39                                         /* spodni 3 bity: zapnout. dalsi 3 b zapnout */
40
41 #define CAN_PWR_ADC1 to_boa(0x41)       /* PER->BOA */
42
43 #define CAN_PWR_ADC2 to_boa(0x42)       /* PER->BOA */
44                                         /* napeti na jednotlivych vetvich, 4B hodnoty */
45
46 #define CAN_CAROUSEL_STATUS     to_boa(0x43)
47 #define CAN_BRUSHES_STATUS      to_boa(0x44)
48 #define CAN_BAGR_STATUS         to_boa(0x45)
49
50 #define CAN_CMU   to_boa(0x46)          /* PER->BOA */
51 #define CAN_BUMPER        to_boa(0x47)          /* PER->BOA */
52
53 #define CAN_ERROR               to_boa(0x48) // carousel error; byte[0]= 1 if couldn't read the position =2 if coudn't move the carousel to the right position
54
55
56
57 // #undef to_boa
58 // #undef to_mot
59 // #undef to_per
60 // #undef to_las
61
62 #endif