diff --git a/GCSViews/ConfigurationView/ConfigSerial.Designer.cs b/GCSViews/ConfigurationView/ConfigSerial.Designer.cs index ef5f81369f..c5d5f93ca4 100644 --- a/GCSViews/ConfigurationView/ConfigSerial.Designer.cs +++ b/GCSViews/ConfigurationView/ConfigSerial.Designer.cs @@ -39,11 +39,11 @@ private void InitializeComponent() // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 5; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 104F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 99F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 183F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 249F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 8F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 152F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 114F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 132F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 307F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 10F)); this.tableLayoutPanel1.Controls.Add(this.myLabel1, 0, 0); this.tableLayoutPanel1.Controls.Add(this.myLabel2, 1, 0); this.tableLayoutPanel1.Controls.Add(this.myLabel3, 2, 0); @@ -64,13 +64,13 @@ private void InitializeComponent() this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.090908F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.090908F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(692, 497); + this.tableLayoutPanel1.Size = new System.Drawing.Size(789, 497); this.tableLayoutPanel1.TabIndex = 0; // // myLabel1 // this.myLabel1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.myLabel1.Location = new System.Drawing.Point(14, 9); + this.myLabel1.Location = new System.Drawing.Point(38, 9); this.myLabel1.Name = "myLabel1"; this.myLabel1.resize = false; this.myLabel1.Size = new System.Drawing.Size(75, 23); @@ -80,7 +80,7 @@ private void InitializeComponent() // myLabel2 // this.myLabel2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.myLabel2.Location = new System.Drawing.Point(116, 9); + this.myLabel2.Location = new System.Drawing.Point(171, 9); this.myLabel2.Name = "myLabel2"; this.myLabel2.resize = false; this.myLabel2.Size = new System.Drawing.Size(75, 23); @@ -90,7 +90,7 @@ private void InitializeComponent() // myLabel3 // this.myLabel3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.myLabel3.Location = new System.Drawing.Point(257, 9); + this.myLabel3.Location = new System.Drawing.Point(294, 9); this.myLabel3.Name = "myLabel3"; this.myLabel3.resize = false; this.myLabel3.Size = new System.Drawing.Size(75, 23); @@ -100,7 +100,7 @@ private void InitializeComponent() // myLabel4 // this.myLabel4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.myLabel4.Location = new System.Drawing.Point(473, 9); + this.myLabel4.Location = new System.Drawing.Point(514, 9); this.myLabel4.Name = "myLabel4"; this.myLabel4.resize = false; this.myLabel4.Size = new System.Drawing.Size(75, 23); @@ -114,7 +114,7 @@ private void InitializeComponent() this.Controls.Add(this.tableLayoutPanel1); this.Margin = new System.Windows.Forms.Padding(2); this.Name = "ConfigSerial"; - this.Size = new System.Drawing.Size(715, 519); + this.Size = new System.Drawing.Size(812, 519); this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); diff --git a/GCSViews/ConfigurationView/ConfigSerial.cs b/GCSViews/ConfigurationView/ConfigSerial.cs index 69185a9f2e..cbc19c3150 100644 --- a/GCSViews/ConfigurationView/ConfigSerial.cs +++ b/GCSViews/ConfigurationView/ConfigSerial.cs @@ -192,6 +192,20 @@ public void Activate() uartName = _uartNames[i]; } + //Get the RTS/CTS options if there is any + string ctsrtsParamName = "BRD_SER" +i.ToString() + "_RTSCTS"; + if (MainV2.comPort.MAV.param.ContainsKey(ctsrtsParamName)) + { + var ctsValue = MainV2.comPort.MAV.param[ctsrtsParamName].Value; + if (ctsValue == 1) + { + uartName = uartName + " (RTS/CTS)"; + } + if (ctsValue == 2) + { + uartName = uartName + " (RTS/CTS Auto)"; + } + } //Port Name Label Label label = new Label(); label.Text = "SERIAL PORT " + i.ToString() + "\n" + uartName; @@ -288,7 +302,7 @@ public void Activate() Anchor = AnchorStyles.None, Dock = DockStyle.Fill, AutoSize = true, - MaximumSize = new Size(200, 200), + MaximumSize = new Size(300, 200), Location = new Point(0, 0), Size = new Size(100, 20), TextAlign = ContentAlignment.MiddleLeft diff --git a/GCSViews/InitialSetup.cs b/GCSViews/InitialSetup.cs index 78f87175ab..af446600ae 100644 --- a/GCSViews/InitialSetup.cs +++ b/GCSViews/InitialSetup.cs @@ -173,11 +173,6 @@ private void HardwareConfig_Load(object sender, EventArgs e) AddBackstageViewPage(typeof(ConfigHWCompass), rm.GetString("backstageViewPagecompass.Text"), isConnected && gotAllParams, mand); } - - if (MainV2.DisplayConfiguration.displaySerialPorts) - { - AddBackstageViewPage(typeof(ConfigSerial), rm.GetString("backstageViewPageSerial.Text"), isConnected && gotAllParams, mand); - } if (MainV2.DisplayConfiguration.displayRadioCalibration) { AddBackstageViewPage(typeof(ConfigRadioInput), rm.GetString("backstageViewPageradio.Text"), isConnected && gotAllParams, mand); @@ -187,6 +182,10 @@ private void HardwareConfig_Load(object sender, EventArgs e) AddBackstageViewPage(typeof(ConfigRadioOutput), "Servo Output", isConnected && gotAllParams, mand); } + if (MainV2.DisplayConfiguration.displaySerialPorts) + { + AddBackstageViewPage(typeof(ConfigSerial), rm.GetString("backstageViewPageSerial.Text"), isConnected && gotAllParams, mand); + } if (MainV2.DisplayConfiguration.displayEscCalibration) { AddBackstageViewPage(typeof(ConfigESCCalibration), "ESC Calibration", isConnected && gotAllParams, mand);