From 26a5647ff17f306d1e1bf516ce7611b1c9657225 Mon Sep 17 00:00:00 2001 From: MarioFPVdev Date: Wed, 28 Aug 2024 17:43:54 +0100 Subject: [PATCH] Added more settings for Radxa Zero 3w version 1.5 --- Configurator.Designer.vb | 32 +++++++++++++++++++++++++++ Configurator.vb | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/Configurator.Designer.vb b/Configurator.Designer.vb index 07f7068..69f1c77 100644 --- a/Configurator.Designer.vb +++ b/Configurator.Designer.vb @@ -92,6 +92,8 @@ Partial Class Configurator txtBaud = New TextBox() txtSerial = New TextBox() TabPage4 = New TabPage() + btnMAVGS = New Button() + btnMSPGS = New Button() Label9 = New Label() Label8 = New Label() checkCustomRes = New CheckBox() @@ -1027,6 +1029,8 @@ Partial Class Configurator ' TabPage4 ' TabPage4.BackColor = Color.FromArgb(CByte(64), CByte(64), CByte(64)) + TabPage4.Controls.Add(btnMAVGS) + TabPage4.Controls.Add(btnMSPGS) TabPage4.Controls.Add(Label9) TabPage4.Controls.Add(Label8) TabPage4.Controls.Add(checkCustomRes) @@ -1052,6 +1056,32 @@ Partial Class Configurator TabPage4.TabIndex = 3 TabPage4.Text = "VRX" ' + ' btnMAVGS + ' + btnMAVGS.BackColor = Color.Gold + btnMAVGS.FlatStyle = FlatStyle.Popup + btnMAVGS.Font = New Font("Arial", 8.25F, FontStyle.Bold, GraphicsUnit.Point, CByte(0)) + btnMAVGS.Location = New Point(454, 56) + btnMAVGS.Name = "btnMAVGS" + btnMAVGS.Size = New Size(116, 30) + btnMAVGS.TabIndex = 63 + btnMAVGS.Text = "Mavlink" + btnToolTip.SetToolTip(btnMAVGS, "Enables the Mavlink telemetry" & vbCrLf & "of OpenIPC") + btnMAVGS.UseVisualStyleBackColor = False + ' + ' btnMSPGS + ' + btnMSPGS.BackColor = Color.Gold + btnMSPGS.FlatStyle = FlatStyle.Popup + btnMSPGS.Font = New Font("Arial", 8.25F, FontStyle.Bold, GraphicsUnit.Point, CByte(0)) + btnMSPGS.Location = New Point(454, 20) + btnMSPGS.Name = "btnMSPGS" + btnMSPGS.Size = New Size(116, 30) + btnMSPGS.TabIndex = 62 + btnMSPGS.Text = "MSP DisplayPort" + btnToolTip.SetToolTip(btnMSPGS, "Enables the MSP DisplayPort function" & vbCrLf & "of OpenIPC") + btnMSPGS.UseVisualStyleBackColor = False + ' ' Label9 ' Label9.AutoSize = True @@ -2499,5 +2529,7 @@ Partial Class Configurator Friend WithEvents btnMavlink As Button Friend WithEvents btnFonts As Button Friend WithEvents btnSaveReboot As Button + Friend WithEvents btnMAVGS As Button + Friend WithEvents btnMSPGS As Button End Class diff --git a/Configurator.vb b/Configurator.vb index 9797fc1..5efd093 100755 --- a/Configurator.vb +++ b/Configurator.vb @@ -1294,6 +1294,8 @@ err1: btnDriverBackup.Visible = False txtBin.Visible = False txtDriver.Visible = False + btnMSPGS.Visible = False + btnMAVGS.Visible = False txtSaveVRX.Visible = True btnUART2.Visible = False btnUART2OFF.Visible = False @@ -1402,6 +1404,9 @@ err1: txtBin.Visible = True txtDriver.Visible = True txtSaveVRX.Visible = False + btnMSPGS.Visible = False + btnMAVGS.Visible = False + txtSaveVRX.Visible = False btnUART2.Visible = True btnUART2OFF.Visible = True btnRestartWFB.Visible = True @@ -1508,6 +1513,8 @@ err1: btnDriverBackup.Visible = False txtBin.Visible = False txtDriver.Visible = False + btnMSPGS.Visible = True + btnMAVGS.Visible = True txtSaveVRX.Visible = True btnUART2.Visible = False btnUART2OFF.Visible = False @@ -2683,5 +2690,45 @@ err1: End If End Sub + Private Sub btnMSPGS_Click(sender As Object, e As EventArgs) Handles btnMSPGS.Click + Dim extern = "extern.bat" + If Not System.IO.File.Exists(extern) Then + MsgBox("File " + extern + " not found!") + Return + End If + + If IsValidIP(txtIP.Text) Then + With New Process() + .StartInfo.UseShellExecute = False + .StartInfo.FileName = extern + .StartInfo.Arguments = "mspgs " + String.Format("{0}", txtIP.Text) + " " + txtPassword.Text + .StartInfo.RedirectStandardOutput = False + .Start() + End With + Else + MsgBox("Please enter a valid IP address") + End If + End Sub + + Private Sub btnMAVGS_Click(sender As Object, e As EventArgs) Handles btnMAVGS.Click + Dim extern = "extern.bat" + If Not System.IO.File.Exists(extern) Then + MsgBox("File " + extern + " not found!") + Return + End If + + If IsValidIP(txtIP.Text) Then + With New Process() + .StartInfo.UseShellExecute = False + .StartInfo.FileName = extern + .StartInfo.Arguments = "mavgs " + String.Format("{0}", txtIP.Text) + " " + txtPassword.Text + .StartInfo.RedirectStandardOutput = False + .Start() + End With + Else + MsgBox("Please enter a valid IP address") + End If + End Sub + #End Region End Class