 
 }
 
+/*  calculateVelocities function
+ *  
+ *  calculates the velocities of every motor
+ *  using the PID output
+ */
+
 void calculateVelocities(){
 
-  velocity = map(ch3, 100, 200, 115, 22);
+  velocity = map(ch3, RC_LOW, RC_HIGH, ESC_MIN, ESC_MAX);
   
   v_ac = (abs(-100+bal_axes)/100)*velocity;
   v_bd = ((100+bal_axes)/100)*velocity;


}

void rcInterrupt1(){
   ch1 = millis() - rcLastChange1;
   rcLastChange1 = millis(); 

  yawReg.Compute();

}

/*  getYPR function
 *
 *  gets data from MPU and
 *  computes pitch, roll, yaw on the MPU's DMP
 */

void getYPR(){
  
