Browse Source

cast to float

mission-4.1.18
Jason Short 13 years ago
parent
commit
bc1593e89c
  1. 4
      ArduCopter/motors_octa_quad.pde
  2. 4
      ArduCopter/motors_quad.pde

4
ArduCopter/motors_octa_quad.pde

@ -40,8 +40,8 @@ static void output_motors_armed()
g.rc_4.calc_pwm(); g.rc_4.calc_pwm();
if(g.frame_orientation == X_FRAME){ if(g.frame_orientation == X_FRAME){
roll_out = g.rc_1.pwm_out * .707; roll_out = (float)g.rc_1.pwm_out * 0.707;
pitch_out = g.rc_2.pwm_out * .707; pitch_out = (float)g.rc_2.pwm_out * 0.707;
motor_out[MOT_1] = ((g.rc_3.radio_out * g.top_bottom_ratio) - roll_out + pitch_out); // APM2 OUT1 APM1 OUT1 FRONT RIGHT CCW TOP motor_out[MOT_1] = ((g.rc_3.radio_out * g.top_bottom_ratio) - roll_out + pitch_out); // APM2 OUT1 APM1 OUT1 FRONT RIGHT CCW TOP
motor_out[MOT_2] = ((g.rc_3.radio_out * g.top_bottom_ratio) + roll_out + pitch_out); // APM2 OUT2 APM1 OUT2 FRONT LEFT CW TOP motor_out[MOT_2] = ((g.rc_3.radio_out * g.top_bottom_ratio) + roll_out + pitch_out); // APM2 OUT2 APM1 OUT2 FRONT LEFT CW TOP

4
ArduCopter/motors_quad.pde

@ -37,8 +37,8 @@ static void output_motors_armed()
if(g.frame_orientation == X_FRAME){ if(g.frame_orientation == X_FRAME){
roll_out = g.rc_1.pwm_out * .707; roll_out = (float)g.rc_1.pwm_out * 0.707;
pitch_out = g.rc_2.pwm_out * .707; pitch_out = (float)g.rc_2.pwm_out * 0.707;
// left // left
motor_out[MOT_3] = g.rc_3.radio_out + roll_out + pitch_out; // FRONT motor_out[MOT_3] = g.rc_3.radio_out + roll_out + pitch_out; // FRONT

Loading…
Cancel
Save