Revision 1303
Added read_eeprom to test suite and robot code so we can read the robot ID and BOM type from eeprom
main.c | ||
---|---|---|
140 | 140 |
wl_send_global_packet(robot_station_group, robot_station_data_bom_all, senddata, 32, 0); |
141 | 141 |
} |
142 | 142 |
|
143 |
static void message_read_eeprom(int length, uint8_t *data) |
|
144 |
{ |
|
145 |
char senddata[2]; |
|
146 |
senddata[0] = get_robotid(); |
|
147 |
senddata[1] = get_bom_type(); |
|
148 |
|
|
149 |
wl_send_global_packet (robot_station_group, robot_station_data_eeprom, senddata, 2, 0); |
|
150 |
} |
|
151 |
|
|
143 | 152 |
// *************************** |
144 | 153 |
// ** Message acknowledging ** |
145 | 154 |
// *************************** |
... | ... | |
181 | 190 |
case station_robot_read_rangefinder: message_read_rangefinder (length, packet); break; |
182 | 191 |
case station_robot_read_bom: message_read_bom (length, packet); break; |
183 | 192 |
case station_robot_read_bom_all: message_read_bom_all (length, packet); break; |
193 |
case station_robot_read_eeprom: message_read_eeprom(length, packet); break; |
|
184 | 194 |
} |
185 | 195 |
|
186 | 196 |
orb_set (255, 127, 0); |
Also available in: Unified diff