Skip to content

Commit

Permalink
Moved down tab below Servo Output
Browse files Browse the repository at this point in the history
Add BRD_SERx_RTSCTS check
Increase cell sizes to decrease clutter
  • Loading branch information
EosBandi committed Nov 23, 2023
1 parent fc17f29 commit 180acd0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
22 changes: 11 additions & 11 deletions GCSViews/ConfigurationView/ConfigSerial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion GCSViews/ConfigurationView/ConfigSerial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions GCSViews/InitialSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 180acd0

Please sign in to comment.