Commits

bjoern committed ef162b8

added echo msg handling

Comments (0)

Files changed (1)

arduino_osc_udp.pde

 char prefixIn[]="/in/";
 char prefixA2d[]="/adc/";
 char prefixReset[]="/reset"; //TODO: implement
+char prefixEcho[]="/echo";
 
 char oscOutAddress[10]={0x00}; //string that holds outgoing osc message address
 char* numbers[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12"};
   //is this a reset message? if so, reinitialize.
   if(strncmp(msg,prefixReset,strlen(prefixReset))==0) {
     setup();
+    return;
+  }
+  //is this an echo message? if so, send it back.
+  if(strncmp(msg,prefixEcho,strlen(prefixReset))==0) {
+    oscSendMessageInt(prefixEcho,0);
   }
 }