Skip to content

Commit ac44ba2

Browse files
MarioFPVdevMarioFPVdev
MarioFPVdev
authored and
MarioFPVdev
committed
Added reset OpenIPC camera settings
Added reset Radxa Zero 3w settings
1 parent 1f4baa6 commit ac44ba2

7 files changed

+125
-4
lines changed

Configurator.Designer.vb

+32-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Configurator.resx

-3
Original file line numberDiff line numberDiff line change
@@ -5006,9 +5006,6 @@ Step 9: Reboot OpenIPC camera</value>
50065006
1SSC4LLnYrEZ9q898Sf6LdyhAPkdlH0FFFezlm5wVdj/2Q==
50075007
</value>
50085008
</data>
5009-
<metadata name="btnToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
5010-
<value>17, 17</value>
5011-
</metadata>
50125009
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
50135010
<value>127, 17</value>
50145011
</metadata>

Configurator.vb

+54
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,9 @@ err1:
14271427
txtDriver.Visible = False
14281428
btnMSPGS.Visible = False
14291429
btnMAVGS.Visible = False
1430+
rBtnMode1.Visible = False
1431+
rBtnMode2.Visible = False
1432+
btnReset.Visible = False
14301433
txtSaveVRX.Visible = False
14311434
btnUART0.Visible = False
14321435
btnUART0OFF.Visible = False
@@ -1540,6 +1543,9 @@ err1:
15401543
txtSaveVRX.Visible = False
15411544
btnMSPGS.Visible = False
15421545
btnMAVGS.Visible = False
1546+
rBtnMode1.Visible = False
1547+
rBtnMode2.Visible = False
1548+
btnReset.Visible = False
15431549
txtSaveVRX.Visible = False
15441550
btnUART0.Visible = True
15451551
btnUART0OFF.Visible = True
@@ -1652,6 +1658,9 @@ err1:
16521658
txtDriver.Visible = False
16531659
btnMSPGS.Visible = True
16541660
btnMAVGS.Visible = True
1661+
rBtnMode1.Visible = True
1662+
rBtnMode2.Visible = True
1663+
btnReset.Visible = True
16551664
txtSaveVRX.Visible = False
16561665
btnUART0.Visible = False
16571666
btnUART0OFF.Visible = False
@@ -3004,6 +3013,51 @@ err1:
30043013
End If
30053014
End Sub
30063015

3016+
Private Sub btnReset_Click(sender As Object, e As EventArgs) Handles btnReset.Click
3017+
Dim extern = "extern.bat"
3018+
If Not System.IO.File.Exists(extern) Then
3019+
MsgBox("File " + extern + " not found!")
3020+
Return
3021+
End If
3022+
3023+
If IsValidIP(txtIP.Text) Then
3024+
With New Process()
3025+
.StartInfo.UseShellExecute = False
3026+
.StartInfo.FileName = extern
3027+
.StartInfo.Arguments = "resetradxa " + String.Format("{0}", txtIP.Text) + " " + txtPassword.Text
3028+
.StartInfo.RedirectStandardOutput = False
3029+
.Start()
3030+
End With
3031+
Else
3032+
MsgBox("Please enter a valid IP address")
3033+
End If
3034+
End Sub
3035+
3036+
Private Sub btnResetCam_Click(sender As Object, e As EventArgs) Handles btnResetCam.Click
3037+
Dim result As DialogResult = MessageBox.Show("All OpenIPC camera settings will be restored to default.", "Warning!!!", MessageBoxButtons.YesNo)
3038+
If result = DialogResult.No Then
3039+
MessageBox.Show("No changes have been done.")
3040+
ElseIf result = DialogResult.Yes Then
3041+
Dim extern = "extern.bat"
3042+
If Not System.IO.File.Exists(extern) Then
3043+
MsgBox("File " + extern + " not found!")
3044+
Return
3045+
End If
3046+
3047+
If IsValidIP(txtIP.Text) Then
3048+
With New Process()
3049+
.StartInfo.UseShellExecute = False
3050+
.StartInfo.FileName = extern
3051+
.StartInfo.Arguments = "resetcam " + String.Format("{0}", txtIP.Text) + " " + txtPassword.Text
3052+
.StartInfo.RedirectStandardOutput = False
3053+
.Start()
3054+
End With
3055+
Else
3056+
MsgBox("Please enter a valid IP address")
3057+
End If
3058+
End If
3059+
End Sub
3060+
30073061

30083062
#End Region
30093063
End Class

Extern.bat

+16
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,27 @@ if "%1" == "mavgs" (
258258
if "%1" == "mavgs2" (
259259
plink -ssh root@%2 -pw %3 sed -i '/fpvue --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 "&"/c\fpvue --osd --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 --osd-telem-lvl 1 "&"' /home/radxa/scripts/stream.sh
260260
plink -ssh root@%2 -pw %3 sed -i '/fpvue --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE "&"/c\fpvue --osd --screen-mode $SCREEN_MODE --osd-telem-lvl 1 "&"' /home/radxa/scripts/stream.sh
261+
plink -ssh root@%2 -pw %3 sed -i '/pixelpilot --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 "&"/c\pixelpilot --osd --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 --osd-telem-lvl 1 "&"' /home/radxa/scripts/stream.sh
262+
plink -ssh root@%2 -pw %3 sed -i '/pixelpilot --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE "&"/c\pixelpilot --osd --screen-mode $SCREEN_MODE --osd-telem-lvl 1 "&"' /home/radxa/scripts/stream.sh
261263
plink -ssh root@%2 -pw %3 sed -i '/pixelpilot --osd --osd-elements video,wfbng --screen-mode $SCREEN_MODE --dvr-framerate $REC_FPS --dvr-fmp4 --dvr record_${current_date}.mp4 "&"/c\pixelpilot --osd --screen-mode $SCREEN_MODE --dvr-framerate $REC_FPS --dvr-fmp4 --dvr record_${current_date}.mp4 --osd-telem-lvl 1 "&"' /config/scripts/stream.sh
262264
plink -ssh root@%2 -pw %3 sed -i '/pixelpilot --osd --osd-elements video,wfbng --screen-mode $SCREEN_MODE "&"/c\pixelpilot --osd --screen-mode $SCREEN_MODE --osd-telem-lvl 1 "&"' /config/scripts/stream.sh
263265
plink -ssh root@%2 -pw %3 reboot
264266
)
265267

268+
if "%1" == "resetradxa" (
269+
echo y | pscp -scp -pw %3 reset/wifibroadcast.cfg root@%2:/etc
270+
echo y | pscp -scp -pw %3 reset/wfb.conf root@%2:/etc/modprobe.d/
271+
echo y | pscp -scp -pw %3 reset/screen-mode root@%2:/home/radxa/scripts/
272+
plink -ssh root@%2 -pw %3 dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /home/radxa/scripts/screen-mode
273+
echo y | pscp -scp -pw %3 reset/screen-mode root@%2:/config/scripts/
274+
plink -ssh root@%2 -pw %3 dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /config/scripts/screen-mode
275+
plink -ssh root@%2 -pw %3 reboot
276+
)
277+
278+
if "%1" == "resetcam" (
279+
plink -ssh root@%2 -pw %3 firstboot
280+
)
281+
266282
if "%1" == "fonts" (
267283
echo y | pscp -scp -pw %3 bf/font.png root@%2:/usr/bin/
268284
echo y | pscp -scp -pw %3 bf/font_hd.png root@%2:/usr/bin/

reset/screen-mode

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1280x720@60

reset/wfb.conf

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# blacklist stock module
2+
blacklist 88XXau
3+
blacklist 8812au
4+
options cfg80211 ieee80211_regdom=RU
5+
# maximize output power by default
6+
#options 88XXau_wfb rtw_tx_pwr_idx_override=30
7+
# minimize output power by default
8+
options 88XXau_wfb rtw_tx_pwr_idx_override=1
9+
options 8812eu rtw_tx_pwr_by_rate=0 rtw_tx_pwr_lmt_enable=0

reset/wifibroadcast.cfg

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[common]
2+
wifi_channel = 161
3+
# 1 -- radio channel @2412 Mhz,
4+
# see https://en.wikipedia.org/wiki/List_of_WLAN_channels for reference
5+
wifi_region = '00' # Your country for CRDA (use BO or GY if you want max tx power)
6+
7+
[gs_mavlink]
8+
peer = 'connect://127.0.0.1:14550' # outgoing connection
9+
# peer = 'listen://0.0.0.0:14550' # incoming connection
10+
11+
[gs_video]
12+
peer = 'connect://127.0.0.1:5600' # outgoing connection for
13+
# video sink (QGroundControl on GS)

0 commit comments

Comments
 (0)