Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ jobs:
PR_NUMBER='${{ github.event.pull_request.number }}'
echo "GIT_VER=PR-${PR_NUMBER}" >> $GITHUB_ENV

# Build merged i18n JSON only for this locale (into scripts/dashx/i18n/<lang>.json)
# Build merged i18n JSON only for this locale (into src/dashx/i18n/<lang>.json)
- name: Build merged i18n JSON (${{ matrix.lang }})
run: |
python bin/i18n/build-single-json.py --only '${{ matrix.lang }}'
test -f "scripts/dashx/i18n/${{ matrix.lang }}.json"
test -f "src/dashx/i18n/${{ matrix.lang }}.json"

# Stage scripts/ into build/<lang>/scripts
- name: Stage scripts tree
run: |
rm -rf "${{ env.STAGE }}"
mkdir -p "${{ env.STAGE }}"
cp -a scripts/. "${{ env.STAGE }}/"
cp -a src/. "${{ env.STAGE }}/"

# Resolve @i18n(...)@ tags in the staged tree using the staged locale file
- name: Resolve i18n tags (locale=${{ matrix.lang }})
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
echo "GIT_VER=commit-${SHORT_SHA}" >> $GITHUB_ENV
echo "sha7=${SHORT_SHA}" >> $GITHUB_OUTPUT

# Build merged JSON for the specific locale (writes to scripts/dashx/i18n/<locale>.json)
# Build merged JSON for the specific locale (writes to src/dashx/i18n/<locale>.json)
- name: Build i18n for this locale
run: python bin/i18n/build-single-json.py --only ${{ matrix.lang }}

Expand All @@ -42,7 +42,7 @@ jobs:
run: |
STAGE="build/${{ matrix.lang }}/scripts"
mkdir -p "$STAGE"
rsync -a scripts/ "$STAGE"/
rsync -a src/ "$STAGE"/
echo "STAGE=$STAGE" >> $GITHUB_ENV

# Update version in the staged copy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
STAGE="build/${{ matrix.lang }}/scripts"
mkdir -p "$STAGE"
rsync -a scripts/ "$STAGE"/
rsync -a src/ "$STAGE"/
echo "STAGE=$STAGE" >> $GITHUB_ENV

- name: Resolve i18n tags (locale=${{ matrix.lang }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: |
STAGE="build/${{ matrix.lang }}/scripts"
mkdir -p "$STAGE"
rsync -a scripts/ "$STAGE"/
rsync -a src/ "$STAGE"/
echo "STAGE=$STAGE" >> $GITHUB_ENV

- name: Resolve i18n tags (locale=${{ matrix.lang }})
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ bin/deploy/vscode/__pycache__/*.pyo
bin/deploy/vscode/__pycache__/subprocess_conout.cpython-312.pyc
/bin/sound-generator/soundpack/user/*.wav
.vscode/scripts/__pycache__/subprocess_conout.cpython-312.pyc
simulator/*
10 changes: 10 additions & 0 deletions .vscode/deploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tgt_name": "dashx",
"ethossuite_bin": "C:\\Program Files\\Ethos Suite\\Ethos Suite.exe",
"serial_vid": "0483",
"serial_pid": "5750",
"serial_baud": 115200,
"serial_retries": 10,
"serial_retry_delay": 1.0,
"serial_name_hint": "FrSky"
}
167 changes: 31 additions & 136 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,202 +2,97 @@
"version": "0.2.0",
"configurations": [
{
"name": "Deploy & Launch",
"name": "Deploy & Launch [SIM]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--launch",
"--lang", "en",
],
"console": "integratedTerminal",
"subProcess": false, // prevents auto-attach to child procs
"justMyCode": true,
"stopOnEntry": false,
},
{
"name": "Deploy & Launch [Fast]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--fileext", "fast",
"--launch",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,
"preLaunchTask": "Deploy & Launch [SIM]",
"postDebugTask": "ethos.Start"
},
{
"name": "Deploy & Choose",
"name": "Deploy Radio",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--choose",
"--launch",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,

"preLaunchTask": "Deploy Radio"
},
{
"name": "Deploy & Choose [Fast]",
"name": "Deploy Radio [Fast]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--fileext", "fast",
"--choose",
"--launch",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,

"preLaunchTask": "Deploy Radio [Fast]"
},
{
"name": "Deploy & Launch [choose lang]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--launch",
"--lang", "${input:i18nLocale}",
],
"console": "integratedTerminal",
"subProcess": false, // prevents auto-attach to child procs
"justMyCode": true,
"stopOnEntry": false,
},
{
"name": "Deploy & Choose [choose lang]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--choose",
"--launch",
"--lang", "${input:i18nLocale}",
],
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,
},
{
"name": "Deploy Radio",
"name": "Deploy Radio + Serial Debug",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--radio",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,

"preLaunchTask": "Deploy Radio + Serial Debug"
},
{
"name": "Deploy Radio [Fast]",
"name": "Deploy Radio + Serial Debug [Fast]",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--fileext", "fast",
"--radio",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,

"preLaunchTask": "Deploy Radio + Serial Debug [Fast]"
},
{
"name": "Deploy Radio + Serial Debug",
"name": "Radio: Serial Debug",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--radio",
"--radio-debug",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,

"preLaunchTask": "Radio: Serial Debug"
},
{
"name": "Deploy Radio + Serial Debug [Fast]",
"name": "Switch Ethos Firmware",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--fileext", "fast",
"--radio",
"--radio-debug",
"--lang", "en",
],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"subProcess": false,
"justMyCode": true,
"stopOnEntry": false,
},
{
"name": "Radio: Serial Debug",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": [
"--config-env", "DASHX_CONFIG",
"--radio",
"--connect-only",
"--lang", "en",
],
"console": "integratedTerminal"
},
"postDebugTask": "ethos.SetFirmware"
},
{
"name": "Clear locks",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/.vscode/scripts/deploy.py",
"args": ["--config-env", "DASHX_CONFIG", "--clear-lock"],
"program": "${workspaceFolder}/.vscode/scripts/dummy.py",
"console": "integratedTerminal",
"justMyCode": true,
"noDebug": true
}
],
"inputs": [
{
"id": "i18nLocale",
"type": "pickString",
"description": "Choose language",
"options": [
"en",
"de",
"fr",
"es",
"it",
"nl",
],
"default": "en"

"preLaunchTask": "Clear locks"
}
]
}
Binary file modified .vscode/scripts/__pycache__/subprocess_conout.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Loading