 
 // force calibration (one motor at a time only!)
 void oscSetPosition(OscMessage &m) {
-  if (m.getInt(0) == MOTOR_ID) {
+  if (m.size()==2 && m.getInt(0) == MOTOR_ID) {
     encoder0Pos = (long)m.getFloat(1);
+    homed = true;
+    if (state==NOTHOMED) state=OK;
   }
 }
 



void oscGo2(OscMessage &m) {
  if (state != OK) return;
  
  double pos = m.getFloat(MOTOR_ID*2);
  double spd = m.getFloat(MOTOR_ID*2+1);


void oscGo(OscMessage &m) {
  // /go/motor0pos,motor1pos,motor2pos,motor3pos long ints
  if (state != OK || m.size() != 4) return; 
  
  double value = m.getFloat(MOTOR_ID);
  pidSetpoint = value;
