<airframe name="wirly_ng">

 <!-- commands section -->
  <servos>
    <servo name="ELEVATOR1"  no="0" min="1129" neutral="1277" max="1466"/>
    <servo name="ELEVATOR2"  no="1" min="1251" neutral="1486" max="1638"/>
    <servo name="FLAP1"      no="2" min="1700" neutral="1450" max="1200"/>
    <servo name="FLAP2"      no="3" min="1700" neutral="1450" max="1200"/>
  </servos>


  <commands>
    <axis name="THROTTLE" failsafe_value="0"/>
    <axis name="ELEVATOR1" failsafe_value="0"/>
    <axis name="ELEVATOR2" failsafe_value="0"/>
    <axis name="FLAP1" failsafe_value="0"/>
    <axis name="FLAP2" failsafe_value="0"/>
 </commands>

 <command_laws>
    <set servo="ELEVATOR1"  value="@ELEVATOR1"/>
    <set servo="ELEVATOR2"  value="@ELEVATOR2"/>
    <set servo="FLAP1"      value="@FLAP1"/>
    <set servo="FLAP2"      value="@FLAP2"/>
 </command_laws>


  <section name="CONTROL">

    <define name="CTL_ELEVATOR_PITCH_KP" value="10000."/>
    <define name="CTL_ELEVATOR_PITCH_KI" value="  100."/>
    <define name="CTL_ELEVATOR_PITCH_KD" value="    0."/>
    <define name="CTL_FLAP_PITCH_KP"     value="30000."/>
    <define name="CTL_FLAP_PITCH_KI"     value="    0."/>
    <define name="CTL_FLAP_PITCH_KD"     value="    0."/>

    <define name="CTL_ELEVATOR_1_TRIM"   value="    0."/>
    <define name="CTL_ELEVATOR_2_TRIM"   value="    0."/>
    <define name="CTL_FLAP_1_TRIM"       value="    0."/>
    <define name="CTL_FLAP_2_TRIM"       value="    0."/>

  </section>


  <section name="ELEVATOR_CONTROL">
    <define name="DEFAULT_ELEVATOR1_TRIM" value="0"/>
    <define name="DEFAULT_ELEVATOR2_TRIM" value="0."/>
    <define name="DEFAULT_FLAP1_TRIM" value="0"/>
    <define name="DEFAULT_FLAP2_TRIM" value="0."/>
    <define name="DEFAULT_PLANE1_PITCH_OFFSET" value="0."/>
    <define name="DEFAULT_PLANE2_PITCH_OFFSET" value="0."/>
    <define name="DEFAULT_PLANE1_PHASE_OFFSET" value="225."/>
    <define name="DEFAULT_CYCLIC_SETPOINT" value="0."/>
    <define name="DEFAULT_COLLECTIVE_SETPOINT" value="0."/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_PITCH_KP" value="10000."/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_PITCH_KD" value="0."/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_PITCH_KI" value="100"/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_ROLL_KP" value="0."/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_ROLL_KD" value="0."/>
    <define name="DEFAULT_WHIRLY_ELEVATOR_FLAP_MIX" value="0."/>
    <define name="DEFAULT_WHIRLY_FLAP_PITCH_KP" value="30000."/>
    <define name="DEFAULT_WHIRLY_FLAP_PITCH_KD" value="0."/>
    <define name="DEFAULT_WHIRLY_FLAP_PITCH_KI" value="0"/>
    <define name="DEFAULT_WHIRLY_FLAP_ROLL_KP" value="0."/>
    <define name="DEFAULT_WHIRLY_FLAP_ROLL_KD" value="0."/>
    <define name="DEFAULT_WHIRLY_ROLL_PHASE" value="90."/>
    <define name="DEFAULT_ITERM_WINDOW" value="360."/>
    <define name="DEFAULT_PITCH_DT" value="1."/>
    <define name="DEFAULT_ROLL_DT" value="1."/>
  </section>

  <makefile>


USER =
HOST = whirly-dev
TARGET_DIR  = ~

<!--ap.CFLAGS += -DDISABLE_CAN=1-->
ap.CFLAGS += -DTELEMETRY_MODE_DEFAULT=TELEMETRY_MODE_Main_default

include $(PAPARAZZI_SRC)/conf/firmwares/whirly_ap.makefile

  </makefile>

</airframe>
