diff --git a/Tools/autotest/models/xplane_heli.json b/Tools/autotest/models/xplane_heli.json new file mode 100644 index 0000000000..e6e3265015 --- /dev/null +++ b/Tools/autotest/models/xplane_heli.json @@ -0,0 +1,33 @@ +# XPlane DREF map file for a simple plane +# assumes: Aileron, Elevator, Throttle, Rudder, flaps + +{ + "settings" : { "debug" : 1 }, + + "sim/operation/override/override_joystick" : { "type" : "fixed", "value" : 1 }, + "sim/operation/override/override_flightcontrol" : { "type" : "fixed", "value" : 0 }, + "sim/operation/override/override_throttles" : { "type" : "fixed", "value" : 1 }, + "sim/operation/override/override_prop_pitch" : { "type" : "fixed", "value" : 0 }, + + # throttle + "sim/cockpit2/engine/actuators/prop_ratio[0]" : { "type" : "range", "range" : 1, "channel" : 3 }, + "laminar/r22/rotor_collective_ratio" : { "type" : "range", "range" : 1, "channel" : 3 }, + "sim/cockpit2/engine/actuators/prop_ratio_all" : { "type" : "range", "range" : 1, "channel" : 3 }, + "sim/flightmodel/engine/ENGN_thro_use[0]" : { "type" : "range", "range" : 1, "channel" : 8 }, + + # control surfaces, using yoke positions not surface overrides + "sim/joystick/yoke_roll_ratio" : { "type" : "angle", "range" : 1, "channel" : 1 }, + "sim/joystick/yoke_pitch_ratio" : { "type" : "angle", "range" : 1, "channel" : 2 }, + "sim/joystick/yoke_heading_ratio" : { "type" : "angle", "range" : 1, "channel" : 4 }, + + # joystick inputs + "axis6" : { "type" : "joyaxis", "channel" : 1, "input_min" : 0.2, "input_max" : 0.8 }, + "axis5" : { "type" : "joyaxis", "channel" : 2, "input_min" : 0.2, "input_max" : 0.8 }, + "axis4" : { "type" : "joyaxis", "channel" : 3, "input_min" : 0.8, "input_max" : 0.2 }, + "axis2" : { "type" : "joyaxis", "channel" : 4, "input_min" : 0.2, "input_max" : 0.9 }, + "axis3" : { "type" : "joyaxis", "channel" : 5, "input_min" : 0.2, "input_max" : 0.9 }, + "button1" : { "channel" : 6, "mask" : 1 }, + "button2" : { "channel" : 7, "mask" : 2 }, + "button3" : { "type" : "joybutton", "channel" : 8, "mask" : 24 }, + "button4" : { "type" : "joybutton", "channel" : 9, "mask" : 4 } +} diff --git a/Tools/autotest/models/xplane_plane.json b/Tools/autotest/models/xplane_plane.json new file mode 100644 index 0000000000..871b18d288 --- /dev/null +++ b/Tools/autotest/models/xplane_plane.json @@ -0,0 +1,34 @@ +# XPlane DREF map file for a simple plane +# assumes: Aileron, Elevator, Throttle, Rudder, flaps + +{ + "settings" : { "debug" : 0 }, + + "sim/operation/override/override_joystick" : { "type" : "fixed", "value" : 1 }, + "sim/operation/override/override_throttles" : { "type" : "fixed", "value" : 1 }, + + # forward throttle, up to 4 engines + "sim/flightmodel/engine/ENGN_thro_use[0]" : { "type" : "range", "range" : 1, "channel" : 3 }, + "sim/flightmodel/engine/ENGN_thro_use[1]" : { "type" : "range", "range" : 1, "channel" : 3 }, + "sim/flightmodel/engine/ENGN_thro_use[2]" : { "type" : "range", "range" : 1, "channel" : 3 }, + "sim/flightmodel/engine/ENGN_thro_use[3]" : { "type" : "range", "range" : 1, "channel" : 3 }, + + # control surfaces, using yoke positions not surface overrides + "sim/joystick/yoke_roll_ratio" : { "type" : "angle", "range" : 1, "channel" : 1 }, + "sim/joystick/yoke_pitch_ratio" : { "type" : "angle", "range" : 1, "channel" : 2 }, + "sim/joystick/yoke_heading_ratio" : { "type" : "angle", "range" : 1, "channel" : 4 }, + + # assume flaps on channel 5 + "sim/cockpit2/controls/flap_ratio" : { "type" : "range", "range" : 1, "channel" : 5 }, + + # joystick inputs + "axis6" : { "type" : "joyaxis", "channel" : 1, "input_min" : 0.2, "input_max" : 0.8 }, + "axis5" : { "type" : "joyaxis", "channel" : 2, "input_min" : 0.2, "input_max" : 0.8 }, + "axis4" : { "type" : "joyaxis", "channel" : 3, "input_min" : 0.8, "input_max" : 0.2 }, + "axis2" : { "type" : "joyaxis", "channel" : 4, "input_min" : 0.2, "input_max" : 0.9 }, + "axis3" : { "type" : "joyaxis", "channel" : 5, "input_min" : 0.2, "input_max" : 0.9 }, + "button1" : { "channel" : 6, "mask" : 1 }, + "button2" : { "channel" : 7, "mask" : 2 }, + "button3" : { "type" : "joybutton", "channel" : 8, "mask" : 24 }, + "button4" : { "type" : "joybutton", "channel" : 9, "mask" : 4 } +}