From b5e6445b15f05dff71fe9309f55fd883aea43770 Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Sun, 23 Oct 2011 17:48:00 +0800 Subject: [PATCH] APM Planner 1.0.85 add more joystick channels - and a trim passthrough --- Tools/ArdupilotMegaPlanner/CurrentState.cs | 77 +- Tools/ArdupilotMegaPlanner/Joystick.cs | 36 +- .../JoystickSetup.Designer.cs | 276 ++++++- Tools/ArdupilotMegaPlanner/JoystickSetup.cs | 125 ++- Tools/ArdupilotMegaPlanner/JoystickSetup.resx | 763 ++++++++++++++++-- Tools/ArdupilotMegaPlanner/MAVLink.cs | 8 +- Tools/ArdupilotMegaPlanner/MainV2.cs | 20 +- Tools/ArdupilotMegaPlanner/MavlinkLog.cs | 4 +- .../Properties/AssemblyInfo.cs | 2 +- Tools/ArdupilotMegaPlanner/SerialOutput.cs | 13 +- .../Release/ArdupilotMegaPlanner.application | 2 +- .../bin/Release/JoystickSetup.resx | 763 ++++++++++++++++-- 12 files changed, 1921 insertions(+), 168 deletions(-) diff --git a/Tools/ArdupilotMegaPlanner/CurrentState.cs b/Tools/ArdupilotMegaPlanner/CurrentState.cs index 8febc24fd3..9a5b0f3166 100644 --- a/Tools/ArdupilotMegaPlanner/CurrentState.cs +++ b/Tools/ArdupilotMegaPlanner/CurrentState.cs @@ -147,6 +147,10 @@ namespace ArdupilotMega public ushort rcoverridech2 { get; set; } public ushort rcoverridech3 { get; set; } public ushort rcoverridech4 { get; set; } + public ushort rcoverridech5 { get; set; } + public ushort rcoverridech6 { get; set; } + public ushort rcoverridech7 { get; set; } + public ushort rcoverridech8 { get; set; } // current firmware public MainV2.Firmwares firmware = MainV2.Firmwares.ArduPlane; @@ -187,10 +191,15 @@ namespace ArdupilotMega public void UpdateCurrentSettings(System.Windows.Forms.BindingSource bs) { - UpdateCurrentSettings(bs, false); + UpdateCurrentSettings(bs, false, MainV2.comPort); } public void UpdateCurrentSettings(System.Windows.Forms.BindingSource bs, bool updatenow) + { + UpdateCurrentSettings(bs, false, MainV2.comPort); + } + + public void UpdateCurrentSettings(System.Windows.Forms.BindingSource bs, bool updatenow, MAVLink mavinterface) { if (DateTime.Now > lastupdate.AddMilliseconds(19) || updatenow) // 50 hz { @@ -203,10 +212,10 @@ namespace ArdupilotMega } // Console.WriteLine("Updating CurrentState " + DateTime.Now.Millisecond); - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] != null) // status text + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] != null) // status text { - string logdata = DateTime.Now + " " + Encoding.ASCII.GetString(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT], 6, MAVLink.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT].Length - 6); + string logdata = DateTime.Now + " " + Encoding.ASCII.GetString(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT], 6, mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT].Length - 6); int ind = logdata.IndexOf('\0'); if (ind != -1) @@ -217,16 +226,16 @@ namespace ArdupilotMega } messages.Add(logdata + "\n"); - MAVLink.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] = null; + mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED] != null) // hil + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED] != null) // hil { var hil = new ArdupilotMega.MAVLink.__mavlink_rc_channels_scaled_t(); object temp = hil; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED], ref temp, 6); hil = (MAVLink.__mavlink_rc_channels_scaled_t)(temp); @@ -242,13 +251,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_SCALED] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT] != null) { MAVLink.__mavlink_nav_controller_output_t nav = new MAVLink.__mavlink_nav_controller_output_t(); object temp = nav; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT], ref temp, 6); nav = (MAVLink.__mavlink_nav_controller_output_t)(temp); @@ -264,13 +273,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT] = null; } - if (MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] != null) + if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] != null) { ArdupilotMega.MAVLink.__mavlink_sys_status_t sysstatus = new ArdupilotMega.MAVLink.__mavlink_sys_status_t(); object temp = sysstatus; - MAVLink.ByteArrayToStructure(MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS], ref temp, 6); sysstatus = (ArdupilotMega.MAVLink.__mavlink_sys_status_t)(temp); @@ -377,13 +386,13 @@ namespace ArdupilotMega //MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_SYS_STATUS] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE] != null) { var att = new ArdupilotMega.MAVLink.__mavlink_attitude_t(); object temp = att; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE], ref temp, 6); att = (MAVLink.__mavlink_attitude_t)(temp); @@ -396,13 +405,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_ATTITUDE] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] != null) { var gps = new MAVLink.__mavlink_gps_raw_t(); object temp = gps; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW], ref temp, 6); gps = (MAVLink.__mavlink_gps_raw_t)(temp); @@ -421,26 +430,26 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_RAW] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS] != null) { var gps = new MAVLink.__mavlink_gps_status_t(); object temp = gps; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GPS_STATUS], ref temp, 6); gps = (MAVLink.__mavlink_gps_status_t)(temp); satcount = gps.satellites_visible; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT] != null) { var loc = new MAVLink.__mavlink_global_position_int_t(); object temp = loc; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT], ref temp, 6); loc = (MAVLink.__mavlink_global_position_int_t)(temp); @@ -449,13 +458,13 @@ namespace ArdupilotMega lng = loc.lon / 10000000.0f; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION] != null) { var loc = new MAVLink.__mavlink_global_position_t(); object temp = loc; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_GLOBAL_POSITION], ref temp, 6); loc = (MAVLink.__mavlink_global_position_t)(temp); @@ -464,13 +473,13 @@ namespace ArdupilotMega lng = loc.lon; } - if (MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] != null) + if (mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] != null) { ArdupilotMega.MAVLink.__mavlink_waypoint_current_t wpcur = new ArdupilotMega.MAVLink.__mavlink_waypoint_current_t(); object temp = wpcur; - MAVLink.ByteArrayToStructure(MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT], ref temp, 6); wpcur = (ArdupilotMega.MAVLink.__mavlink_waypoint_current_t)(temp); @@ -486,13 +495,13 @@ namespace ArdupilotMega //MAVLink.packets[ArdupilotMega.MAVLink.MAVLINK_MSG_ID_WAYPOINT_CURRENT] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW] != null) { var rcin = new MAVLink.__mavlink_rc_channels_raw_t(); object temp = rcin; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW], ref temp, 6); rcin = (MAVLink.__mavlink_rc_channels_raw_t)(temp); @@ -508,13 +517,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RC_CHANNELS_RAW] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW] != null) { var servoout = new MAVLink.__mavlink_servo_output_raw_t(); object temp = servoout; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW], ref temp, 6); servoout = (MAVLink.__mavlink_servo_output_raw_t)(temp); @@ -530,13 +539,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SERVO_OUTPUT_RAW] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] != null) { var imu = new MAVLink.__mavlink_raw_imu_t(); object temp = imu; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU], ref temp, 6); imu = (MAVLink.__mavlink_raw_imu_t)(temp); @@ -551,13 +560,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU] != null) { var imu = new MAVLink.__mavlink_scaled_imu_t(); object temp = imu; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_SCALED_IMU], ref temp, 6); imu = (MAVLink.__mavlink_scaled_imu_t)(temp); @@ -572,13 +581,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_RAW_IMU] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD] != null) + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD] != null) { MAVLink.__mavlink_vfr_hud_t vfr = new MAVLink.__mavlink_vfr_hud_t(); object temp = vfr; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD], ref temp, 6); vfr = (MAVLink.__mavlink_vfr_hud_t)(temp); @@ -602,13 +611,13 @@ namespace ArdupilotMega //MAVLink.packets[MAVLink.MAVLINK_MSG_ID_VFR_HUD] = null; } - if (MAVLink.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO] != null) // hil + if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO] != null) // hil { var mem = new ArdupilotMega.MAVLink.__mavlink_meminfo_t(); object temp = mem; - MAVLink.ByteArrayToStructure(MAVLink.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO], ref temp, 6); + MAVLink.ByteArrayToStructure(mavinterface.packets[MAVLink.MAVLINK_MSG_ID_MEMINFO], ref temp, 6); mem = (MAVLink.__mavlink_meminfo_t)(temp); diff --git a/Tools/ArdupilotMegaPlanner/Joystick.cs b/Tools/ArdupilotMegaPlanner/Joystick.cs index d0bbc9eed8..6f933dad57 100644 --- a/Tools/ArdupilotMegaPlanner/Joystick.cs +++ b/Tools/ArdupilotMegaPlanner/Joystick.cs @@ -47,7 +47,7 @@ namespace ArdupilotMega self = this; } - JoyChannel[] JoyChannels = new JoyChannel[5]; // we are base 1 + JoyChannel[] JoyChannels = new JoyChannel[9]; // we are base 1 JoyButton[] JoyButtons = new JoyButton[128]; // base 0 public static DeviceList getDevices() @@ -301,16 +301,22 @@ namespace ArdupilotMega ushort roll = pickchannel(1, JoyChannels[1].axis, false, JoyChannels[1].expo); ushort pitch = pickchannel(2, JoyChannels[2].axis, false, JoyChannels[2].expo); - MainV2.cs.rcoverridech1 = (ushort)(BOOL_TO_SIGN(JoyChannels[1].reverse) * ((int)(pitch - 1500) - (int)(roll - 1500)) / 2 + 1500); - MainV2.cs.rcoverridech2 = (ushort)(BOOL_TO_SIGN(JoyChannels[2].reverse) * ((int)(pitch - 1500) + (int)(roll - 1500)) / 2 + 1500); + if (getJoystickAxis(1) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech1 = (ushort)(BOOL_TO_SIGN(JoyChannels[1].reverse) * ((int)(pitch - 1500) - (int)(roll - 1500)) / 2 + 1500); + if (getJoystickAxis(2) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech2 = (ushort)(BOOL_TO_SIGN(JoyChannels[2].reverse) * ((int)(pitch - 1500) + (int)(roll - 1500)) / 2 + 1500); } else { - MainV2.cs.rcoverridech1 = pickchannel(1, JoyChannels[1].axis, JoyChannels[1].reverse, JoyChannels[1].expo);//(ushort)(((int)state.Rz / 65.535) + 1000); - MainV2.cs.rcoverridech2 = pickchannel(2, JoyChannels[2].axis, JoyChannels[2].reverse, JoyChannels[2].expo);//(ushort)(((int)state.Y / 65.535) + 1000); + if (getJoystickAxis(1) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech1 = pickchannel(1, JoyChannels[1].axis, JoyChannels[1].reverse, JoyChannels[1].expo);//(ushort)(((int)state.Rz / 65.535) + 1000); + if (getJoystickAxis(2) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech2 = pickchannel(2, JoyChannels[2].axis, JoyChannels[2].reverse, JoyChannels[2].expo);//(ushort)(((int)state.Y / 65.535) + 1000); } - MainV2.cs.rcoverridech3 = pickchannel(3, JoyChannels[3].axis, JoyChannels[3].reverse, JoyChannels[3].expo);//(ushort)(1000 - ((int)slider[0] / 65.535) + 1000); - MainV2.cs.rcoverridech4 = pickchannel(4, JoyChannels[4].axis, JoyChannels[4].reverse, JoyChannels[4].expo);//(ushort)(((int)state.X / 65.535) + 1000); + if (getJoystickAxis(3) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech3 = pickchannel(3, JoyChannels[3].axis, JoyChannels[3].reverse, JoyChannels[3].expo);//(ushort)(1000 - ((int)slider[0] / 65.535) + 1000); + if (getJoystickAxis(4) != Joystick.joystickaxis.None) + MainV2.cs.rcoverridech4 = pickchannel(4, JoyChannels[4].axis, JoyChannels[4].reverse, JoyChannels[4].expo);//(ushort)(((int)state.X / 65.535) + 1000); foreach (JoyButton but in JoyButtons) { @@ -349,6 +355,7 @@ namespace ArdupilotMega public enum joystickaxis { None, + Pass, ARx, ARy, ARz, @@ -462,6 +469,15 @@ namespace ArdupilotMega return joystick.Caps.NumberButtons; } + public joystickaxis getJoystickAxis(int channel) + { + try + { + return JoyChannels[channel].axis; + } + catch { return joystickaxis.None; } + } + public bool isButtonPressed(int buttonno) { byte[] buts = state.GetButtons(); @@ -510,6 +526,12 @@ namespace ArdupilotMega switch (axis) { + case joystickaxis.None: + working = ushort.MaxValue / 2; + break; + case joystickaxis.Pass: + working = (int)(((float)(trim - min) / range) * ushort.MaxValue); + break; case joystickaxis.ARx: working = state.ARx; break; diff --git a/Tools/ArdupilotMegaPlanner/JoystickSetup.Designer.cs b/Tools/ArdupilotMegaPlanner/JoystickSetup.Designer.cs index 015970a315..567ecfd7c9 100644 --- a/Tools/ArdupilotMegaPlanner/JoystickSetup.Designer.cs +++ b/Tools/ArdupilotMegaPlanner/JoystickSetup.Designer.cs @@ -53,6 +53,25 @@ this.label8 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.timer1 = new System.Windows.Forms.Timer(this.components); + this.CHK_elevons = new System.Windows.Forms.CheckBox(); + this.revCH5 = new System.Windows.Forms.CheckBox(); + this.label10 = new System.Windows.Forms.Label(); + this.expo_ch5 = new System.Windows.Forms.TextBox(); + this.CMB_CH5 = new System.Windows.Forms.ComboBox(); + this.revCH6 = new System.Windows.Forms.CheckBox(); + this.label11 = new System.Windows.Forms.Label(); + this.expo_ch6 = new System.Windows.Forms.TextBox(); + this.CMB_CH6 = new System.Windows.Forms.ComboBox(); + this.revCH7 = new System.Windows.Forms.CheckBox(); + this.label12 = new System.Windows.Forms.Label(); + this.expo_ch7 = new System.Windows.Forms.TextBox(); + this.CMB_CH7 = new System.Windows.Forms.ComboBox(); + this.revCH8 = new System.Windows.Forms.CheckBox(); + this.label13 = new System.Windows.Forms.Label(); + this.expo_ch8 = new System.Windows.Forms.TextBox(); + this.CMB_CH8 = new System.Windows.Forms.ComboBox(); + this.BUT_detch8 = new ArdupilotMega.MyButton(); + this.horizontalProgressBar4 = new ArdupilotMega.HorizontalProgressBar(); this.BUT_detch4 = new ArdupilotMega.MyButton(); this.BUT_detch3 = new ArdupilotMega.MyButton(); this.BUT_detch2 = new ArdupilotMega.MyButton(); @@ -63,7 +82,12 @@ this.progressBar3 = new ArdupilotMega.HorizontalProgressBar(); this.progressBar2 = new ArdupilotMega.HorizontalProgressBar(); this.progressBar1 = new ArdupilotMega.HorizontalProgressBar(); - this.CHK_elevons = new System.Windows.Forms.CheckBox(); + this.BUT_detch5 = new ArdupilotMega.MyButton(); + this.horizontalProgressBar1 = new ArdupilotMega.HorizontalProgressBar(); + this.BUT_detch6 = new ArdupilotMega.MyButton(); + this.horizontalProgressBar2 = new ArdupilotMega.HorizontalProgressBar(); + this.BUT_detch7 = new ArdupilotMega.MyButton(); + this.horizontalProgressBar3 = new ArdupilotMega.HorizontalProgressBar(); this.SuspendLayout(); // // CMB_joysticks @@ -224,6 +248,151 @@ this.timer1.Enabled = true; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // + // CHK_elevons + // + resources.ApplyResources(this.CHK_elevons, "CHK_elevons"); + this.CHK_elevons.Name = "CHK_elevons"; + this.CHK_elevons.UseVisualStyleBackColor = true; + this.CHK_elevons.CheckedChanged += new System.EventHandler(this.CHK_elevons_CheckedChanged); + // + // revCH5 + // + resources.ApplyResources(this.revCH5, "revCH5"); + this.revCH5.Name = "revCH5"; + this.revCH5.UseVisualStyleBackColor = true; + this.revCH5.CheckedChanged += new System.EventHandler(this.revCH5_CheckedChanged); + // + // label10 + // + resources.ApplyResources(this.label10, "label10"); + this.label10.Name = "label10"; + // + // expo_ch5 + // + this.expo_ch5.BorderStyle = System.Windows.Forms.BorderStyle.None; + resources.ApplyResources(this.expo_ch5, "expo_ch5"); + this.expo_ch5.Name = "expo_ch5"; + // + // CMB_CH5 + // + this.CMB_CH5.FormattingEnabled = true; + this.CMB_CH5.Items.AddRange(new object[] { + resources.GetString("CMB_CH5.Items"), + resources.GetString("CMB_CH5.Items1"), + resources.GetString("CMB_CH5.Items2"), + resources.GetString("CMB_CH5.Items3")}); + resources.ApplyResources(this.CMB_CH5, "CMB_CH5"); + this.CMB_CH5.Name = "CMB_CH5"; + this.CMB_CH5.SelectedIndexChanged += new System.EventHandler(this.CMB_CH5_SelectedIndexChanged); + // + // revCH6 + // + resources.ApplyResources(this.revCH6, "revCH6"); + this.revCH6.Name = "revCH6"; + this.revCH6.UseVisualStyleBackColor = true; + this.revCH6.CheckedChanged += new System.EventHandler(this.revCH6_CheckedChanged); + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // + // expo_ch6 + // + this.expo_ch6.BorderStyle = System.Windows.Forms.BorderStyle.None; + resources.ApplyResources(this.expo_ch6, "expo_ch6"); + this.expo_ch6.Name = "expo_ch6"; + // + // CMB_CH6 + // + this.CMB_CH6.FormattingEnabled = true; + this.CMB_CH6.Items.AddRange(new object[] { + resources.GetString("CMB_CH6.Items"), + resources.GetString("CMB_CH6.Items1"), + resources.GetString("CMB_CH6.Items2"), + resources.GetString("CMB_CH6.Items3")}); + resources.ApplyResources(this.CMB_CH6, "CMB_CH6"); + this.CMB_CH6.Name = "CMB_CH6"; + this.CMB_CH6.SelectedIndexChanged += new System.EventHandler(this.CMB_CH6_SelectedIndexChanged); + // + // revCH7 + // + resources.ApplyResources(this.revCH7, "revCH7"); + this.revCH7.Name = "revCH7"; + this.revCH7.UseVisualStyleBackColor = true; + this.revCH7.CheckedChanged += new System.EventHandler(this.revCH7_CheckedChanged); + // + // label12 + // + resources.ApplyResources(this.label12, "label12"); + this.label12.Name = "label12"; + // + // expo_ch7 + // + this.expo_ch7.BorderStyle = System.Windows.Forms.BorderStyle.None; + resources.ApplyResources(this.expo_ch7, "expo_ch7"); + this.expo_ch7.Name = "expo_ch7"; + // + // CMB_CH7 + // + this.CMB_CH7.FormattingEnabled = true; + this.CMB_CH7.Items.AddRange(new object[] { + resources.GetString("CMB_CH7.Items"), + resources.GetString("CMB_CH7.Items1"), + resources.GetString("CMB_CH7.Items2"), + resources.GetString("CMB_CH7.Items3")}); + resources.ApplyResources(this.CMB_CH7, "CMB_CH7"); + this.CMB_CH7.Name = "CMB_CH7"; + this.CMB_CH7.SelectedIndexChanged += new System.EventHandler(this.CMB_CH7_SelectedIndexChanged); + // + // revCH8 + // + resources.ApplyResources(this.revCH8, "revCH8"); + this.revCH8.Name = "revCH8"; + this.revCH8.UseVisualStyleBackColor = true; + this.revCH8.CheckedChanged += new System.EventHandler(this.revCH8_CheckedChanged); + // + // label13 + // + resources.ApplyResources(this.label13, "label13"); + this.label13.Name = "label13"; + // + // expo_ch8 + // + this.expo_ch8.BorderStyle = System.Windows.Forms.BorderStyle.None; + resources.ApplyResources(this.expo_ch8, "expo_ch8"); + this.expo_ch8.Name = "expo_ch8"; + // + // CMB_CH8 + // + this.CMB_CH8.FormattingEnabled = true; + this.CMB_CH8.Items.AddRange(new object[] { + resources.GetString("CMB_CH8.Items"), + resources.GetString("CMB_CH8.Items1"), + resources.GetString("CMB_CH8.Items2"), + resources.GetString("CMB_CH8.Items3")}); + resources.ApplyResources(this.CMB_CH8, "CMB_CH8"); + this.CMB_CH8.Name = "CMB_CH8"; + this.CMB_CH8.SelectedIndexChanged += new System.EventHandler(this.CMB_CH8_SelectedIndexChanged); + // + // BUT_detch8 + // + resources.ApplyResources(this.BUT_detch8, "BUT_detch8"); + this.BUT_detch8.Name = "BUT_detch8"; + this.BUT_detch8.UseVisualStyleBackColor = true; + this.BUT_detch8.Click += new System.EventHandler(this.BUT_detch8_Click); + // + // horizontalProgressBar4 + // + resources.ApplyResources(this.horizontalProgressBar4, "horizontalProgressBar4"); + this.horizontalProgressBar4.Label = null; + this.horizontalProgressBar4.Maximum = 2200; + this.horizontalProgressBar4.maxline = 0; + this.horizontalProgressBar4.Minimum = 800; + this.horizontalProgressBar4.minline = 0; + this.horizontalProgressBar4.Name = "horizontalProgressBar4"; + this.horizontalProgressBar4.Value = 800; + // // BUT_detch4 // resources.ApplyResources(this.BUT_detch4, "BUT_detch4"); @@ -310,17 +479,88 @@ this.progressBar1.Name = "progressBar1"; this.progressBar1.Value = 800; // - // CHK_elevons + // BUT_detch5 // - resources.ApplyResources(this.CHK_elevons, "CHK_elevons"); - this.CHK_elevons.Name = "CHK_elevons"; - this.CHK_elevons.UseVisualStyleBackColor = true; - this.CHK_elevons.CheckedChanged += new System.EventHandler(this.CHK_elevons_CheckedChanged); + resources.ApplyResources(this.BUT_detch5, "BUT_detch5"); + this.BUT_detch5.Name = "BUT_detch5"; + this.BUT_detch5.UseVisualStyleBackColor = true; + this.BUT_detch5.Click += new System.EventHandler(this.BUT_detch5_Click); + // + // horizontalProgressBar1 + // + resources.ApplyResources(this.horizontalProgressBar1, "horizontalProgressBar1"); + this.horizontalProgressBar1.Label = null; + this.horizontalProgressBar1.Maximum = 2200; + this.horizontalProgressBar1.maxline = 0; + this.horizontalProgressBar1.Minimum = 800; + this.horizontalProgressBar1.minline = 0; + this.horizontalProgressBar1.Name = "horizontalProgressBar1"; + this.horizontalProgressBar1.Value = 800; + // + // BUT_detch6 + // + resources.ApplyResources(this.BUT_detch6, "BUT_detch6"); + this.BUT_detch6.Name = "BUT_detch6"; + this.BUT_detch6.UseVisualStyleBackColor = true; + this.BUT_detch6.Click += new System.EventHandler(this.BUT_detch6_Click); + // + // horizontalProgressBar2 + // + resources.ApplyResources(this.horizontalProgressBar2, "horizontalProgressBar2"); + this.horizontalProgressBar2.Label = null; + this.horizontalProgressBar2.Maximum = 2200; + this.horizontalProgressBar2.maxline = 0; + this.horizontalProgressBar2.Minimum = 800; + this.horizontalProgressBar2.minline = 0; + this.horizontalProgressBar2.Name = "horizontalProgressBar2"; + this.horizontalProgressBar2.Value = 800; + // + // BUT_detch7 + // + resources.ApplyResources(this.BUT_detch7, "BUT_detch7"); + this.BUT_detch7.Name = "BUT_detch7"; + this.BUT_detch7.UseVisualStyleBackColor = true; + this.BUT_detch7.Click += new System.EventHandler(this.BUT_detch7_Click); + // + // horizontalProgressBar3 + // + resources.ApplyResources(this.horizontalProgressBar3, "horizontalProgressBar3"); + this.horizontalProgressBar3.Label = null; + this.horizontalProgressBar3.Maximum = 2200; + this.horizontalProgressBar3.maxline = 0; + this.horizontalProgressBar3.Minimum = 800; + this.horizontalProgressBar3.minline = 0; + this.horizontalProgressBar3.Name = "horizontalProgressBar3"; + this.horizontalProgressBar3.Value = 800; // // JoystickSetup // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.BUT_detch8); + this.Controls.Add(this.revCH8); + this.Controls.Add(this.label13); + this.Controls.Add(this.expo_ch8); + this.Controls.Add(this.horizontalProgressBar4); + this.Controls.Add(this.CMB_CH8); + this.Controls.Add(this.BUT_detch7); + this.Controls.Add(this.revCH7); + this.Controls.Add(this.label12); + this.Controls.Add(this.expo_ch7); + this.Controls.Add(this.horizontalProgressBar3); + this.Controls.Add(this.CMB_CH7); + this.Controls.Add(this.BUT_detch6); + this.Controls.Add(this.revCH6); + this.Controls.Add(this.label11); + this.Controls.Add(this.expo_ch6); + this.Controls.Add(this.horizontalProgressBar2); + this.Controls.Add(this.CMB_CH6); + this.Controls.Add(this.BUT_detch5); + this.Controls.Add(this.revCH5); + this.Controls.Add(this.label10); + this.Controls.Add(this.expo_ch5); + this.Controls.Add(this.horizontalProgressBar1); + this.Controls.Add(this.CMB_CH5); this.Controls.Add(this.CHK_elevons); this.Controls.Add(this.BUT_detch4); this.Controls.Add(this.BUT_detch3); @@ -398,5 +638,29 @@ private MyButton BUT_detch3; private MyButton BUT_detch4; private System.Windows.Forms.CheckBox CHK_elevons; + private MyButton BUT_detch5; + private System.Windows.Forms.CheckBox revCH5; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox expo_ch5; + private HorizontalProgressBar horizontalProgressBar1; + private System.Windows.Forms.ComboBox CMB_CH5; + private MyButton BUT_detch6; + private System.Windows.Forms.CheckBox revCH6; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox expo_ch6; + private HorizontalProgressBar horizontalProgressBar2; + private System.Windows.Forms.ComboBox CMB_CH6; + private MyButton BUT_detch7; + private System.Windows.Forms.CheckBox revCH7; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.TextBox expo_ch7; + private HorizontalProgressBar horizontalProgressBar3; + private System.Windows.Forms.ComboBox CMB_CH7; + private MyButton BUT_detch8; + private System.Windows.Forms.CheckBox revCH8; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox expo_ch8; + private HorizontalProgressBar horizontalProgressBar4; + private System.Windows.Forms.ComboBox CMB_CH8; } } \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/JoystickSetup.cs b/Tools/ArdupilotMegaPlanner/JoystickSetup.cs index d5e8be68cc..7548c4935a 100644 --- a/Tools/ArdupilotMegaPlanner/JoystickSetup.cs +++ b/Tools/ArdupilotMegaPlanner/JoystickSetup.cs @@ -43,6 +43,10 @@ namespace ArdupilotMega CMB_CH2.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); CMB_CH3.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); CMB_CH4.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); + CMB_CH5.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); + CMB_CH6.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); + CMB_CH7.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); + CMB_CH8.DataSource = (Enum.GetValues(typeof(Joystick.joystickaxis))); try { @@ -51,18 +55,30 @@ namespace ArdupilotMega CMB_CH2.Text = MainV2.config["CMB_CH2"].ToString(); CMB_CH3.Text = MainV2.config["CMB_CH3"].ToString(); CMB_CH4.Text = MainV2.config["CMB_CH4"].ToString(); + CMB_CH5.Text = MainV2.config["CMB_CH5"].ToString(); + CMB_CH6.Text = MainV2.config["CMB_CH6"].ToString(); + CMB_CH7.Text = MainV2.config["CMB_CH7"].ToString(); + CMB_CH8.Text = MainV2.config["CMB_CH8"].ToString(); //revCH1 revCH1.Checked = bool.Parse(MainV2.config["revCH1"].ToString()); revCH2.Checked = bool.Parse(MainV2.config["revCH2"].ToString()); revCH3.Checked = bool.Parse(MainV2.config["revCH3"].ToString()); revCH4.Checked = bool.Parse(MainV2.config["revCH4"].ToString()); + revCH5.Checked = bool.Parse(MainV2.config["revCH5"].ToString()); + revCH6.Checked = bool.Parse(MainV2.config["revCH6"].ToString()); + revCH7.Checked = bool.Parse(MainV2.config["revCH7"].ToString()); + revCH8.Checked = bool.Parse(MainV2.config["revCH8"].ToString()); //expo_ch1 expo_ch1.Text = MainV2.config["expo_ch1"].ToString(); expo_ch2.Text = MainV2.config["expo_ch2"].ToString(); expo_ch3.Text = MainV2.config["expo_ch3"].ToString(); expo_ch4.Text = MainV2.config["expo_ch4"].ToString(); + expo_ch5.Text = MainV2.config["expo_ch5"].ToString(); + expo_ch6.Text = MainV2.config["expo_ch6"].ToString(); + expo_ch7.Text = MainV2.config["expo_ch7"].ToString(); + expo_ch8.Text = MainV2.config["expo_ch8"].ToString(); CHK_elevons.Checked = bool.Parse(MainV2.config["joy_elevons"].ToString()); } @@ -104,6 +120,10 @@ namespace ArdupilotMega joy.setChannel(2, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH2.Text), revCH2.Checked, int.Parse(expo_ch2.Text)); joy.setChannel(3, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH3.Text), revCH3.Checked, int.Parse(expo_ch3.Text)); joy.setChannel(4, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH4.Text), revCH4.Checked, int.Parse(expo_ch4.Text)); + joy.setChannel(5, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH5.Text), revCH5.Checked, int.Parse(expo_ch5.Text)); + joy.setChannel(6, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH6.Text), revCH6.Checked, int.Parse(expo_ch6.Text)); + joy.setChannel(7, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH7.Text), revCH7.Checked, int.Parse(expo_ch7.Text)); + joy.setChannel(8, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH8.Text), revCH8.Checked, int.Parse(expo_ch8.Text)); joy.elevons = CHK_elevons.Checked; @@ -153,13 +173,6 @@ namespace ArdupilotMega MainV2.joystick = null; BUT_enable.Text = "Enable"; } - - /* - MainV2.cs.rcoverridech1 = pickchannel(1, CMB_CH1.Text, revCH1.Checked, int.Parse(expo_ch1.Text));//(ushort)(((int)state.Rz / 65.535) + 1000); - MainV2.cs.rcoverridech2 = pickchannel(2, CMB_CH2.Text, revCH2.Checked, int.Parse(expo_ch2.Text));//(ushort)(((int)state.Y / 65.535) + 1000); - MainV2.cs.rcoverridech3 = pickchannel(3, CMB_CH3.Text, revCH3.Checked, int.Parse(expo_ch3.Text));//(ushort)(1000 - ((int)slider[0] / 65.535) + 1000); - MainV2.cs.rcoverridech4 = pickchannel(4, CMB_CH4.Text, revCH4.Checked, int.Parse(expo_ch4.Text));//(ushort)(((int)state.X / 65.535) + 1000); - */ } private void BUT_save_Click(object sender, EventArgs e) @@ -169,18 +182,30 @@ namespace ArdupilotMega MainV2.config["CMB_CH2"] = CMB_CH2.Text; MainV2.config["CMB_CH3"] = CMB_CH3.Text; MainV2.config["CMB_CH4"] = CMB_CH4.Text; + MainV2.config["CMB_CH5"] = CMB_CH5.Text; + MainV2.config["CMB_CH6"] = CMB_CH6.Text; + MainV2.config["CMB_CH7"] = CMB_CH7.Text; + MainV2.config["CMB_CH8"] = CMB_CH8.Text; //revCH1 MainV2.config["revCH1"] = revCH1.Checked; MainV2.config["revCH2"] = revCH2.Checked; MainV2.config["revCH3"] = revCH3.Checked; MainV2.config["revCH4"] = revCH4.Checked; + MainV2.config["revCH5"] = revCH5.Checked; + MainV2.config["revCH6"] = revCH6.Checked; + MainV2.config["revCH7"] = revCH7.Checked; + MainV2.config["revCH8"] = revCH8.Checked; //expo_ch1 MainV2.config["expo_ch1"] = expo_ch1.Text; MainV2.config["expo_ch2"] = expo_ch2.Text; MainV2.config["expo_ch3"] = expo_ch3.Text; MainV2.config["expo_ch4"] = expo_ch4.Text; + MainV2.config["expo_ch5"] = expo_ch5.Text; + MainV2.config["expo_ch6"] = expo_ch6.Text; + MainV2.config["expo_ch7"] = expo_ch7.Text; + MainV2.config["expo_ch8"] = expo_ch8.Text; MainV2.config["joy_elevons"] = CHK_elevons.Checked; @@ -207,6 +232,10 @@ namespace ArdupilotMega joy.setChannel(2, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH2.Text), revCH2.Checked, int.Parse(expo_ch2.Text)); joy.setChannel(3, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH3.Text), revCH3.Checked, int.Parse(expo_ch3.Text)); joy.setChannel(4, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH4.Text), revCH4.Checked, int.Parse(expo_ch4.Text)); + joy.setChannel(5, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH5.Text), revCH5.Checked, int.Parse(expo_ch5.Text)); + joy.setChannel(6, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH6.Text), revCH6.Checked, int.Parse(expo_ch6.Text)); + joy.setChannel(7, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH7.Text), revCH7.Checked, int.Parse(expo_ch7.Text)); + joy.setChannel(8, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), CMB_CH8.Text), revCH8.Checked, int.Parse(expo_ch8.Text)); joy.elevons = CHK_elevons.Checked; @@ -218,7 +247,7 @@ namespace ArdupilotMega { string name = (f + 1).ToString(); - doButtontoUI(name, 10, 195 + f * 25); + doButtontoUI(name, 10, 290 + f * 25); joy.setButton(f, int.Parse(this.Controls.Find("cmbbutton" + name, false)[0].Text), this.Controls.Find("cmbaction" + name, false)[0].Text); } @@ -236,6 +265,10 @@ namespace ArdupilotMega MainV2.cs.rcoverridech2 = joy.getValueForChannel(2, CMB_joysticks.Text); MainV2.cs.rcoverridech3 = joy.getValueForChannel(3, CMB_joysticks.Text); MainV2.cs.rcoverridech4 = joy.getValueForChannel(4, CMB_joysticks.Text); + MainV2.cs.rcoverridech5 = joy.getValueForChannel(5, CMB_joysticks.Text); + MainV2.cs.rcoverridech6 = joy.getValueForChannel(6, CMB_joysticks.Text); + MainV2.cs.rcoverridech7 = joy.getValueForChannel(7, CMB_joysticks.Text); + MainV2.cs.rcoverridech8 = joy.getValueForChannel(8, CMB_joysticks.Text); //Console.WriteLine(DateTime.Now.Millisecond + " end "); } @@ -246,6 +279,10 @@ namespace ArdupilotMega progressBar2.Value = MainV2.cs.rcoverridech2; progressBar3.Value = MainV2.cs.rcoverridech3; progressBar4.Value = MainV2.cs.rcoverridech4; + horizontalProgressBar1.Value = MainV2.cs.rcoverridech5; + horizontalProgressBar2.Value = MainV2.cs.rcoverridech6; + horizontalProgressBar3.Value = MainV2.cs.rcoverridech7; + horizontalProgressBar4.Value = MainV2.cs.rcoverridech8; try { @@ -432,5 +469,77 @@ namespace ArdupilotMega { MainV2.joystick.elevons = CHK_elevons.Checked; } + + private void CMB_CH5_SelectedIndexChanged(object sender, EventArgs e) + { + if (startup || MainV2.joystick == null) + return; + MainV2.joystick.setAxis(5, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), ((ComboBox)sender).Text)); + } + + private void CMB_CH6_SelectedIndexChanged(object sender, EventArgs e) + { + if (startup || MainV2.joystick == null) + return; + MainV2.joystick.setAxis(6, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), ((ComboBox)sender).Text)); + } + + private void CMB_CH7_SelectedIndexChanged(object sender, EventArgs e) + { + if (startup || MainV2.joystick == null) + return; + MainV2.joystick.setAxis(7, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), ((ComboBox)sender).Text)); + } + + private void CMB_CH8_SelectedIndexChanged(object sender, EventArgs e) + { + if (startup || MainV2.joystick == null) + return; + MainV2.joystick.setAxis(8, (Joystick.joystickaxis)Enum.Parse(typeof(Joystick.joystickaxis), ((ComboBox)sender).Text)); + } + + private void BUT_detch5_Click(object sender, EventArgs e) + { + CMB_CH5.Text = Joystick.getMovingAxis(CMB_joysticks.Text, 16000).ToString(); + } + + private void BUT_detch6_Click(object sender, EventArgs e) + { + CMB_CH6.Text = Joystick.getMovingAxis(CMB_joysticks.Text, 16000).ToString(); + } + + private void BUT_detch7_Click(object sender, EventArgs e) + { + CMB_CH7.Text = Joystick.getMovingAxis(CMB_joysticks.Text, 16000).ToString(); + } + + private void BUT_detch8_Click(object sender, EventArgs e) + { + CMB_CH8.Text = Joystick.getMovingAxis(CMB_joysticks.Text, 16000).ToString(); + } + + private void revCH5_CheckedChanged(object sender, EventArgs e) + { + if (MainV2.joystick != null) + MainV2.joystick.setReverse(5, ((CheckBox)sender).Checked); + } + + private void revCH6_CheckedChanged(object sender, EventArgs e) + { + if (MainV2.joystick != null) + MainV2.joystick.setReverse(6, ((CheckBox)sender).Checked); + } + + private void revCH7_CheckedChanged(object sender, EventArgs e) + { + if (MainV2.joystick != null) + MainV2.joystick.setReverse(7, ((CheckBox)sender).Checked); + } + + private void revCH8_CheckedChanged(object sender, EventArgs e) + { + if (MainV2.joystick != null) + MainV2.joystick.setReverse(8, ((CheckBox)sender).Checked); + } } } diff --git a/Tools/ArdupilotMegaPlanner/JoystickSetup.resx b/Tools/ArdupilotMegaPlanner/JoystickSetup.resx index eccf946e39..9b38147048 100644 --- a/Tools/ArdupilotMegaPlanner/JoystickSetup.resx +++ b/Tools/ArdupilotMegaPlanner/JoystickSetup.resx @@ -138,7 +138,7 @@ $this - 32 + 56 RZ @@ -171,7 +171,7 @@ $this - 31 + 55 RZ @@ -204,7 +204,7 @@ $this - 30 + 54 RZ @@ -237,7 +237,7 @@ $this - 29 + 53 RZ @@ -270,7 +270,7 @@ $this - 28 + 52 307, 70 @@ -294,7 +294,7 @@ $this - 23 + 47 307, 97 @@ -318,7 +318,7 @@ $this - 22 + 46 False @@ -345,7 +345,7 @@ $this - 21 + 45 307, 151 @@ -369,7 +369,7 @@ $this - 20 + 44 True @@ -400,7 +400,7 @@ $this - 19 + 43 True @@ -430,7 +430,7 @@ $this - 18 + 42 True @@ -460,7 +460,7 @@ $this - 17 + 41 True @@ -490,7 +490,7 @@ $this - 16 + 40 True @@ -517,7 +517,7 @@ $this - 15 + 39 True @@ -544,7 +544,7 @@ $this - 14 + 38 True @@ -571,7 +571,7 @@ $this - 13 + 37 True @@ -598,7 +598,7 @@ $this - 12 + 36 True @@ -628,7 +628,7 @@ $this - 9 + 33 True @@ -658,7 +658,7 @@ $this - 8 + 32 True @@ -688,7 +688,7 @@ $this - 7 + 31 True @@ -718,7 +718,7 @@ $this - 6 + 30 True @@ -748,11 +748,548 @@ $this - 5 + 29 17, 17 + + True + + + NoControl + + + 434, 81 + + + 64, 17 + + + 32 + + + Elevons + + + CHK_elevons + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 24 + + + True + + + NoControl + + + 413, 179 + + + 15, 14 + + + 37 + + + revCH5 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 19 + + + True + + + NoControl + + + 9, 181 + + + 31, 13 + + + 36 + + + CH 5 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 20 + + + 307, 180 + + + 100, 13 + + + 35 + + + 0 + + + expo_ch5 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 21 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 176 + + + 70, 21 + + + 33 + + + CMB_CH5 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 23 + + + True + + + NoControl + + + 413, 208 + + + 15, 14 + + + 43 + + + revCH6 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + True + + + NoControl + + + 9, 210 + + + 31, 13 + + + 42 + + + CH 6 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 14 + + + 307, 209 + + + 100, 13 + + + 41 + + + 0 + + + expo_ch6 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 15 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 205 + + + 70, 21 + + + 39 + + + CMB_CH6 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 17 + + + True + + + NoControl + + + 413, 237 + + + 15, 14 + + + 49 + + + revCH7 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + True + + + NoControl + + + 9, 239 + + + 31, 13 + + + 48 + + + CH 7 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + 307, 238 + + + 100, 13 + + + 47 + + + 0 + + + expo_ch7 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 234 + + + 70, 21 + + + 45 + + + CMB_CH7 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + + + True + + + NoControl + + + 413, 266 + + + 15, 14 + + + 55 + + + revCH8 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 9, 268 + + + 31, 13 + + + 54 + + + CH 8 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 307, 267 + + + 100, 13 + + + 53 + + + 0 + + + expo_ch8 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 263 + + + 70, 21 + + + 51 + + + CMB_CH8 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + NoControl + + + 148, 263 + + + 45, 23 + + + 56 + + + Auto Detect + + + BUT_detch8 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 0 + + + NoControl + + + 199, 262 + + + 100, 23 + + + 52 + + + horizontalProgressBar4 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 4 + NoControl @@ -778,7 +1315,7 @@ $this - 1 + 25 NoControl @@ -805,7 +1342,7 @@ $this - 2 + 26 NoControl @@ -832,7 +1369,7 @@ $this - 3 + 27 NoControl @@ -859,7 +1396,7 @@ $this - 4 + 28 NoControl @@ -886,7 +1423,7 @@ $this - 10 + 34 NoControl @@ -913,7 +1450,7 @@ $this - 11 + 35 NoControl @@ -937,7 +1474,7 @@ $this - 24 + 48 NoControl @@ -961,7 +1498,7 @@ $this - 25 + 49 NoControl @@ -985,7 +1522,7 @@ $this - 26 + 50 NoControl @@ -1009,34 +1546,160 @@ $this - 27 + 51 - - True + + NoControl - - 434, 81 + + 148, 176 - - 64, 17 + + 45, 23 - - 32 + + 38 - - Elevons + + Auto Detect - - CHK_elevons + + BUT_detch5 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c - + $this - - 0 + + 18 + + + NoControl + + + 199, 175 + + + 100, 23 + + + 34 + + + horizontalProgressBar1 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 22 + + + NoControl + + + 148, 205 + + + 45, 23 + + + 44 + + + Auto Detect + + + BUT_detch6 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 12 + + + NoControl + + + 199, 204 + + + 100, 23 + + + 40 + + + horizontalProgressBar2 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 16 + + + NoControl + + + 148, 234 + + + 45, 23 + + + 50 + + + Auto Detect + + + BUT_detch7 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 6 + + + NoControl + + + 199, 233 + + + 100, 23 + + + 46 + + + horizontalProgressBar3 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 10 True @@ -1045,7 +1708,7 @@ 6, 13 - 498, 220 + 498, 331 diff --git a/Tools/ArdupilotMegaPlanner/MAVLink.cs b/Tools/ArdupilotMegaPlanner/MAVLink.cs index 01b198c91c..6399558128 100644 --- a/Tools/ArdupilotMegaPlanner/MAVLink.cs +++ b/Tools/ArdupilotMegaPlanner/MAVLink.cs @@ -23,11 +23,11 @@ namespace ArdupilotMega public byte sysid = 0; public byte compid = 0; public Hashtable param = new Hashtable(); - public static byte[][] packets = new byte[256][]; + public byte[][] packets = new byte[256][]; public double[] packetspersecond = new double[256]; DateTime[] packetspersecondbuild = new DateTime[256]; - static object objlock = new object(); - static object readlock = new object(); + object objlock = new object(); + object readlock = new object(); object logwritelock = new object(); public DateTime lastvalidpacket = DateTime.Now; bool oldlogformat = false; @@ -44,7 +44,7 @@ namespace ArdupilotMega public BinaryReader logplaybackfile = null; public BinaryWriter logfile = null; - public static byte[] streams = new byte[256]; + public byte[] streams = new byte[256]; int bps1 = 0; int bps2 = 0; diff --git a/Tools/ArdupilotMegaPlanner/MainV2.cs b/Tools/ArdupilotMegaPlanner/MainV2.cs index fc89344aea..666c25b342 100644 --- a/Tools/ArdupilotMegaPlanner/MainV2.cs +++ b/Tools/ArdupilotMegaPlanner/MainV2.cs @@ -874,10 +874,22 @@ namespace ArdupilotMega rc.target_component = comPort.compid; rc.target_system = comPort.sysid; - rc.chan1_raw = cs.rcoverridech1;//(ushort)(((int)state.Rz / 65.535) + 1000); - rc.chan2_raw = cs.rcoverridech2;//(ushort)(((int)state.Y / 65.535) + 1000); - rc.chan3_raw = cs.rcoverridech3;//(ushort)(1000 - ((int)slider[0] / 65.535 ) + 1000); - rc.chan4_raw = cs.rcoverridech4;//(ushort)(((int)state.X / 65.535) + 1000); + if (joystick.getJoystickAxis(1) != Joystick.joystickaxis.None) + rc.chan1_raw = cs.rcoverridech1;//(ushort)(((int)state.Rz / 65.535) + 1000); + if (joystick.getJoystickAxis(2) != Joystick.joystickaxis.None) + rc.chan2_raw = cs.rcoverridech2;//(ushort)(((int)state.Y / 65.535) + 1000); + if (joystick.getJoystickAxis(3) != Joystick.joystickaxis.None) + rc.chan3_raw = cs.rcoverridech3;//(ushort)(1000 - ((int)slider[0] / 65.535 ) + 1000); + if (joystick.getJoystickAxis(4) != Joystick.joystickaxis.None) + rc.chan4_raw = cs.rcoverridech4;//(ushort)(((int)state.X / 65.535) + 1000); + if (joystick.getJoystickAxis(5) != Joystick.joystickaxis.None) + rc.chan5_raw = cs.rcoverridech5; + if (joystick.getJoystickAxis(6) != Joystick.joystickaxis.None) + rc.chan6_raw = cs.rcoverridech6; + if (joystick.getJoystickAxis(7) != Joystick.joystickaxis.None) + rc.chan7_raw = cs.rcoverridech7; + if (joystick.getJoystickAxis(8) != Joystick.joystickaxis.None) + rc.chan8_raw = cs.rcoverridech8; if (lastjoystick.AddMilliseconds(50) < DateTime.Now) { diff --git a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs index 8f357122d7..beffb588df 100644 --- a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs +++ b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs @@ -316,7 +316,7 @@ namespace ArdupilotMega mine.logplaybackfile = new BinaryReader(File.Open(logfile, FileMode.Open, FileAccess.Read, FileShare.Read)); mine.logreadmode = true; - MAVLink.packets.Initialize(); // clear + mine.packets.Initialize(); // clear CurrentState cs = new CurrentState(); @@ -422,7 +422,7 @@ namespace ArdupilotMega mine.logplaybackfile = new BinaryReader(File.Open(logfile, FileMode.Open, FileAccess.Read, FileShare.Read)); mine.logreadmode = true; - MAVLink.packets.Initialize(); // clear + mine.packets.Initialize(); // clear StreamWriter sw = new StreamWriter(Path.GetDirectoryName(logfile)+ Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(logfile) + ".txt"); diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs index f9d0b01b3a..1a89d7783d 100644 --- a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs +++ b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ using System.Resources; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.84")] +[assembly: AssemblyFileVersion("1.0.85")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/Tools/ArdupilotMegaPlanner/SerialOutput.cs b/Tools/ArdupilotMegaPlanner/SerialOutput.cs index ee08026c8b..57f0bbe2e2 100644 --- a/Tools/ArdupilotMegaPlanner/SerialOutput.cs +++ b/Tools/ArdupilotMegaPlanner/SerialOutput.cs @@ -14,7 +14,8 @@ namespace ArdupilotMega { System.Threading.Thread t12; static bool threadrun = false; - static SerialPort comPort = new SerialPort(); + static internal SerialPort comPort = new SerialPort(); + static internal PointLatLngAlt HomeLoc = new PointLatLngAlt(0,0,0,"Home"); public SerialOutput() { @@ -62,6 +63,7 @@ namespace ArdupilotMega void mainloop() { threadrun = true; + int counter = 0; while (threadrun) { try @@ -78,7 +80,16 @@ namespace ArdupilotMega checksum = GetChecksum(line); comPort.WriteLine(line + "*" + checksum); + if (counter % 5 == 0 && HomeLoc.Lat != 0 && HomeLoc.Lng != 0) + { + line = string.Format("$GP{0},{1:HHmmss},{2},{3},{4},{5},{6},{7},", "HOM", DateTime.Now.ToUniversalTime(), Math.Abs(HomeLoc.Lat * 100), HomeLoc.Lat < 0 ? "S" : "N", Math.Abs(HomeLoc.Lng * 100), HomeLoc.Lng < 0 ? "W" : "E", HomeLoc.Alt, "M"); + + checksum = GetChecksum(line); + comPort.WriteLine(line + "*" + checksum); + } + System.Threading.Thread.Sleep(500); + counter++; } catch { } } diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.application b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.application index cb43d874f2..95e40b4996 100644 --- a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.application +++ b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.application @@ -11,7 +11,7 @@ - sVd4w+f3LroCsyok5UsAi4Bq9eI= + 3zgu5RT0ve/+QDoK+mKvNj+a14k= diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/JoystickSetup.resx b/Tools/ArdupilotMegaPlanner/bin/Release/JoystickSetup.resx index eccf946e39..9b38147048 100644 --- a/Tools/ArdupilotMegaPlanner/bin/Release/JoystickSetup.resx +++ b/Tools/ArdupilotMegaPlanner/bin/Release/JoystickSetup.resx @@ -138,7 +138,7 @@ $this - 32 + 56 RZ @@ -171,7 +171,7 @@ $this - 31 + 55 RZ @@ -204,7 +204,7 @@ $this - 30 + 54 RZ @@ -237,7 +237,7 @@ $this - 29 + 53 RZ @@ -270,7 +270,7 @@ $this - 28 + 52 307, 70 @@ -294,7 +294,7 @@ $this - 23 + 47 307, 97 @@ -318,7 +318,7 @@ $this - 22 + 46 False @@ -345,7 +345,7 @@ $this - 21 + 45 307, 151 @@ -369,7 +369,7 @@ $this - 20 + 44 True @@ -400,7 +400,7 @@ $this - 19 + 43 True @@ -430,7 +430,7 @@ $this - 18 + 42 True @@ -460,7 +460,7 @@ $this - 17 + 41 True @@ -490,7 +490,7 @@ $this - 16 + 40 True @@ -517,7 +517,7 @@ $this - 15 + 39 True @@ -544,7 +544,7 @@ $this - 14 + 38 True @@ -571,7 +571,7 @@ $this - 13 + 37 True @@ -598,7 +598,7 @@ $this - 12 + 36 True @@ -628,7 +628,7 @@ $this - 9 + 33 True @@ -658,7 +658,7 @@ $this - 8 + 32 True @@ -688,7 +688,7 @@ $this - 7 + 31 True @@ -718,7 +718,7 @@ $this - 6 + 30 True @@ -748,11 +748,548 @@ $this - 5 + 29 17, 17 + + True + + + NoControl + + + 434, 81 + + + 64, 17 + + + 32 + + + Elevons + + + CHK_elevons + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 24 + + + True + + + NoControl + + + 413, 179 + + + 15, 14 + + + 37 + + + revCH5 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 19 + + + True + + + NoControl + + + 9, 181 + + + 31, 13 + + + 36 + + + CH 5 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 20 + + + 307, 180 + + + 100, 13 + + + 35 + + + 0 + + + expo_ch5 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 21 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 176 + + + 70, 21 + + + 33 + + + CMB_CH5 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 23 + + + True + + + NoControl + + + 413, 208 + + + 15, 14 + + + 43 + + + revCH6 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + True + + + NoControl + + + 9, 210 + + + 31, 13 + + + 42 + + + CH 6 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 14 + + + 307, 209 + + + 100, 13 + + + 41 + + + 0 + + + expo_ch6 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 15 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 205 + + + 70, 21 + + + 39 + + + CMB_CH6 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 17 + + + True + + + NoControl + + + 413, 237 + + + 15, 14 + + + 49 + + + revCH7 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + True + + + NoControl + + + 9, 239 + + + 31, 13 + + + 48 + + + CH 7 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + 307, 238 + + + 100, 13 + + + 47 + + + 0 + + + expo_ch7 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 234 + + + 70, 21 + + + 45 + + + CMB_CH7 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + + + True + + + NoControl + + + 413, 266 + + + 15, 14 + + + 55 + + + revCH8 + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 9, 268 + + + 31, 13 + + + 54 + + + CH 8 + + + label13 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 307, 267 + + + 100, 13 + + + 53 + + + 0 + + + expo_ch8 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + RZ + + + X + + + Y + + + SL1 + + + 72, 263 + + + 70, 21 + + + 51 + + + CMB_CH8 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + NoControl + + + 148, 263 + + + 45, 23 + + + 56 + + + Auto Detect + + + BUT_detch8 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 0 + + + NoControl + + + 199, 262 + + + 100, 23 + + + 52 + + + horizontalProgressBar4 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 4 + NoControl @@ -778,7 +1315,7 @@ $this - 1 + 25 NoControl @@ -805,7 +1342,7 @@ $this - 2 + 26 NoControl @@ -832,7 +1369,7 @@ $this - 3 + 27 NoControl @@ -859,7 +1396,7 @@ $this - 4 + 28 NoControl @@ -886,7 +1423,7 @@ $this - 10 + 34 NoControl @@ -913,7 +1450,7 @@ $this - 11 + 35 NoControl @@ -937,7 +1474,7 @@ $this - 24 + 48 NoControl @@ -961,7 +1498,7 @@ $this - 25 + 49 NoControl @@ -985,7 +1522,7 @@ $this - 26 + 50 NoControl @@ -1009,34 +1546,160 @@ $this - 27 + 51 - - True + + NoControl - - 434, 81 + + 148, 176 - - 64, 17 + + 45, 23 - - 32 + + 38 - - Elevons + + Auto Detect - - CHK_elevons + + BUT_detch5 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c - + $this - - 0 + + 18 + + + NoControl + + + 199, 175 + + + 100, 23 + + + 34 + + + horizontalProgressBar1 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 22 + + + NoControl + + + 148, 205 + + + 45, 23 + + + 44 + + + Auto Detect + + + BUT_detch6 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 12 + + + NoControl + + + 199, 204 + + + 100, 23 + + + 40 + + + horizontalProgressBar2 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 16 + + + NoControl + + + 148, 234 + + + 45, 23 + + + 50 + + + Auto Detect + + + BUT_detch7 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 6 + + + NoControl + + + 199, 233 + + + 100, 23 + + + 46 + + + horizontalProgressBar3 + + + ArdupilotMega.HorizontalProgressBar, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c + + + $this + + + 10 True @@ -1045,7 +1708,7 @@ 6, 13 - 498, 220 + 498, 331