 */
 
 #include <IRremote.h>
+
 
 #define DEBUG
 

boolean ir_cue_mode = true;
unsigned long ir_time;
unsigned int ir_cycle = 300;
unsigned int ir_response_threshold = 500;

void setup()
{

  DEBUG_PRINTLN(i);
  return i;
}

int sendXBeePacketFromRaw (
         const char *id,
         const char *func,
         const char *var,
         const char *data) {
  char str[20];
  str[0] = '\0';
  string_concat(str, id, 0);
  string_concat(str, func, 2);
  string_concat(str, var, 3);
  string_concat(str, data, 6);
  str[9] = '\0';
  DEBUG_PRINT("(in sendXBeePacketFromRaw) packet being sent: ");
  DEBUG_PRINTLN(str);
  XBee.println(str);
  return 1;
}

// to guarantee, dst should be longer than end-start+1
void string_concat(char *dst, const char *src, int pos) {
  int i = 0;
  while (src[i] != '\0') {
    dst[i+pos] = src[i++];
  }
}
