Project

General

Profile

Revision 408

added asleep to wl_do loop

View differences:

Command.cpp
145 145
  return 0;
146 146
}
147 147

  
148
int Command::parse_send_to_robot(int number_tokens,
149
                                 char tokens[MAX_TOKENS][MAX_TOKEN_SIZE],
150
                                 int pool_index) {
148
int Command::parse_send_to_robot(int number_tokens, char tokens[MAX_TOKENS][MAX_TOKEN_SIZE], int pool_index) {
151 149
  int i;
152 150
  unsigned char int_tokens[MAX_TOKENS];
153 151
  int number_int_tokens = number_tokens;
......
174 172
  // Send packet to robot
175 173
  fprintf(stderr, "Calling colonet_wl_send(%d, %d, %d, arguments)\n",
176 174
          int_tokens[0], int_tokens[1], int_tokens[2]);
177
  colonet_wl_send((short)pool_index, int_tokens[0],
178
                  (ColonetMessageType)int_tokens[1], int_tokens[2], arguments);
175
  if (colonet_wl_send((short)pool_index, int_tokens[0], (ColonetMessageType)int_tokens[1], int_tokens[2], arguments)
176
      != 0) {
177
    fprintf(stderr, "Error - Colonet_wl_send failed.");
178
    return -1;
179
  }
179 180

  
180 181
  return 0;
181 182
}

Also available in: Unified diff