Skip to content

Commit 566839f

Browse files
authored
v8 / 0.8.0: распространяемая версия ЦУП Альтаир
Финальный релиз v8: рабочий CC1101 RX 203 кГц без прикладной XOR-проверки, multi-ID графики, RF uplink, RAW COM, сброс данных, сворачиваемое соединение, документация, фото и новый логотип Альтаира.
1 parent ca0d517 commit 566839f

19 files changed

Lines changed: 2317 additions & 498 deletions

File tree

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Altair v7 checks
1+
name: Altair v8 checks
22

33
on:
44
push:
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Set up Node.js
18-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v5
1919
with:
2020
node-version: '22'
2121

@@ -25,7 +25,8 @@ jobs:
2525
node --check js/parser.js
2626
node --check js/app.js
2727
node --check js/charts.js
28-
node --check js/v7.js
28+
node --check js/v8.js
29+
node --check js/v8-final.js
2930
node --check js/help.js
3031
node --check js/flasher-v5.js
3132
node --check js/serial.js
@@ -35,31 +36,45 @@ jobs:
3536
node - <<'NODE'
3637
const fs = require('fs');
3738
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
38-
if (pkg.version !== '0.7.1') throw new Error(`Expected 0.7.1, got ${pkg.version}`);
39-
const prefix = '02,00001,00015,3.00,4.20,1,';
40-
let xor = 0;
41-
for (const ch of prefix) xor ^= ch.charCodeAt(0);
42-
if (xor !== 0x33) throw new Error(`Expected XOR 0x33, got 0x${xor.toString(16)}`);
43-
if ((prefix + '33').length !== 29) throw new Error('Canonical packet must contain 29 ASCII characters');
44-
console.log('v7.1 package and canonical telemetry packet OK');
39+
if (pkg.version !== '0.8.0') throw new Error(`Expected 0.8.0, got ${pkg.version}`);
40+
if (pkg.build?.win?.icon !== 'assets/altair-logo.png') throw new Error('Altair Windows PNG icon source is not configured');
41+
if (pkg.author !== 'Антон Т.') throw new Error('Application author metadata is missing');
42+
43+
const parser = fs.readFileSync('js/parser.js', 'utf8');
44+
if (!parser.includes('checksumValidation: false')) {
45+
throw new Error('Application checksum validation must be disabled in v8 parser');
46+
}
47+
48+
const app = fs.readFileSync('js/app.js', 'utf8');
49+
if (!app.includes('version: "0.8.0"')) throw new Error('app.js must identify v0.8.0');
50+
if (app.includes('applyV6BrandingAndRadioProfile')) throw new Error('Legacy v6 runtime override is still present');
51+
52+
const charts = fs.readFileSync('js/charts.js', 'utf8');
53+
if (!charts.includes('datasetFor(chart, id)')) throw new Error('Multi-ID chart datasets are missing');
54+
if (!charts.includes('pointRadius: 2.7')) throw new Error('Visible chart points are missing');
55+
56+
const finalRuntime = fs.readFileSync('js/v8-final.js', 'utf8');
57+
if (!finalRuntime.includes('bandwidth: "203"')) throw new Error('v8 UI must enforce RX BW 203 kHz');
58+
59+
console.log('Altair v8 JS/package checks OK');
4560
NODE
4661
47-
- name: Validate v7.1 radio profile and UI patch
62+
- name: Validate v8 radio profile and release files
4863
shell: bash
4964
run: |
50-
grep -Fq 'bandwidth: 203' js/v7.js
51-
grep -Fq '"ANTENNA", "RSSI", "SNR"' js/v7.js
52-
grep -Fq 'pointRadius: 2.6' js/charts.js
53-
grep -Fq 'RADIO_BW_KHZ = 203.0f' firmware/radio_gateway_esp32/src/main_v7.cpp
54-
grep -Fq 'const int state = radio.receive(packet);' firmware/radio_gateway_esp32/src/main_v7.cpp
55-
grep -Fq '203.0f' firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino
56-
grep -Fq 'const int state = radio.receive(packet);' firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino
57-
cmp -s firmware/radio_gateway_esp32/src/main_v7.cpp firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino
58-
grep -Fq '02,00001,00015,3.00,4.20,1,33' firmware/transmitter_stm32_v7/Transmit_v7_static/Transmit_v7_static.ino
59-
grep -Fq '+<main_v7.cpp>' firmware/radio_gateway_esp32/platformio.ini
60-
test -f docs/CUP_Altair_v7_Manual.tex
61-
test -f docs/RELEASE_V7.md
62-
if grep -Fq 'id="CURR"' index.html; then
63-
echo 'CURR must not be present in the v7 main interface'
64-
exit 1
65-
fi
65+
grep -Fq 'RF_FREQ_MHZ = 435.000f' firmware/radio_gateway_esp32/src/main_v8.cpp
66+
grep -Fq 'RF_BW_KHZ = 203.0f' firmware/radio_gateway_esp32/src/main_v8.cpp
67+
grep -Fq 'APPLICATION_XOR_CHECK=DISABLED' firmware/radio_gateway_esp32/src/main_v8.cpp
68+
grep -Fq '$CMD,RF,' firmware/radio_gateway_esp32/src/main_v8.cpp
69+
grep -Fq '$CMD,RADIO_STATUS' firmware/radio_gateway_esp32/src/main_v8.cpp
70+
grep -Fq 'const int state = radio.receive(packet);' firmware/radio_gateway_esp32/src/main_v8.cpp
71+
cmp -s firmware/radio_gateway_esp32/src/main_v8.cpp firmware/radio_gateway_esp32/Altair_Gateway_v8/Altair_Gateway_v8.ino
72+
grep -Fq '+<main_v8.cpp>' firmware/radio_gateway_esp32/platformio.ini
73+
grep -Fq '435.000' js/v8.js
74+
grep -Fq 'rawSerialConsole' js/v8.js
75+
grep -Fq 'Сбросить принятые данные' js/v8.js
76+
test -f docs/CUP_Altair_v8_Manual.tex
77+
test -f docs/RELEASE_V8.md
78+
test -f docs/media/mcc-technoprom.jpg
79+
test -f docs/media/cubesat-technoprom.jpg
80+
test -f assets/altair-logo.png

.github/workflows/windows-installer.yml

Lines changed: 67 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ЦУП Альтаир — Windows installer
1+
name: ЦУП Альтаир v8 — Windows installer
22

33
on:
44
push:
@@ -20,19 +20,19 @@ jobs:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
2222

23-
- name: Compile v7 LaTeX manual
23+
- name: Compile v8 LaTeX manual
2424
uses: xu-cheng/latex-action@v4
2525
with:
26-
root_file: CUP_Altair_v7_Manual.tex
26+
root_file: CUP_Altair_v8_Manual.tex
2727
working_directory: docs
2828
work_in_root_file_dir: true
2929
latexmk_use_xelatex: true
3030

3131
- name: Upload PDF manual
3232
uses: actions/upload-artifact@v4
3333
with:
34-
name: CUP-Altair-v7-Manual
35-
path: docs/CUP_Altair_v7_Manual.pdf
34+
name: CUP-Altair-v8-Manual
35+
path: docs/CUP_Altair_v8_Manual.pdf
3636
if-no-files-found: error
3737
retention-days: 30
3838

@@ -47,7 +47,7 @@ jobs:
4747
- name: Download compiled PDF manual
4848
uses: actions/download-artifact@v4
4949
with:
50-
name: CUP-Altair-v7-Manual
50+
name: CUP-Altair-v8-Manual
5151
path: docs
5252

5353
- name: Set up Python
@@ -58,11 +58,11 @@ jobs:
5858
- name: Install PlatformIO
5959
run: python -m pip install --upgrade platformio
6060

61-
- name: Verify ESP32 release sources are identical
61+
- name: Verify ESP32 v8 release sources are identical
6262
shell: pwsh
6363
run: |
64-
$ino = "firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino"
65-
$cpp = "firmware/radio_gateway_esp32/src/main_v7.cpp"
64+
$ino = "firmware/radio_gateway_esp32/Altair_Gateway_v8/Altair_Gateway_v8.ino"
65+
$cpp = "firmware/radio_gateway_esp32/src/main_v8.cpp"
6666
$inoHash = (Get-FileHash -Algorithm SHA256 $ino).Hash
6767
$cppHash = (Get-FileHash -Algorithm SHA256 $cpp).Hash
6868
Write-Host "Arduino sketch SHA256: $inoHash"
@@ -71,21 +71,18 @@ jobs:
7171
throw "ESP32 Arduino sketch and bundled PlatformIO source differ. Release blocked."
7272
}
7373
74-
- name: Compile ESP32 radio gateway v7.1
74+
- name: Compile ESP32 radio gateway v8
7575
run: pio run -d firmware/radio_gateway_esp32
7676

77-
- name: Compile STM32 v7 transmitter reference
78-
run: pio run -d firmware/transmitter_stm32_v7
79-
8077
- name: Prepare bundled ESP32 firmware
8178
shell: pwsh
8279
run: |
8380
$ErrorActionPreference = "Stop"
8481
$buildDir = "firmware/radio_gateway_esp32/.pio/build/esp32dev"
85-
$sourceCode = Get-Content "firmware/radio_gateway_esp32/src/main_v7.cpp" -Raw
82+
$sourceCode = Get-Content "firmware/radio_gateway_esp32/src/main_v8.cpp" -Raw
8683
87-
if ($sourceCode -notmatch 'FW_VERSION_V7\[\]\s*=\s*"([^"]+)"') {
88-
throw "Unable to read FW_VERSION_V7 from ESP32 gateway source."
84+
if ($sourceCode -notmatch 'FW_VERSION\[\]\s*=\s*"([^"]+)"') {
85+
throw "Unable to read FW_VERSION from ESP32 gateway source."
8986
}
9087
$firmwareVersion = $Matches[1]
9188
@@ -97,7 +94,7 @@ jobs:
9794
@{ Source = "$buildDir/bootloader.bin"; File = "gateway-bootloader.bin"; Label = "Bootloader"; Address = 4096 },
9895
@{ Source = "$buildDir/partitions.bin"; File = "gateway-partitions.bin"; Label = "Partition table"; Address = 32768 },
9996
@{ Source = $bootApp0.FullName; File = "gateway-boot_app0.bin"; Label = "boot_app0"; Address = 57344 },
100-
@{ Source = "$buildDir/firmware.bin"; File = "gateway-firmware.bin"; Label = "Altair v7.1 radio gateway"; Address = 65536 }
97+
@{ Source = "$buildDir/firmware.bin"; File = "gateway-firmware.bin"; Label = "Altair v8 radio gateway"; Address = 65536 }
10198
)
10299
103100
$manifestImages = @()
@@ -107,7 +104,13 @@ jobs:
107104
Copy-Item $image.Source $target -Force
108105
$fileInfo = Get-Item $target
109106
$md5 = (Get-FileHash -Algorithm MD5 $target).Hash.ToLowerInvariant()
110-
$manifestImages += [ordered]@{ file=$image.File; label=$image.Label; address=$image.Address; size=$fileInfo.Length; md5=$md5 }
107+
$manifestImages += [ordered]@{
108+
file=$image.File
109+
label=$image.Label
110+
address=$image.Address
111+
size=$fileInfo.Length
112+
md5=$md5
113+
}
111114
}
112115
113116
$appVersion = (Get-Content package.json -Raw | ConvertFrom-Json).version
@@ -117,7 +120,7 @@ jobs:
117120
targetChip = "ESP32"
118121
firmwareVersion = $firmwareVersion
119122
applicationVersion = $appVersion
120-
buildLabel = "Altair MCC v$appVersion / v7.1-proven-rx-bw203"
123+
buildLabel = "Altair MCC v$appVersion / v8-rx203-xor-bypass-rftx"
121124
flashMode = "dio"
122125
flashFreq = "40m"
123126
flashSize = "4MB"
@@ -137,21 +140,20 @@ jobs:
137140
- name: Build Windows installer
138141
run: npm run dist:win
139142

140-
- name: Upload Windows installer artifact
143+
- name: Upload v8 artifact
141144
uses: actions/upload-artifact@v4
142145
with:
143-
name: CUP-Altair-v7.1-Windows-Installer
146+
name: CUP-Altair-v8-Windows-Installer
144147
path: |
145148
release/*.exe
146149
release/*.yml
147150
release/*.blockmap
148151
bundled_firmware/*.json
149152
bundled_firmware/*.bin
150-
firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino
151-
firmware/transmitter_stm32_v7/Transmit_v7_static/Transmit_v7_static.ino
152-
docs/CUP_Altair_v7_Manual.pdf
153-
docs/CUP_Altair_v7_Manual.tex
154-
docs/RELEASE_V7.md
153+
firmware/radio_gateway_esp32/Altair_Gateway_v8/Altair_Gateway_v8.ino
154+
docs/CUP_Altair_v8_Manual.pdf
155+
docs/CUP_Altair_v8_Manual.tex
156+
docs/RELEASE_V8.md
155157
if-no-files-found: error
156158
retention-days: 30
157159

@@ -164,31 +166,51 @@ jobs:
164166
"version=$version" >> $env:GITHUB_OUTPUT
165167
"tag=v$version" >> $env:GITHUB_OUTPUT
166168
167-
- name: Publish GitHub Release when this version is new
169+
- name: Publish GitHub Release v8
168170
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
169171
shell: pwsh
170172
env:
171173
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172174
RELEASE_TAG: ${{ steps.app_version.outputs.tag }}
173175
run: |
174176
gh release view $env:RELEASE_TAG *> $null
175-
if ($LASTEXITCODE -eq 0) {
177+
if ($LASTEXITCODE -ne 0) {
178+
$installer = Get-ChildItem -Path release -Filter "CUP-Altair-Setup-*.exe" | Select-Object -First 1
179+
if (-not $installer) { throw "Altair Windows installer was not found in release/." }
180+
181+
gh release create $env:RELEASE_TAG `
182+
$installer.FullName `
183+
"firmware/radio_gateway_esp32/Altair_Gateway_v8/Altair_Gateway_v8.ino" `
184+
"docs/CUP_Altair_v8_Manual.pdf" `
185+
"docs/CUP_Altair_v8_Manual.tex" `
186+
"docs/RELEASE_V8.md" `
187+
"bundled_firmware/gateway-firmware.bin" `
188+
"bundled_firmware/manifest.json" `
189+
--target main `
190+
--title "ЦУП Альтаир v8 ($env:RELEASE_TAG) — Миссия на Луну" `
191+
--notes-file "docs/RELEASE_V8.md" `
192+
--latest
193+
if ($LASTEXITCODE -ne 0) { throw "Unable to publish $env:RELEASE_TAG" }
194+
} else {
176195
Write-Host "Release $env:RELEASE_TAG already exists."
177-
exit 0
178196
}
179-
$installer = Get-ChildItem -Path release -Filter "CUP-Altair-Setup-*.exe" | Select-Object -First 1
180-
if (-not $installer) { throw "Altair Windows installer was not found in release/." }
181-
182-
gh release create $env:RELEASE_TAG `
183-
$installer.FullName `
184-
"firmware/radio_gateway_esp32/Altair_Gateway_v7/Altair_Gateway_v7.ino" `
185-
"firmware/transmitter_stm32_v7/Transmit_v7_static/Transmit_v7_static.ino" `
186-
"docs/CUP_Altair_v7_Manual.pdf" `
187-
"docs/CUP_Altair_v7_Manual.tex" `
188-
"docs/RELEASE_V7.md" `
189-
"bundled_firmware/gateway-firmware.bin" `
190-
"bundled_firmware/manifest.json" `
191-
--target main `
192-
--title "ЦУП Альтаир v7.1 ($env:RELEASE_TAG) — Технопром 2026. Миссия на Луну" `
193-
--notes-file "docs/RELEASE_V7.md" `
194-
--latest
197+
198+
- name: Remove previous GitHub releases after v8 is published
199+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
200+
shell: pwsh
201+
env:
202+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
203+
RELEASE_TAG: ${{ steps.app_version.outputs.tag }}
204+
run: |
205+
$ErrorActionPreference = "Stop"
206+
gh release view $env:RELEASE_TAG *> $null
207+
if ($LASTEXITCODE -ne 0) { throw "Current release $env:RELEASE_TAG is not published; old releases will not be removed." }
208+
209+
$tags = gh release list --limit 100 --json tagName --jq '.[].tagName'
210+
foreach ($tag in $tags) {
211+
if ($tag -and $tag -ne $env:RELEASE_TAG) {
212+
Write-Host "Deleting old release: $tag"
213+
gh release delete $tag --yes --cleanup-tag
214+
if ($LASTEXITCODE -ne 0) { throw "Unable to delete old release $tag" }
215+
}
216+
}

0 commit comments

Comments
 (0)