Skip to content

Commit

Permalink
Added Thinker AIO version support
Browse files Browse the repository at this point in the history
Added MSPOSD Extra Stats for latest MSPOSD version
Added Remove MSPOSD Extra Stats for latest MSPOSD version
Added date compiled for version reference
  • Loading branch information
MarioFPVdev authored and MarioFPVdev committed Jan 5, 2025
1 parent b840c1e commit 3d10761
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 13 deletions.
49 changes: 39 additions & 10 deletions Configurator.Designer.vb

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

3 changes: 3 additions & 0 deletions Configurator.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5006,6 +5006,9 @@ Step 9: Reboot OpenIPC camera</value>
1SSC4LLnYrEZ9q898Sf6LdyhAPkdlH0FFFezlm5wVdj/2Q==
</value>
</data>
<metadata name="btnToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value>
</metadata>
Expand Down
28 changes: 26 additions & 2 deletions Configurator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Public Class Configurator

Public Sub DownloadStart()
downloader = New WebClient
If cmbVersion.Text = "ssc338q_fpv_emax-wyvern-link-nor" Or cmbVersion.Text = "ssc338q_fpv_openipc-mario-aio-nor" Or cmbVersion.Text = "ssc338q_fpv_openipc-urllc-aio-nor" Or cmbVersion.Text = "ssc338q_fpv_runcam-wifilink-nor" Then
If cmbVersion.Text = "ssc338q_fpv_emax-wyvern-link-nor" Or cmbVersion.Text = "ssc338q_fpv_openipc-thinker-aio-nor" Or cmbVersion.Text = "ssc338q_fpv_openipc-mario-aio-nor" Or cmbVersion.Text = "ssc338q_fpv_openipc-urllc-aio-nor" Or cmbVersion.Text = "ssc338q_fpv_runcam-wifilink-nor" Then
downloader.DownloadFileAsync(New Uri("https://github.com/OpenIPC/builder/releases/download/latest/" + cmbVersion.Text + ".tgz"), cmbVersion.Text + ".tgz")
Else
downloader.DownloadFileAsync(New Uri("https://github.com/OpenIPC/firmware/releases/download/latest/" + cmbVersion.Text + ".tgz"), cmbVersion.Text + ".tgz")
Expand Down Expand Up @@ -874,6 +874,7 @@ err1:
cmbVersion.Items.Clear()
cmbVersion.Items.Add("ssc338q_fpv_emax-wyvern-link-nor")
cmbVersion.Items.Add("ssc338q_fpv_openipc-mario-aio-nor")
cmbVersion.Items.Add("ssc338q_fpv_openipc-thinker-aio-nor")
cmbVersion.Items.Add("ssc338q_fpv_openipc-urllc-aio-nor")
cmbVersion.Items.Add("ssc338q_fpv_runcam-wifilink-nor")
cmbVersion.Items.Add("openipc.ssc338q-nor-fpv")
Expand Down Expand Up @@ -1347,6 +1348,7 @@ err1:
btnUART0OFF.Visible = False
btnExtra.Visible = False
btnMSPExtra.Visible = False
btnMSPExtraRemove.Visible = False
btnRestartWFB.Visible = True
btnRestartMajestic.Visible = False
ComboBox3.Visible = True
Expand Down Expand Up @@ -1502,7 +1504,8 @@ err1:
btnUART0.Visible = True
btnUART0OFF.Visible = True
btnExtra.Visible = True
btnMSPExtra.Visible = False
btnMSPExtra.Visible = True
btnMSPExtraRemove.Visible = True
btnRestartWFB.Visible = True
btnRestartMajestic.Visible = True
ComboBox3.Visible = True
Expand Down Expand Up @@ -1657,6 +1660,7 @@ err1:
btnUART0OFF.Visible = False
btnExtra.Visible = False
btnMSPExtra.Visible = False
btnMSPExtraRemove.Visible = False
btnRestartWFB.Visible = False
btnRestartMajestic.Visible = False
ComboBox3.Visible = False
Expand Down Expand Up @@ -3064,5 +3068,25 @@ err1:
End If
End Sub

Private Sub btnMSPExtraRemove_Click(sender As Object, e As EventArgs) Handles btnMSPExtraRemove.Click
Dim extern = "extern.bat"
If Not 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 = "remmspextra " + 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
12 changes: 11 additions & 1 deletion Extern.bat
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ if "%1" == "extra" (
plink -ssh root@%2 -pw %3 reboot
)

if "%1" == "mspextra" (
echo y | pscp -scp -pw %3 reset/telemetry root@%2:/usr/bin/
plink -ssh root@%2 -pw %3 dos2unix /usr/bin/telemetry
plink -ssh root@%2 -pw %3 reboot
)

if "%1" == "remmspextra" (
plink -ssh root@%2 -pw %3 sed -i 's/sleep 5/#sleep 5/' /usr/bin/telemetry
plink -ssh root@%2 -pw %3 reboot
)

if "%1" == "rswfb" (
plink -ssh root@%2 -pw %3 wifibroadcast stop
plink -ssh root@%2 -pw %3 sleep 3
Expand Down Expand Up @@ -182,7 +193,6 @@ if "%1" == "msp" (
plink -ssh root@%2 -pw %3 reboot
)


if "%1" == "40mhz" (
echo y | pscp -scp -pw %3 reset/wifibroadcast root@%2:/usr/bin/
plink -ssh root@%2 -pw %3 dos2unix /usr/bin/wifibroadcast
Expand Down
73 changes: 73 additions & 0 deletions reset/telemetry
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/sh
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
keydir=/etc

if [ -e /etc/datalink.conf ]; then
. /etc/datalink.conf
fi

if [ -e /etc/telemetry.conf ]; then
. /etc/telemetry.conf
fi

if [ ! -e /usr/bin/telemetry_rx ] || [ ! -e /usr/bin/telemetry_tx ]; then
ln -fs /usr/bin/wfb_rx /usr/bin/telemetry_rx
ln -fs /usr/bin/wfb_tx /usr/bin/telemetry_tx
fi

start_drone_telemetry() {
if [ "$router" -lt 2 ]; then
if [ "$one_way" = "false" ]; then
telemetry_rx -p "$stream_rx" -u "$port_rx" -K "$keydir/$unit.key" -i "$link_id" "$wlan" > /dev/null &
fi
telemetry_tx -p "$stream_tx" -u "$port_tx" -K "$keydir/$unit.key" -B "$bandwidth" \
-M "$mcs_index" -S "$stbc" -L "$ldpc" -G "$guard_interval" -k "$fec_k" -n "$fec_n" \
-T "$pool_timeout" -i "$link_id" -f "$frame_type" "$wlan" > /dev/null &
fi
}

start_gs_telemetry() {
if [ "$one_way" = "false" ]; then
telemetry_tx -p "$stream_tx" -u "$port_tx" -K "$keydir/$unit.key" -B "$bandwidth" \
-M "$mcs_index" -S "$stbc" -L "$ldpc" -G "$guard_interval" -k "$fec_k" -n "$fec_n" \
-T "$pool_timeout" -i "$link_id" -f "$frame_type" "$wlan" > /dev/null &
fi
telemetry_rx -p "$stream_rx" -u "$port_rx" -K "$keydir/$unit.key" -i "$link_id" "$wlan" > /dev/null &
}

case "$1" in
start)
echo "Loading MAVLink telemetry service..."
if [ "$router" -eq 1 ] || [ "$fw" = "lte" ]; then
mavlink-routerd -c /etc/mavlink.conf > /dev/null 2>&1 &
else
if [ "$router" -eq 2 ]; then
msposd --channels "$channels" --master "$serial" --baudrate "$baud" \
--out 127.0.0.1:$(($port_tx + 1)) -osd -r "$fps" --ahi "$ahi" > /dev/null &
sleep 5
echo "&L70 &F35 CPU:&C &B Temp:&T" >/tmp/MSPOSD.msg &
else
mavfwd --channels "$channels" --master "$serial" --baudrate "$baud" -p 100 -t -a "$aggregate" \
--out 127.0.0.1:$port_tx --in 127.0.0.1:$port_rx > /dev/null &
fi
fi

if [ "$fw" = "fpv" ] || [ "$fw" = "venc" ]; then
start_${unit}_telemetry
fi
;;

stop)
echo "Stopping telemetry services..."
killall -q telemetry_rx
killall -q telemetry_tx
killall -q mavlink-routerd
killall -q mavfwd
killall -q msposd
;;

*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

0 comments on commit 3d10761

Please sign in to comment.