├── bin └── msposd ├── conf ├── settings.conf └── wfb.conf ├── fonts ├── font.png └── font_hd.png ├── images ├── configurator.png └── openipc-control-suite.png ├── assets └── icons │ ├── openipc.icns │ └── openipc.png ├── scripts ├── 4K.sh ├── 816.sh ├── 1080.sh ├── 1080b.sh ├── 3K.sh ├── 720p100.sh ├── 720p120.sh ├── 720p60.sh ├── 720p90.sh ├── 1264.sh ├── 1080p100.sh ├── 1080p120.sh ├── 1080p60.sh ├── 1080p90.sh ├── 1184p100.sh ├── 1248p90.sh ├── 1304p80.sh ├── 1416p70.sh ├── 1440p60.sh ├── 1920p30.sh ├── kill.sh ├── setdisplay.sh ├── channels.sh ├── extern.sh └── extern.bat ├── notes.txt ├── src ├── preload.js ├── main.js ├── styles.css ├── script.js └── index.html ├── package.json ├── README.md └── .gitignore /bin/msposd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/bin/msposd -------------------------------------------------------------------------------- /conf/settings.conf: -------------------------------------------------------------------------------- 1 | openipc:192.168.0.33 2 | nvr:192.168.0.33 3 | radxa:172.20.10.2 -------------------------------------------------------------------------------- /conf/wfb.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | channel=52 4 | 5 | mcs_index=5 6 | 7 | ldpc=1 8 | 9 | -------------------------------------------------------------------------------- /fonts/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/fonts/font.png -------------------------------------------------------------------------------- /fonts/font_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/fonts/font_hd.png -------------------------------------------------------------------------------- /images/configurator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/images/configurator.png -------------------------------------------------------------------------------- /assets/icons/openipc.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/assets/icons/openipc.icns -------------------------------------------------------------------------------- /assets/icons/openipc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/assets/icons/openipc.png -------------------------------------------------------------------------------- /images/openipc-control-suite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/improver-legacy/master/images/openipc-control-suite.png -------------------------------------------------------------------------------- /scripts/4K.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 3840x2160 2 | yaml-cli -s .video0.fps 20 3 | yaml-cli -s .isp.exposure 50 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/816.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1456x816 2 | yaml-cli -s .video0.fps 120 3 | yaml-cli -s .isp.exposure 8 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/1080.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 90 3 | yaml-cli -s .isp.exposure 11 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/1080b.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 60 3 | yaml-cli -s .isp.exposure 16 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/3K.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 3200x1800 2 | yaml-cli -s .video0.fps 30 3 | yaml-cli -s .isp.exposure 33 4 | sleep .2 5 | /root/kill.sh 6 | 7 | -------------------------------------------------------------------------------- /scripts/720p100.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1280x720 2 | yaml-cli -s .video0.fps 100 3 | yaml-cli -s .isp.exposure 10 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/720p120.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1280x720 2 | yaml-cli -s .video0.fps 120 3 | yaml-cli -s .isp.exposure 8 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/720p60.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1280x720 2 | yaml-cli -s .video0.fps 60 3 | yaml-cli -s .isp.exposure 16 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/720p90.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1280x720 2 | yaml-cli -s .video0.fps 90 3 | yaml-cli -s .isp.exposure 11 4 | sleep .2 5 | /root/kill.sh 6 | -------------------------------------------------------------------------------- /scripts/1264.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2240x1264 2 | yaml-cli -s .video0.fps 60 3 | yaml-cli -s .isp.exposure 16 4 | sleep .2 5 | /root/kill.sh 6 | 7 | -------------------------------------------------------------------------------- /scripts/1080p100.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 100 3 | yaml-cli -s .video0.bitrate 4096 4 | yaml-cli -s .isp.exposure 10 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1080p120.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 120 3 | yaml-cli -s .video0.bitrate 2048 4 | yaml-cli -s .isp.exposure 8 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1080p60.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 60 3 | #yaml-cli -s .video0.bitrate 15360 4 | yaml-cli -s .isp.exposure 16 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1080p90.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 1920x1080 2 | yaml-cli -s .video0.fps 90 3 | yaml-cli -s .video0.bitrate 4096 4 | yaml-cli -s .isp.exposure 11 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1184p100.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2104x1184 2 | yaml-cli -s .video0.fps 100 3 | #yaml-cli -s .video0.bitrate 4096 4 | yaml-cli -s .isp.exposure 10 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1248p90.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2208x1248 2 | yaml-cli -s .video0.fps 90 3 | #yaml-cli -s .video0.bitrate 4096 4 | yaml-cli -s .isp.exposure 11 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1304p80.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2312x1304 2 | yaml-cli -s .video0.fps 80 3 | #yaml-cli -s .video0.bitrate 6144 4 | yaml-cli -s .isp.exposure 12 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1416p70.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2512x1416 2 | yaml-cli -s .video0.fps 70 3 | yaml-cli -s .video0.bitrate 7168 4 | yaml-cli -s .isp.exposure 14 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1440p60.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2560x1440 2 | yaml-cli -s .video0.fps 60 3 | yaml-cli -s .video0.bitrate 8192 4 | yaml-cli -s .isp.exposure 16 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/1920p30.sh: -------------------------------------------------------------------------------- 1 | yaml-cli -s .video0.size 2560x1920 2 | yaml-cli -s .video0.fps 30 3 | #yaml-cli -s .video0.bitrate 15360 4 | yaml-cli -s .isp.exposure 33 5 | sleep .2 6 | /root/kill.sh 7 | -------------------------------------------------------------------------------- /scripts/kill.sh: -------------------------------------------------------------------------------- 1 | killall -q majestic 2 | killall -q msposd 3 | sleep 3 4 | majestic & 5 | msposd --master /dev/ttyS0 --baudrate 115200 --channels 8 --out 127.0.0.1:14555 -osd -r 20 --ahi 0 -v & 6 | echo "&L70 &F35 CPU:&C &B Temp:&T" >/tmp/MSPOSD.msg & 7 | -------------------------------------------------------------------------------- /notes.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xwindows 5 | ForwardAgent yes 6 | ForwardX11 yes 7 | ForwardX11Trusted yes 8 | 9 | 10 | sudo apt install xvfb x11-apps 11 | 12 | 13 | export DISPLAY=localhost:10.0 14 | 15 | test: 16 | xclock 17 | 18 | 19 | Testing 20 | -------------------------------------------------------------------------------- /scripts/setdisplay.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | export DISPLAY=:0 3 | xset s off -dpms 4 | 5 | #set your desired screen resolution here 6 | MODE=1920x1080 7 | RATE=60 8 | 9 | if [[ $(xrandr | awk '/HDMI-1/ {print $2}') == "connected" ]]; then 10 | xrandr --output HDMI-1 --mode $MODE --rate $RATE 11 | fi 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /src/preload.js: -------------------------------------------------------------------------------- 1 | // preload.js 2 | console.log('Preload script loaded'); 3 | 4 | const { contextBridge, ipcRenderer } = require('electron'); 5 | 6 | contextBridge.exposeInMainWorld('api', { 7 | fileExists: (filename) => ipcRenderer.invoke('fileExists', filename), 8 | createFile: (filename, content) => ipcRenderer.invoke('createFile', filename, content) 9 | }); 10 | 11 | // window.addEventListener('DOMContentLoaded', () => { 12 | // const replaceText = (selector, text) => { 13 | // const element = document.getElementById(selector); 14 | // if (element) element.innerText = text; 15 | // }; 16 | 17 | // for (const dependency of ['chrome', 'node', 'electron']) { 18 | // replaceText(`${dependency}-version`, process.versions[dependency]); 19 | // } 20 | // }); 21 | 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openipc-control-suite", 3 | "version": "1.0.0", 4 | "main": "src/main.js", 5 | "description": "OpenIPC Control Suite", 6 | "scripts": { 7 | "start": "electron .", 8 | "start-server": "http-server", 9 | "build": "electron-builder", 10 | "debug": "electron --inspect=5858 ." 11 | }, 12 | "devDependencies": { 13 | "electron": "^32.0.2", 14 | "electron-builder": "^25.0.5", 15 | "http-server": "^14.1.1", 16 | "nodemon": "^3.1.4" 17 | }, 18 | 19 | "build": { 20 | "appId": "com.openipc.app", 21 | "files": [ 22 | "assets/", 23 | "src/", 24 | "bin/", 25 | "conf/", 26 | "fonts/", 27 | "scripts/" 28 | ], 29 | "mac": { 30 | "icon": "assets/icons/openipc.icns" 31 | }, 32 | "win": { 33 | "icon": "assets/icons/icon.ico" 34 | }, 35 | "linux": { 36 | "icon": "assets/icons/icon.png" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const { app, BrowserWindow, ipcMain } = require('electron'); 4 | const path = require('path'); 5 | const fs = require('fs'); // Use the promises API for fs 6 | 7 | function createWindow() { 8 | 9 | console.log('Creating window'); 10 | 11 | console.log(__dirname); // Outputs the directory of the current file 12 | 13 | const mainWindow = new BrowserWindow({ 14 | width: 800, 15 | height: 600, 16 | webPreferences: { 17 | contextIsolation: true, 18 | preload: path.join(__dirname, 'preload.js'), // Ensure this path is correct 19 | enableRemoteModule: false, 20 | nodeIntegration: false 21 | }, 22 | icon: path.join(__dirname, 'assets/icons/openipc.png') // Change this to your icon path 23 | 24 | 25 | }); 26 | 27 | mainWindow.loadFile('src/index.html'); // Ensure index.html is in the correct directory 28 | //mainWindow.loadURL('http://localhost:8080'); // URL served by http-server 29 | console.log('Window created and URL loaded'); 30 | } 31 | 32 | console.log('Main.js waitinng app ready'); 33 | 34 | app.whenReady().then(() => { 35 | createWindow(); 36 | 37 | ipcMain.handle('fileExists', (event, filename) => { 38 | return fs.existsSync(filename); 39 | }); 40 | 41 | ipcMain.handle('createFile', (event, filename, content) => { 42 | fs.writeFileSync(filename, content); 43 | }); 44 | 45 | app.on('activate', () => { 46 | if (BrowserWindow.getAllWindows().length === 0) { 47 | createWindow(); 48 | } 49 | }); 50 | }); 51 | 52 | app.on('window-all-closed', () => { 53 | if (process.platform !== 'darwin') { 54 | app.quit(); 55 | } 56 | }); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenIPC Improver 2 | 3 | OpenIPC Improver (legacy) for setting up FPV and URLLC devices 4 | 5 | *This is a work in progress.* 6 | 7 | Idea was to create a multiplatform application that can run anywhere (Windows, Mac or Linux). 8 | 9 | 10 | ## Setup 11 | 12 | 13 | ### Windows 14 | 15 | Please download and install PuTTy before running the Improver 16 | 17 | --- 18 | 19 | Run the "OpenIPC Improver.exe" file. 20 | 21 | Enter the IP of the camera/NVR/Radxa Zero 3w. 22 | 23 | Click Fetch to receive the setting files. 24 | 25 | Then click Read to read the current settings. 26 | 27 | Edit the settings. 28 | 29 | Then click Save. 30 | 31 | Then click Upload to send the settings to the camera/NVR/Radxa Zero 3w. 32 | 33 | ![alt text](./images/configurator.png) 34 | 35 | ### Mac 36 | 37 | ![alt text](./images/openipc-control-suite.png) 38 | 39 | 40 | 41 | ## Build 42 | npm run build 43 | 44 | * For macOS 45 | ```bash 46 | npx electron-packager . my-electron-app --platform=darwin --arch=x64 --out=dist/ 47 | ``` 48 | 49 | * For Windows 50 | ```shell 51 | npx electron-packager . my-electron-app --platform=win32 --arch=x64 --out=dist/ 52 | ``` 53 | 54 | * For Linux 55 | ```bash 56 | npx electron-packager . my-electron-app --platform=linux --arch=x64 --out=dist/ 57 | ``` 58 | 59 | 60 | 61 | ## Debug 62 | 63 | 64 | 65 | 66 | 67 | ## Running dependencies 68 | 69 | sshpass 70 | 71 | 72 | 73 | ## Development 74 | 75 | #### Ubuntu 76 | 77 | sudo apt install libgbm1 libasound2 78 | 79 | ### Mac and Linux 80 | 81 | headless setup x11 82 | 83 | Install Xvfb: 84 | ```bash 85 | sudo apt-get install xvfb 86 | ``` 87 | Start Xvfb: 88 | ```bash 89 | Xvfb :99 -screen 0 1024x768x24 & 90 | ``` 91 | 92 | Set the DISPLAY Variable: 93 | ```bash 94 | export DISPLAY=:99 95 | ``` 96 | 97 | Setup 98 | ```bash 99 | npm install 100 | ``` 101 | 102 | Run Your Electron App: 103 | 104 | ```bash 105 | npm start 106 | ``` 107 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | .container { 8 | padding: 20px; 9 | } 10 | 11 | .tab-container { 12 | margin-bottom: 20px; 13 | } 14 | 15 | .tabs { 16 | display: flex; 17 | margin-bottom: 10px; 18 | } 19 | 20 | .tab-button { 21 | padding: 10px 20px; 22 | cursor: pointer; 23 | background-color: #ddd; 24 | border: 1px solid #ccc; 25 | border-radius: 4px; 26 | margin-right: 5px; 27 | } 28 | 29 | .tab-button.active { 30 | background-color: #fff; 31 | border-bottom: 1px solid transparent; 32 | font-weight: bold; 33 | } 34 | 35 | .tab-content-box { 36 | border: 1px solid #ccc; 37 | border-radius: 4px; 38 | padding: 20px; 39 | background-color: #fff; 40 | } 41 | 42 | .tab-content-item { 43 | display: none; 44 | } 45 | 46 | .tab-content-item.active { 47 | display: block; 48 | } 49 | 50 | .control-panel { 51 | border: 1px solid #ccc; 52 | border-radius: 4px; 53 | padding: 20px; 54 | background-color: #fff; 55 | } 56 | 57 | .radio-buttons label { 58 | display: block; 59 | margin-bottom: 10px; 60 | } 61 | 62 | .input-fields { 63 | margin-bottom: 20px; 64 | } 65 | 66 | .input-fields label { 67 | display: block; 68 | margin-bottom: 5px; 69 | } 70 | 71 | .input-fields input { 72 | display: block; 73 | margin-bottom: 10px; 74 | padding: 8px; 75 | width: 100%; 76 | } 77 | 78 | .buttons { 79 | margin-top: 20px; 80 | } 81 | 82 | .buttons button { 83 | margin-right: 10px; 84 | padding: 10px 20px; 85 | font-size: 16px; 86 | cursor: pointer; 87 | } 88 | 89 | .form-group { 90 | display: flex; 91 | align-items: center; 92 | margin-bottom: 10px; 93 | } 94 | 95 | .form-group label { 96 | flex: 1; 97 | margin-right: 10px; 98 | } 99 | 100 | .combo-box { 101 | flex: 2; 102 | } 103 | 104 | .text-field { 105 | flex: 2; 106 | margin-left: 10px; 107 | padding: 8px; 108 | } 109 | 110 | .form-buttons { 111 | margin-top: 20px; 112 | text-align: right; 113 | } 114 | 115 | .form-buttons button { 116 | margin-left: 10px; 117 | padding: 10px 20px; 118 | font-size: 16px; 119 | cursor: pointer; 120 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | .vscode 101 | # vuepress build output 102 | .vuepress/dist 103 | 104 | # vuepress v2.x temp and cache directory 105 | .temp 106 | .cache 107 | 108 | # Docusaurus cache and generated files 109 | .docusaurus 110 | 111 | # Serverless directories 112 | .serverless/ 113 | 114 | # FuseBox cache 115 | .fusebox/ 116 | 117 | # DynamoDB Local files 118 | .dynamodb/ 119 | 120 | # TernJS port file 121 | .tern-port 122 | 123 | # Stores VSCode versions used for testing VSCode extensions 124 | .vscode-test 125 | 126 | # yarn v2 127 | .yarn/cache 128 | .yarn/unplugged 129 | .yarn/build-state.yml 130 | .yarn/install-state.gz 131 | .pnp.* -------------------------------------------------------------------------------- /scripts/channels.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 6 way switch 4 | # Decide MCS, FEC, bit-rate and power based on the range [1000,1500] from TX controller 5 | # IMPORTANT: after copying the binaries wfb_tx and wfb_tx_cmd to /usr/bin, make them executable (chmod +x wfb_tx*) and 6 | # add -C 8000 to wfb_tx command in /usr/bin/wifibroadcast under section [wfb_tx_drone] 7 | 8 | if [ -e /etc/txprofile ]; then 9 | . /etc/txprofile 10 | fi 11 | 12 | oldProfile=$vidRadioProfile 13 | 14 | if [ $2 -gt 1901 ] ;then 15 | # Change resolution (some resolutions are only available on OpenIPC Mario AIO) 16 | CURRENT_SIZE=`yaml-cli -g .video0.size` 17 | CURRENT_FPS=`yaml-cli -g .video0.fps` 18 | if [ $CURRENT_SIZE == '2512x1416' ] && [ $CURRENT_FPS == '70' ] ; then 19 | /root/1440p60.sh 20 | elif [ $CURRENT_SIZE == '2560x1440' ] && [ $CURRENT_FPS == '60' ] ; then 21 | /root/1920p30.sh 22 | elif [ $CURRENT_SIZE == '2560x1920' ] && [ $CURRENT_FPS == '30' ] ; then 23 | /root/1080p60.sh 24 | elif [ $CURRENT_SIZE == '1920x1080' ] && [ $CURRENT_FPS == '60' ] ; then 25 | /root/1080p90.sh 26 | elif [ $CURRENT_SIZE == '1920x1080' ] && [ $CURRENT_FPS == '90' ] ; then 27 | /root/1080p100.sh 28 | elif [ $CURRENT_SIZE == '1920x1080' ] && [ $CURRENT_FPS == '100' ] ; then 29 | /root/720p120.sh 30 | elif [ $CURRENT_SIZE == '1280x720' ] && [ $CURRENT_FPS == '120' ] ; then 31 | /root/720p100.sh 32 | elif [ $CURRENT_SIZE == '1280x720' ] && [ $CURRENT_FPS == '100' ] ; then 33 | /root/720p90.sh 34 | elif [ $CURRENT_SIZE == '1280x720' ] && [ $CURRENT_FPS == '90' ] ; then 35 | /root/720p60.sh 36 | else 37 | /root/1416p70.sh 38 | fi 39 | sleep 1 40 | elif [ $2 -gt 1701 ] && [ $2 -lt 1900 ] ;then 41 | sleep 1 42 | elif [ $2 -gt 1501 ] && [ $2 -lt 1700 ] ;then 43 | sleep 1 44 | elif [ $2 -gt 1351 ] && [ $2 -lt 1500 ] ;then 45 | setGI=short 46 | setMCS=4 47 | setFecK=8 48 | setFecN=12 49 | setBitrate=15360 50 | setGop=1.0 51 | wfbPower=45 52 | newProfile=1 53 | echo "vidRadioProfile1" >/etc/txprofile 54 | elif [ $2 -gt 1051 ] && [ $2 -lt 1350 ] ;then 55 | setGI=short 56 | setMCS=2 57 | setFecK=8 58 | setFecN=12 59 | setBitrate=8192 60 | setGop=1.0 61 | wfbPower=50 62 | newProfile=2 63 | echo "vidRadioProfile=2" >/etc/txprofile 64 | elif [ $2 -lt 1050 ] ;then 65 | setGI=short 66 | setMCS=1 67 | setFecK=8 68 | setFecN=12 69 | setBitrate=4096 70 | setGop=1.0 71 | wfbPower=58 72 | newProfile=3 73 | echo "vidRadioProfile=3" >/etc/txprofile 74 | fi 75 | 76 | #calculate driver power 77 | setPower=$((wfbPower * 50)) 78 | 79 | if [ $newProfile -gt $oldProfile ] ;then 80 | 81 | # Lower power first 82 | iw dev wlan0 set txpower fixed $setPower 83 | 84 | # Set gopSize 85 | curl localhost/api/v1/set?video0.gopSize=$setGop 86 | 87 | # Raise MCS 88 | wfb_tx_cmd 8000 set_radio -B 20 -G $setGI -S 1 -L 1 -M $setMCS 89 | wfb_tx_cmd 8000 set_fec -k $setFecK -n $setFecN 90 | 91 | # Increase bit-rate 92 | curl -s "http://localhost/api/v1/set?video0.bitrate=$setBitrate" 93 | #sleep 0.1 94 | #curl "localhost:9000/api/osd/2?font=UbuntuMono-Regular&size=32.0&color=green&text=Bitrate:$setBitrate%20MCS:$setMCS%20FEC:$setFecK%2F$setFecN%20wfbPower:$wfbPower" 95 | 96 | elif [ $newProfile -lt $oldProfile ] ;then 97 | 98 | # Decrease bit-rate first 99 | curl -s "http://localhost/api/v1/set?video0.bitrate=$setBitrate" 100 | 101 | # Set gopSize 102 | curl localhost/api/v1/set?video0.gopSize=$setGop 103 | 104 | # Lower MCS 105 | sleep 0.1 106 | wfb_tx_cmd 8000 set_radio -B 20 -G $setGI -S 1 -L 1 -M $setMCS 107 | wfb_tx_cmd 8000 set_fec -k $setFecK -n $setFecN 108 | 109 | # Increase power 110 | iw dev wlan0 set txpower fixed $setPower 111 | #sleep 0.1 112 | #curl "localhost:9000/api/osd/2?font=UbuntuMono-Regular&size=32.0&color=green&text=Bitrate:$setBitrate%20MCS:$setMCS%20FEC:$setFecK%2F$setFecN%20wfbPower:$wfbPower" 113 | fi 114 | 115 | exit 1 116 | -------------------------------------------------------------------------------- /scripts/extern.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if required parameters are provided 4 | if [[ $# -lt 3 ]]; then 5 | echo "Usage: $0 [optional: file]" 6 | exit 1 7 | fi 8 | 9 | COMMAND="$1" 10 | IP="$2" 11 | PASSWORD="$3" 12 | FILE="$4" 13 | 14 | # Download configurations from the remote system 15 | if [[ "$COMMAND" == "dl" ]]; then 16 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/majestic.yaml . 17 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/wfb.conf . 18 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/telemetry.conf . 19 | 20 | # Upload configurations to the remote system 21 | elif [[ "$COMMAND" == "ul" ]]; then 22 | sshpass -p "$PASSWORD" scp majestic.yaml root@"$IP":/etc 23 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc 24 | sshpass -p "$PASSWORD" scp telemetry.conf root@"$IP":/etc 25 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/majestic.yaml" 26 | 27 | # Upload configurations and reboot the remote system 28 | elif [[ "$COMMAND" == "ulr" ]]; then 29 | sshpass -p "$PASSWORD" scp majestic.yaml root@"$IP":/etc 30 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc 31 | sshpass -p "$PASSWORD" scp telemetry.conf root@"$IP":/etc 32 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/majestic.yaml && reboot" 33 | 34 | # Download VRX configurations from the remote system 35 | elif [[ "$COMMAND" == "dlvrx" ]]; then 36 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/vdec.conf . 37 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/wfb.conf . 38 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/telemetry.conf . 39 | 40 | # Upload VRX configurations to the remote system 41 | elif [[ "$COMMAND" == "ulvrx" ]]; then 42 | sshpass -p "$PASSWORD" scp vdec.conf root@"$IP":/etc 43 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc 44 | sshpass -p "$PASSWORD" scp telemetry.conf root@"$IP":/etc 45 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/vdec.conf" 46 | 47 | # Upload VRX configurations and reboot the remote system 48 | elif [[ "$COMMAND" == "ulvrxr" ]]; then 49 | sshpass -p "$PASSWORD" scp vdec.conf root@"$IP":/etc 50 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc 51 | sshpass -p "$PASSWORD" scp telemetry.conf root@"$IP":/etc 52 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/vdec.conf && reboot" 53 | 54 | # Download WiFi broadcast configurations from the remote system 55 | elif [[ "$COMMAND" == "dlwfbng" ]]; then 56 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/wifibroadcast.cfg . 57 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/modprobe.d/wfb.conf . 58 | sshpass -p "$PASSWORD" scp root@"$IP":/home/radxa/scripts/screen-mode . 59 | 60 | # Upload WiFi broadcast configurations to the remote system 61 | elif [[ "$COMMAND" == "ulwfbng" ]]; then 62 | sshpass -p "$PASSWORD" scp wifibroadcast.cfg root@"$IP":/etc 63 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc/modprobe.d/ 64 | sshpass -p "$PASSWORD" scp screen-mode root@"$IP":/home/radxa/scripts/ 65 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /home/radxa/scripts/screen-mode" 66 | 67 | # Upload WiFi broadcast configurations and reboot the remote system 68 | elif [[ "$COMMAND" == "ulwfbngr" ]]; then 69 | sshpass -p "$PASSWORD" scp wifibroadcast.cfg root@"$IP":/etc 70 | sshpass -p "$PASSWORD" scp wfb.conf root@"$IP":/etc/modprobe.d/ 71 | sshpass -p "$PASSWORD" scp screen-mode root@"$IP":/home/radxa/scripts/ 72 | sshpass -p "$PASSWORD" ssh root@"$IP" "dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /home/radxa/scripts/screen-mode && reboot" 73 | 74 | # Reboot the remote system 75 | elif [[ "$COMMAND" == "rb" ]]; then 76 | sshpass -p "$PASSWORD" ssh root@"$IP" "reboot" 77 | 78 | # Perform a system upgrade 79 | elif [[ "$COMMAND" == "sysup" ]]; then 80 | sshpass -p "$PASSWORD" ssh root@"$IP" "sysupgrade -k -r -n --force_ver" 81 | 82 | # Download the drone key from the ground station 83 | elif [[ "$COMMAND" == "keysdlgs" ]]; then 84 | sshpass -p "$PASSWORD" scp root@"$IP":/root/drone.key . 85 | 86 | # Download the drone key from the camera 87 | elif [[ "$COMMAND" == "keysdlcam" ]]; then 88 | sshpass -p "$PASSWORD" scp root@"$IP":/etc/drone.key . 89 | 90 | # Upload the drone key to the ground station 91 | elif [[ "$COMMAND" == "keysulgs" ]]; then 92 | sshpass -p "$PASSWORD" scp drone.key root@"$IP":/etc 93 | sshpass -p "$PASSWORD" ssh root@"$IP" "cp /etc/drone.key /etc/gs.key" 94 | 95 | # Upload the drone key to the camera 96 | elif [[ "$COMMAND" == "keysulcam" ]]; then 97 | sshpass -p "$PASSWORD" scp drone.key root@"$IP":/etc 98 | 99 | # Key generation 100 | elif [[ "$COMMAND" == "keysgen" ]]; then 101 | sshpass -p "$PASSWORD" ssh root@"$IP" "wfb_keygen" 102 | sshpass -p "$PASSWORD" ssh root@"$IP" "cp /root/gs.key /etc/" 103 | 104 | # ... continue with additional commands like UART2, UART0, rswfb, etc. 105 | # as per your original script 106 | -------------------------------------------------------------------------------- /src/script.js: -------------------------------------------------------------------------------- 1 | console.log("Loading script.js"); 2 | 3 | document.querySelectorAll('.tab-button').forEach(button => { 4 | button.addEventListener('click', () => { 5 | // Remove active class from all tab buttons and tab content 6 | document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active')); 7 | document.querySelectorAll('.tab-content-item').forEach(content => content.classList.remove('active')); 8 | 9 | // Add active class to the clicked tab button and corresponding tab content 10 | button.classList.add('active'); 11 | const tabContentId = button.getAttribute('data-tab'); 12 | document.getElementById(tabContentId).classList.add('active'); 13 | console.log("Hello"); 14 | }); 15 | }); 16 | 17 | 18 | // Example of handling button clicks in the control panel 19 | document.getElementById('fetch').addEventListener('click', () => { 20 | console.log('Fetch button clicked'); 21 | }); 22 | document.getElementById('read').addEventListener('click', () => { 23 | console.log('Read button clicked'); 24 | }); 25 | document.getElementById('save').addEventListener('click', () => { 26 | console.log('Save button clicked'); 27 | }); 28 | document.getElementById('reboot').addEventListener('click', () => { 29 | console.log('Reboot button clicked'); 30 | }); 31 | document.getElementById('upload').addEventListener('click', () => { 32 | console.log('Upload button clicked'); 33 | }); 34 | document.getElementById('temperature').addEventListener('click', () => { 35 | console.log('Temperature button clicked'); 36 | }); 37 | 38 | // Handling the WFB Settings form (make sure to add similar logic for other combo boxes if needed) 39 | // Example for comboBox2 specifically if you want to target a specific combo box 40 | document.getElementById('combo58TXPwr').addEventListener('change', (event) => { 41 | const selectedValue = event.target.value; 42 | const textField = document.getElementById('txt58TXPwr'); // Assuming the text field has ID 'textBox2' 43 | 44 | if (textField) { 45 | textField.value = `driver_txpower_override=${selectedValue}`; 46 | } else { 47 | console.error('Text field not found: txt58TXPwr'); 48 | } 49 | }); 50 | document.getElementById('combo24TXPwr').addEventListener('change', (event) => { 51 | const selectedValue = event.target.value; 52 | const textField = document.getElementById('txt24TXPwr'); // Assuming the text field has ID 'textBox2' 53 | 54 | if (textField) { 55 | textField.value = `txpower=${selectedValue}`; 56 | } else { 57 | console.error('Text field not found: txt24TXPwr'); 58 | } 59 | }); 60 | 61 | document.getElementById('combo58Freq').addEventListener('change', (event) => { 62 | const selectedValue = event.target.value; 63 | const textField = document.getElementById('txt58Freq'); // Assuming the text field has ID 'textBox2' 64 | 65 | if (textField) { 66 | // Regular expression to match the value within the brackets 67 | const match = selectedValue.match(/\[(\d+)\]/); 68 | var channel = null 69 | if(match) { 70 | channel = match[1]; 71 | console.log(channel); // Output: 40 72 | } 73 | textField.value = `channel=${channel}`; 74 | } else { 75 | console.error('Text field not found: txt58TXPwr'); 76 | } 77 | }); 78 | 79 | document.getElementById('combo24Freq').addEventListener('change', (event) => { 80 | const selectedValue = event.target.value; 81 | const textField = document.getElementById('txt24Freq'); // Assuming the text field has ID 'textBox2' 82 | 83 | if (textField) { 84 | // Regular expression to match the value within the brackets 85 | const match = selectedValue.match(/\[(\d+)\]/); 86 | var frequency = null 87 | if(match) { 88 | frequency = match[1]; 89 | console.log(frequency); // Output: 40 90 | } 91 | textField.value = `frequency=${frequency}`; 92 | } else { 93 | console.error('Text field not found: txt58TXPwr'); 94 | } 95 | }); 96 | 97 | document.getElementById('comboMCSIndex').addEventListener('change', (event) => { 98 | const selectedValue = event.target.value; 99 | const textField = document.getElementById('txtMCSIndex'); // Assuming the text field has ID 'textBox2' 100 | 101 | if (textField) { 102 | textField.value = `mcs_index=${selectedValue}`; 103 | } else { 104 | console.error('Text field not found: txtMCSIndex'); 105 | } 106 | }); 107 | 108 | document.getElementById('comboStbc').addEventListener('change', (event) => { 109 | const selectedValue = event.target.value; 110 | const textField = document.getElementById('txtStbc'); // Assuming the text field has ID 'textBox2' 111 | 112 | if (textField) { 113 | textField.value = `stbc=${selectedValue}`; 114 | } else { 115 | console.error('Text field not found: txtStbc'); 116 | } 117 | }); 118 | 119 | document.getElementById('comboLdpc').addEventListener('change', (event) => { 120 | const selectedValue = event.target.value; 121 | const textField = document.getElementById('txtLdpc'); // Assuming the text field has ID 'textBox2' 122 | 123 | if (textField) { 124 | textField.value = `ldpc=${selectedValue}`; 125 | } else { 126 | console.error('Text field not found: txtLdpc'); 127 | } 128 | }); 129 | 130 | document.getElementById('comboFecK').addEventListener('change', (event) => { 131 | const selectedValue = event.target.value; 132 | const textField = document.getElementById('txtFecK'); // Assuming the text field has ID 'textBox2' 133 | 134 | if (textField) { 135 | textField.value = `fec_k=${selectedValue}`; 136 | } else { 137 | console.error('Text field not found: txtFecK'); 138 | } 139 | }); 140 | 141 | document.getElementById('comboFecN').addEventListener('change', (event) => { 142 | const selectedValue = event.target.value; 143 | const textField = document.getElementById('txtFecN'); // Assuming the text field has ID 'textBox2' 144 | 145 | if (textField) { 146 | textField.value = `fec_n=${selectedValue}`; 147 | } else { 148 | console.error('Text field not found: txtFecN'); 149 | } 150 | }); 151 | 152 | document.getElementById('save-wfb').addEventListener('click', async () => { 153 | console.log('Save WFB button clicked'); 154 | const filename = 'conf/wfb.conf'; // Example filename, change as needed 155 | 156 | 157 | // Get the values from each textbox 158 | const txt58TXPwr = document.getElementById('txt58TXPwr').value; 159 | const txt24TXPwr = document.getElementById('txt24TXPwr').value; 160 | const txt58Freq = document.getElementById('txt58Freq').value; 161 | const txt24Freq = document.getElementById('txt24Freq').value; 162 | const txtMCSIndex = document.getElementById('txtMCSIndex').value; 163 | const txtStbc = document.getElementById('txtStbc').value; 164 | const txtLdpc = document.getElementById('txtLdpc').value; 165 | const txtFecK = document.getElementById('txtFecK').value; 166 | const txtFecN = document.getElementById('txtFecN').value; 167 | 168 | // Combine the values with newline breaks 169 | const wfbText = `${txt58TXPwr}\n${txt24TXPwr}\n${txt58Freq}\n${txt24Freq}\n${txtMCSIndex}\n${txtStbc}\n${txtLdpc}\n${txtFecK}\n${txtFecN}`; 170 | 171 | try { 172 | 173 | const exists = await window.api.fileExists(filename); 174 | 175 | if (exists) { 176 | // File exists, proceed with saving 177 | await window.api.createFile(filename, wfbText); 178 | console.log('File saved successfully'); 179 | } else { 180 | console.log('File does not exist. Creating new file.'); 181 | await window.api.createFile(filename, wfbText); 182 | console.log('File created and saved successfully'); 183 | } 184 | } catch (error) { 185 | console.error('Error saving file:', error); 186 | } 187 | 188 | }); 189 | 190 | console.log("Loading script.js...done"); -------------------------------------------------------------------------------- /scripts/extern.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if "%1" == "dl" ( 4 | echo y | pscp -scp -pw %3 root@%2:/etc/majestic.yaml . 5 | echo y | pscp -scp -pw %3 root@%2:/etc/wfb.conf . 6 | echo y | pscp -scp -pw %3 root@%2:/etc/telemetry.conf . 7 | ) 8 | 9 | if "%1" == "ul" ( 10 | echo y | pscp -scp -pw %3 majestic.yaml root@%2:/etc 11 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc 12 | echo y | pscp -scp -pw %3 telemetry.conf root@%2:/etc 13 | plink -ssh root@%2 -pw %3 dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/majestic.yaml 14 | ) 15 | 16 | if "%1" == "ulr" ( 17 | echo y | pscp -scp -pw %3 majestic.yaml root@%2:/etc 18 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc 19 | echo y | pscp -scp -pw %3 telemetry.conf root@%2:/etc 20 | plink -ssh root@%2 -pw %3 dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/majestic.yaml 21 | plink -ssh root@%2 -pw %3 reboot 22 | ) 23 | 24 | if "%1" == "dlvrx" ( 25 | echo y | pscp -scp -pw %3 root@%2:/etc/vdec.conf . 26 | echo y | pscp -scp -pw %3 root@%2:/etc/wfb.conf . 27 | echo y | pscp -scp -pw %3 root@%2:/etc/telemetry.conf . 28 | ) 29 | 30 | if "%1" == "ulvrx" ( 31 | echo y | pscp -scp -pw %3 vdec.conf root@%2:/etc 32 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc 33 | echo y | pscp -scp -pw %3 telemetry.conf root@%2:/etc 34 | plink -ssh root@%2 -pw %3 dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/vdec.conf 35 | ) 36 | 37 | if "%1" == "ulvrxr" ( 38 | echo y | pscp -scp -pw %3 vdec.conf root@%2:/etc 39 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc 40 | echo y | pscp -scp -pw %3 telemetry.conf root@%2:/etc 41 | plink -ssh root@%2 -pw %3 dos2unix /etc/wfb.conf /etc/telemetry.conf /etc/vdec.conf 42 | plink -ssh root@%2 -pw %3 reboot 43 | ) 44 | 45 | if "%1" == "dlwfbng" ( 46 | echo y | pscp -scp -pw %3 root@%2:/etc/wifibroadcast.cfg . 47 | echo y | pscp -scp -pw %3 root@%2:/etc/modprobe.d/wfb.conf . 48 | echo y | pscp -scp -pw %3 root@%2:/home/radxa/scripts/screen-mode . 49 | ) 50 | 51 | if "%1" == "ulwfbng" ( 52 | echo y | pscp -scp -pw %3 wifibroadcast.cfg root@%2:/etc 53 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc/modprobe.d/ 54 | echo y | pscp -scp -pw %3 screen-mode root@%2:/home/radxa/scripts/ 55 | plink -ssh root@%2 -pw %3 dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /home/radxa/scripts/screen-mode 56 | ) 57 | 58 | if "%1" == "ulwfbngr" ( 59 | echo y | pscp -scp -pw %3 wifibroadcast.cfg root@%2:/etc 60 | echo y | pscp -scp -pw %3 wfb.conf root@%2:/etc/modprobe.d/ 61 | echo y | pscp -scp -pw %3 screen-mode root@%2:/home/radxa/scripts/ 62 | plink -ssh root@%2 -pw %3 dos2unix /etc/wifibroadcast.cfg /etc/modprobe.d/wfb.conf /home/radxa/scripts/screen-mode 63 | plink -ssh root@%2 -pw %3 reboot 64 | ) 65 | 66 | if "%1" == "rb" ( 67 | plink -ssh root@%2 -pw %3 reboot 68 | ) 69 | 70 | if "%1" == "sysup" ( 71 | plink -ssh root@%2 -pw %3 sysupgrade -k -r -n --force_ver 72 | ) 73 | 74 | if "%1" == "keysdlgs" ( 75 | echo y | pscp -scp -pw %3 root@%2:/root/drone.key . 76 | ) 77 | 78 | if "%1" == "keysdlcam" ( 79 | echo y | pscp -scp -pw %3 root@%2:/etc/drone.key . 80 | ) 81 | 82 | if "%1" == "keysulgs" ( 83 | echo y | pscp -scp -pw %3 drone.key root@%2:/etc 84 | plink -ssh root@%2 -pw %3 cp /etc/drone.key /etc/gs.key 85 | ) 86 | 87 | if "%1" == "keysulcam" ( 88 | echo y | pscp -scp -pw %3 drone.key root@%2:/etc 89 | ) 90 | 91 | if "%1" == "keysgen" ( 92 | plink -ssh root@%2 -pw %3 wfb_keygen 93 | plink -ssh root@%2 -pw %3 cp /root/gs.key /etc/ 94 | ) 95 | 96 | if "%1" == "UART2" ( 97 | plink -ssh root@%2 -pw %3 sed -i '13 i devmem 0x1F207890 16 0x8' /etc/init.d/S95majestic 98 | plink -ssh root@%2 -pw %3 sed -i '14 i stty -F /dev/ttyS2 115200 raw -echo -onlcr' /etc/init.d/S95majestic 99 | ) 100 | 101 | if "%1" == "UART0" ( 102 | plink -ssh root@%2 -pw %3 sed -i '/devmem 0x1F207890 16 0x8/d' /etc/init.d/S95majestic 103 | plink -ssh root@%2 -pw %3 sed -i '/stty -F \/dev\/ttyS2 115200 raw -echo -onlcr/d' /etc/init.d/S95majestic 104 | ) 105 | 106 | if "%1" == "rswfb" ( 107 | plink -ssh root@%2 -pw %3 wifibroadcast stop 108 | plink -ssh root@%2 -pw %3 sleep 3 109 | plink -ssh root@%2 -pw %3 wifibroadcast start 110 | ) 111 | 112 | if "%1" == "rsmaj" ( 113 | plink -ssh root@%2 -pw %3 killall -1 majestic 114 | ) 115 | 116 | if "%1" == "binup" ( 117 | echo y | pscp -scp -pw %3 %4 root@%2:/etc/sensors/ 118 | ) 119 | 120 | if "%1" == "koup" ( 121 | echo y | pscp -scp -pw %3 %4 root@%2:/lib/modules/4.9.84/sigmastar/ 122 | ) 123 | 124 | if "%1" == "shup" ( 125 | echo y | pscp -scp -pw %3 *.sh root@%2:/root/ 126 | echo y | pscp -scp -pw %3 channels.sh root@%2:/usr/bin/ 127 | plink -ssh root@%2 -pw %3 rm /root/channels.sh 128 | plink -ssh root@%2 -pw %3 rm /root/816.sh 129 | plink -ssh root@%2 -pw %3 rm /root/1080.sh 130 | plink -ssh root@%2 -pw %3 rm /root/1080b.sh 131 | plink -ssh root@%2 -pw %3 rm /root/1264.sh 132 | plink -ssh root@%2 -pw %3 rm /root/3K.sh 133 | plink -ssh root@%2 -pw %3 rm /root/4K.sh 134 | plink -ssh root@%2 -pw %3 chmod +x /root/*.sh 135 | plink -ssh root@%2 -pw %3 chmod +x /usr/bin/channels.sh 136 | ) 137 | 138 | if "%1" == "bindl" ( 139 | echo y | mkdir backup 140 | echo y | pscp -scp -pw %3 root@%2:/etc/sensors/%4 ./backup/ 141 | ) 142 | 143 | if "%1" == "kodl" ( 144 | echo y | mkdir backup 145 | echo y | pscp -scp -pw %3 root@%2:/lib/modules/4.9.84/sigmastar/%4 ./backup/ 146 | ) 147 | 148 | if "%1" == "shdl" ( 149 | echo y | pscp -scp -pw %3 root@%2:/usr/bin/channels.sh . 150 | echo y | pscp -scp -pw %3 root@%2:/root/816.sh . 151 | echo y | pscp -scp -pw %3 root@%2:/root/1080.sh . 152 | echo y | pscp -scp -pw %3 root@%2:/root/1080b.sh . 153 | echo y | pscp -scp -pw %3 root@%2:/root/1264.sh . 154 | echo y | pscp -scp -pw %3 root@%2:/root/3K.sh . 155 | echo y | pscp -scp -pw %3 root@%2:/root/4K.sh . 156 | echo y | pscp -scp -pw %3 root@%2:/root/1184p100.sh . 157 | echo y | pscp -scp -pw %3 root@%2:/root/1304p80.sh . 158 | echo y | pscp -scp -pw %3 root@%2:/root/1440p60.sh . 159 | echo y | pscp -scp -pw %3 root@%2:/root/1920p30.sh . 160 | echo y | pscp -scp -pw %3 root@%2:/root/1080p60.sh . 161 | echo y | pscp -scp -pw %3 root@%2:/root/720p120.sh . 162 | echo y | pscp -scp -pw %3 root@%2:/root/720p100.sh . 163 | echo y | pscp -scp -pw %3 root@%2:/root/720p90.sh . 164 | echo y | pscp -scp -pw %3 root@%2:/root/720p60.sh . 165 | echo y | pscp -scp -pw %3 root@%2:/root/1080p120.sh . 166 | echo y | pscp -scp -pw %3 root@%2:/root/1248p90.sh . 167 | echo y | pscp -scp -pw %3 root@%2:/root/1304p80.sh . 168 | echo y | pscp -scp -pw %3 root@%2:/root/1416p70.sh . 169 | echo y | pscp -scp -pw %3 root@%2:/root/kill.sh . 170 | ) 171 | 172 | if "%1" == "temp" ( 173 | plink -ssh root@%2 -pw %3 cat /sys/devices/virtual/mstar/msys/TEMP_R 174 | ) 175 | 176 | if "%1" == "rubyfw" ( 177 | plink -ssh root@%2 -pw %3 sed -i 's/BUILD_OPTION=fpv/BUILD_OPTION=rubyfpv/' /etc/os-release 178 | plink -ssh root@%2 -pw %3 fw_setenv upgrade https://github.com/OpenIPC/firmware/releases/download/latest/openipc.ssc338q-nor-rubyfpv.tgz 179 | ) 180 | 181 | if "%1" == "wfbfw" ( 182 | plink -ssh root@%2 -pw %3 sed -i 's/BUILD_OPTION=rubyfpv/BUILD_OPTION=fpv/' /etc/os-release 183 | plink -ssh root@%2 -pw %3 fw_setenv upgrade https://github.com/OpenIPC/firmware/releases/download/latest/ssc338q_fpv_openipc-urllc-aio-nor.tgz 184 | ) 185 | 186 | if "%1" == "offlinefw" ( 187 | echo y | pscp -scp -pw %3 uImage.%4 root@%2:/tmp 188 | echo y | pscp -scp -pw %3 rootfs.squashfs.%4 root@%2:/tmp 189 | plink -ssh root@%2 -pw %3 sysupgrade --kernel=/tmp/uImage.%4 --rootfs=/tmp/rootfs.squashfs.%4 -n 190 | ) 191 | 192 | if "%1" == "msp" ( 193 | plink -ssh root@%2 -pw %3 sed -i '/echo \"Starting wifibroadcast service...\"/c\msposd --master /dev/ttyS2 --baudrate 115200 --channels 8 --out 127.0.0.1:14555 -osd -r 20 --ahi 0 --wait 100 -v "&"' /etc/init.d/S98datalink 194 | plink -ssh root@%2 -pw %3 sed -i '/killall -q mavfwd/c\killall -q msposd' /etc/init.d/S98datalink 195 | plink -ssh root@%2 -pw %3 sed -i '/telemetry=true/c\telemetry=false' /etc/datalink.conf 196 | plink -ssh root@%2 -pw %3 killall -q msposd 197 | echo y | pscp -scp -pw %3 msposd root@%2:/usr/bin/ 198 | plink -ssh root@%2 -pw %3 chmod +x /usr/bin/msposd 199 | ) 200 | 201 | if "%1" == "mspgs" ( 202 | plink -ssh root@%2 -pw %3 sed -i '/fpvue --osd --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 "&"/c\fpvue --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE --dvr-framerate 60 --dvr-fmp4 --dvr record_${current_date}.mp4 "&"' /home/radxa/scripts/stream.sh 203 | plink -ssh root@%2 -pw %3 sed -i '/fpvue --osd --screen-mode $SCREEN_MODE "&"/c\fpvue --osd --osd-elements wfbng,video --screen-mode $SCREEN_MODE "&"' /home/radxa/scripts/stream.sh 204 | ) 205 | 206 | if "%1" == "mav" ( 207 | plink -ssh root@%2 -pw %3 sed -i '/msposd --master/c\echo \"Starting wifibroadcast service...\"' /etc/init.d/S98datalink 208 | plink -ssh root@%2 -pw %3 sed -i '/killall -q msposd/c\killall -q mavfwd' /etc/init.d/S98datalink 209 | plink -ssh root@%2 -pw %3 sed -i '/telemetry=false/c\telemetry=true' /etc/datalink.conf 210 | ) 211 | 212 | if "%1" == "mavgs" ( 213 | 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 "&"' /home/radxa/scripts/stream.sh 214 | 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 "&"' /home/radxa/scripts/stream.sh 215 | ) 216 | 217 | if "%1" == "fonts" ( 218 | echo y | pscp -scp -pw %3 font.png root@%2:/usr/bin/ 219 | echo y | pscp -scp -pw %3 font_hd.png root@%2:/usr/bin/ 220 | ) 221 | 222 | :end 223 | echo. 224 | pause 225 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | OpenIPC Control Suite 8 | 9 | 10 | 11 | 12 | 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |
28 |
29 |
30 | 31 | 62 | 63 |
64 | 65 |
66 | 67 | 100 | 101 |
102 | 103 |
104 | 105 | 122 | 123 |
124 | 125 |
126 | 127 | 160 | 161 |
162 |
163 | 164 | 199 | 200 |
201 | 202 | 203 |
204 | 205 | 211 | 212 |
213 | 214 | 215 |
216 | 217 | 222 | 223 |
224 | 225 | 226 |
227 | 228 | 244 | 245 |
246 | 247 | 248 |
249 | 250 | 266 | 267 |
268 | 269 |
270 | 271 | 272 |
273 |
274 |
275 |
276 |

Content for Camera Settings goes here.

277 |
278 |
279 |

Content for Telemetry goes here.

280 |
281 |
282 |

Content for VRX goes here.

283 |
284 |
285 |

Content for Setup goes here.

286 |
287 |
288 |

Content for OSD goes here.

289 |
290 |
291 |
292 |
293 |
294 | 295 | 296 | 297 |
298 |
299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 |
308 |
309 | 310 | 311 | 312 | 313 | 314 | 315 |
316 |
317 |
318 | 319 | 320 | 321 | --------------------------------------------------------------------------------