Revision 348
fixed some warnings in colonet robot code
colonet_wireless.cpp | ||
---|---|---|
43 | 43 |
static void* listen(void* args); |
44 | 44 |
static void timeout_handler(void); |
45 | 45 |
static void handle_response(int frame, int received); |
46 |
static void handle_receive(char type, int source, unsigned char* packet, |
|
47 |
int len); |
|
46 |
static void handle_receive(char type, int source, unsigned char* packet, int len); |
|
48 | 47 |
static void unregister(void); |
49 | 48 |
static int log_packet(unsigned char* packet, int len); |
50 | 49 |
|
51 |
|
|
52 | 50 |
/**************************** Public functions *******************************/ |
53 | 51 |
void colonet_wl_init(char* wl_port_, MsgHandlerFunction message_handler_, char* log_filename_) { |
54 | 52 |
if (log_filename_ != NULL) { |
55 |
printf("Log filename_=%p: %s\n", log_filename_, log_filename_); |
|
56 | 53 |
logging_enabled = true; |
57 | 54 |
strcpy(log_filename, log_filename_); |
58 | 55 |
} |
... | ... | |
164 | 161 |
static void handle_receive(char type, int source, unsigned char* packet, |
165 | 162 |
int len) { |
166 | 163 |
ColonetRobotServerPacket pkt; |
167 |
pkt.client_id = packet[0] | (packet[1]<<8) | (packet[2]<<16) | |
|
168 |
(packet[3]<<24); //little endian |
|
164 |
pkt.client_id = packet[0] | (packet[1]<<8) | (packet[2]<<16) | (packet[3]<<24); //little endian |
|
169 | 165 |
|
170 | 166 |
memcpy(pkt.data, packet + 5, PACKET_DATA_LEN); |
171 | 167 |
|
Also available in: Unified diff