    
    //delay(g_moveDelay);
    
-   return checkPosition();
+   return ret_val;
 }
 
 // Moves the arm slowly to a new position, depending on the specified delay

   double uln_h = ULN_H_GRADIENT*g_uln_h.mean() + ULN_H_OFFSET;
   double uln_angle_d = degrees(  atan2(uln_h,uln_r) );
   DEBUG("uln_r: "); DEBUG(uln_r); DEBUG(", uln_h: "); DEBUG(uln_h); DEBUG(", uln_angle_d: "); DEBUGln(uln_angle_d);
   Serial.print("real angle = "); Serial.print(uln_angle_d); Serial.print(", desired angle = "); Serial.println( s + e );
   return ( abs(uln_angle_d - (s + e)) > FB_THRESHOLD ) ? -101 : 0;
}


{  
   int ret_val = 0;
   
   checkPosition();
   //if ( ( ret_val = checkPosition() ) != 0 ) return ret_val;
   
   DEBUG("moveArm("); DEBUG(basPulse); DEBUG(","); DEBUG(shlPulse); DEBUG(","); DEBUG(elbPulse); DEBUG(","); DEBUG(wriPulse); DEBUGln(")");
   
   //Drive servos
