Revision 1279
Fixes
trunk/code/projects/diagnostic_station/station/dump_robot.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
for (uint8_t i=0; i<16; ++i) |
61 | 61 |
robot_read_bom (i, &bom[i]); |
62 |
//robot_read_bom_all (bom); |
|
62 | 63 |
|
63 | 64 |
for (uint8_t i=0; i<16; ++i) |
64 | 65 |
{ |
trunk/code/projects/diagnostic_station/station/comm_robot.c | ||
---|---|---|
224 | 224 |
} |
225 | 225 |
} |
226 | 226 |
|
227 |
bool robot_read_bom_all (uint8_t num, uint16_t *value)
|
|
227 |
bool robot_read_bom_all (uint16_t *value) |
|
228 | 228 |
{ |
229 |
send_request_packet(station_robot_read_bom_all, null, 0);
|
|
229 |
send_request_packet(station_robot_read_bom_all, NULL, 0);
|
|
230 | 230 |
|
231 | 231 |
// Now the received data is in received_buffer/received_length |
232 | 232 |
if(received_length >= 32) |
trunk/code/projects/diagnostic_station/station/comm_robot.h | ||
---|---|---|
17 | 17 |
bool robot_read_encoders (int16_t *left, int16_t *right); |
18 | 18 |
bool robot_read_bom (uint8_t num, uint16_t *value); |
19 | 19 |
bool robot_read_rangefinder (uint8_t num, uint16_t *value); |
20 |
bool robot_read_bom_all (uint8_t num, uint16_t *value);
|
|
20 |
bool robot_read_bom_all (uint16_t *value); |
|
21 | 21 |
|
22 | 22 |
#define motor_direction_off 0 |
23 | 23 |
#define motor_direction_forward 1 |
trunk/code/projects/diagnostic_station/robot/main.c | ||
---|---|---|
127 | 127 |
|
128 | 128 |
static void message_read_bom_all(int length, uint8_t *data){ |
129 | 129 |
int i; |
130 |
int16_6 value[16];
|
|
130 |
int16_t value[16];
|
|
131 | 131 |
char senddata[32]; |
132 | 132 |
bom_refresh(BOM_ALL); |
133 | 133 |
for(i=0; i<16; i++){ |
134 | 134 |
value[i] = bom_get(i); |
135 |
senddata[2*i] = wORD_BYTE_0 (value[i]);
|
|
135 |
senddata[2*i] = WORD_BYTE_0 (value[i]);
|
|
136 | 136 |
senddata[(2*i)+1] = WORD_BYTE_1 (value[i]); |
137 | 137 |
} |
138 | 138 |
|
Also available in: Unified diff