Browse Source

TradHeli: Creating Flybar Acro mode.

master
Robert Lefebvre 13 years ago
parent
commit
575b99b4be
  1. 10
      ArduCopter/ArduCopter.pde
  2. 4
      libraries/AP_Motors/AP_MotorsHeli.h

10
ArduCopter/ArduCopter.pde

@ -1640,8 +1640,18 @@ void update_roll_pitch_mode(void) @@ -1640,8 +1640,18 @@ void update_roll_pitch_mode(void)
}else{
// ACRO does not get SIMPLE mode ability
#if FRAME_CONFIG == HELI_FRAME
if (motors.flyarbar_mode == 1){
g.rc_1.servo_out = g.rc_1.control_in;
g.rc_2.servo_out = g.rc_2.control_in;
} else {
g.rc_1.servo_out = get_acro_roll(g.rc_1.control_in);
g.rc_2.servo_out = get_acro_pitch(g.rc_2.control_in);
}
#else
g.rc_1.servo_out = get_acro_roll(g.rc_1.control_in);
g.rc_2.servo_out = get_acro_pitch(g.rc_2.control_in);
#endif
}
break;

4
libraries/AP_Motors/AP_MotorsHeli.h

@ -39,6 +39,10 @@ @@ -39,6 +39,10 @@
#define AP_MOTORSHELI_RSC_MODE_CH8_PASSTHROUGH 1
#define AP_MOTORSHELI_RSC_MODE_EXT_GOV 2
// head definitions
#define FLYBARLESS_HEAD 0
#define FLYBAR_HEAD 1
class AP_HeliControls;

Loading…
Cancel
Save