Skip to content
Open

BLCU #544

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6cc8eeb
feat*: flashing view integrated onto main app. changed electron confi…
l-castel May 11, 2026
bd050c0
fix(workspace): fixed pnpm workspace to integrate the flashing-view r…
l-castel May 13, 2026
7b5664b
fix(workspace): added python package and logger to .gitignore
l-castel May 14, 2026
55e024c
fix(electron): fixed gitignores.
l-castel May 14, 2026
43d26c4
chore(electron-app): stop tracking python and logger folders
l-castel May 14, 2026
ef462b6
chore(testing-view): remove embedded flash-station feature
l-castel Jun 1, 2026
537c0f7
chore(electron-app): revert to develop baseline
l-castel Jun 1, 2026
73349a6
chore(flashing-view): move app into frontend/ alongside other views
l-castel Jun 1, 2026
4459172
feat(ui-kit): add Table component and missing icons; update flashing-…
l-castel Jun 9, 2026
7dc018d
chore(old flashing-view): deleted old flashing-view implementation
l-castel Jun 9, 2026
28f3e4e
fix(GITIGNORE): updated gitignore
l-castel Jun 9, 2026
1083e5e
fix(build): fixed build errors
l-castel Jun 9, 2026
bc88c9b
fix(ci): install flashing-view + competition-view deps in frontend-te…
l-castel Jun 9, 2026
4cdd818
fix(electron): typo on electron config
l-castel Jun 9, 2026
90263d6
fix(logo): added logo to flashing view header
l-castel Jun 17, 2026
c4de2a6
docs(BLCU-programming): refactor old files
JavierRibaldelRio Jun 17, 2026
cca4b20
chore(blcu-programming): integration in pnpm
JavierRibaldelRio Jun 17, 2026
25fe715
refactor(BLCU-Programming): separate HTTP server
JavierRibaldelRio Jun 17, 2026
2ca2d0d
refactor(BLCU-Programming): create configuration file
JavierRibaldelRio Jun 17, 2026
f19dec8
fix(BLCU-programming): sync error
JavierRibaldelRio Jun 17, 2026
4ed7704
docs(blcu-programming): add comments
JavierRibaldelRio Jun 17, 2026
128030f
fix(electron): reverted unnecessary electron config changes
l-castel Jun 18, 2026
8ff0f31
feat(flashing-view): deep refactor of proposed implementation. change…
l-castel Jun 18, 2026
271fb08
feat(flashing-view): integrated with backend, tested endpoints.
l-castel Jun 18, 2026
22321d4
feat(flashing-view): replaced upload function wih flash function. imp…
l-castel Jun 18, 2026
b918b21
Merge branch 'control-station/blcu' into features/flashing-view
l-castel Jun 18, 2026
309dc09
feat(flashing-view): added flashing view
l-castel Jun 18, 2026
ceae5bb
fix(repo): pnpm remove duplicate packages
JavierRibaldelRio Jun 18, 2026
f2ef139
Merge branch 'develop' into control-station/blcu
JavierRibaldelRio Jun 18, 2026
3012a0c
feat(BLCU): update blcu config
JavierRibaldelRio Jun 18, 2026
d78fb9a
chore(BLCU-programming): new dependenc
JavierRibaldelRio Jun 18, 2026
422a0e1
feat: udp server
JavierRibaldelRio Jun 18, 2026
adb5121
fix(BLCU): correct http api port
JavierRibaldelRio Jun 18, 2026
7c068d6
feat(flashing-view): added theme toggle.
l-castel Jun 19, 2026
ff0998c
feat(flashing-view): updated polling function to inlcude correct payl…
l-castel Jun 19, 2026
2c09e45
feat(flashing-view): added operational blcu state.
l-castel Jun 19, 2026
8a1d860
wip: config
JavierRibaldelRio Jun 19, 2026
77108e8
fix(blcu-programming): recibe BLCU status
JavierRibaldelRio Jun 19, 2026
c095440
feat(BLCU-programming): ping other boards
JavierRibaldelRio Jun 19, 2026
dfa9714
fix: change period & api route
JavierRibaldelRio Jun 19, 2026
d8e3667
fix(BLCU-programming): cors error
JavierRibaldelRio Jun 19, 2026
11b99e9
feat(BLCU-Programming): improve flashing
JavierRibaldelRio Jun 19, 2026
28add65
feat: tcp connection
JavierRibaldelRio Jun 19, 2026
38ae5d1
wip(BLCU-programming): update config.json
JavierRibaldelRio Jun 20, 2026
4c3da30
Merge branch 'develop' into control-station/blcu
JavierRibaldelRio Jun 20, 2026
ca4e314
feat(BLCU-programming): send tcp order
JavierRibaldelRio Jun 20, 2026
c75598a
fix(BLCU-programming): updade setting
JavierRibaldelRio Jun 20, 2026
4fcd4c4
wip: include flashing view into release and electron
JavierRibaldelRio Jun 20, 2026
a403cc1
fix(logs): fixed ts compiler error, moved logs section, added error c…
l-castel Jun 20, 2026
393e411
fix(flashing-view): add env port for electron integration
JavierRibaldelRio Jun 21, 2026
f375852
fix(BLCU-programming): add env data
JavierRibaldelRio Jun 21, 2026
1968202
feat(electron): add blcu programming
JavierRibaldelRio Jun 21, 2026
6c36639
fix(electron-app): wait 5 seconds before opening flashing view to giv…
JavierRibaldelRio Jun 21, 2026
32a4cdd
fix(workflows): release yml windows blcu -installer
JavierRibaldelRio Jun 21, 2026
c9608e0
fix(electron-app): build workflow
JavierRibaldelRio Jun 21, 2026
b4b1661
docs
JavierRibaldelRio Jun 21, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/frontend-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile --filter=testing-view --filter=competition-view --filter=ui --filter=core
run: pnpm install --frozen-lockfile --filter=testing-view --filter=flashing-view --filter=competition-view --filter=ui --filter=core

- name: Build frontend
run: pnpm build --filter="./frontend/**"
Expand Down
103 changes: 101 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build with Turbo
run: pnpm turbo build --filter=testing-view --filter=competition-view
run: pnpm turbo build --filter=testing-view --filter=competition-view --filter=flashing-view

- uses: actions/upload-artifact@v4
with:
Expand All @@ -80,6 +80,12 @@ jobs:
path: frontend/competition-view/dist/**
retention-days: 1

- uses: actions/upload-artifact@v4
with:
name: flashing-dist
path: frontend/flashing-view/dist/**
retention-days: 1

build-backend:
name: Build Backend - ${{ matrix.os }}
needs: determine-version
Expand Down Expand Up @@ -125,22 +131,103 @@ jobs:
path: electron-app/binaries/${{ matrix.binary }}
retention-days: 1

build-blcu:
name: Build BLCU - ${{ matrix.os }}
needs: determine-version
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- os: windows-latest
binary: blcu-programming-windows-amd64.exe
binary-base: blcu-programming-windows-amd64
- os: ubuntu-latest
binary: blcu-programming-linux-amd64
binary-base: blcu-programming-linux-amd64
- os: macos-latest
binary: blcu-programming-darwin-arm64
binary-base: blcu-programming-darwin-arm64
- os: macos-15-intel
binary: blcu-programming-darwin-amd64
binary-base: blcu-programming-darwin-amd64
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Create virtual environment
working-directory: blcu-programming
run: python -m venv .venv-build

- name: Install dependencies
working-directory: blcu-programming
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
.venv-build/Scripts/pip install -r requirements-build.txt
else
.venv-build/bin/pip install -r requirements-build.txt
fi

- name: Build with PyInstaller
working-directory: blcu-programming
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
PYTHON=".venv-build/Scripts/python"
else
PYTHON=".venv-build/bin/python"
fi
if [ "${{ runner.os }}" = "Windows" ]; then
PATH_SEP=";"
else
PATH_SEP=":"
fi
"$PYTHON" -m PyInstaller \
--clean \
--noconfirm \
--onefile \
--name "${{ matrix.binary-base }}" \
--distpath "../electron-app/binaries" \
--hidden-import uvicorn.loops.auto \
--hidden-import uvicorn.protocols.http.auto \
--hidden-import uvicorn.protocols.websockets.auto \
--hidden-import uvicorn.lifespan.on \
--hidden-import multipart \
--hidden-import multipart.multiparser \
--paths "." \
--add-data "BLCU-config.json${PATH_SEP}." \
api/main.py

- uses: actions/upload-artifact@v4
with:
name: blcu-${{ matrix.os }}
path: electron-app/binaries/${{ matrix.binary }}
retention-days: 1

package-and-upload:
name: Package & Upload - ${{ matrix.os }}
needs: [determine-version, create-draft-release, build-frontend, build-backend]
needs: [determine-version, create-draft-release, build-frontend, build-backend, build-blcu]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- os: windows-latest
binary: backend-windows-amd64.exe
blcu-binary: blcu-programming-windows-amd64.exe
- os: ubuntu-latest
binary: backend-linux-amd64
blcu-binary: blcu-programming-linux-amd64
- os: macos-latest
binary: backend-darwin-arm64
blcu-binary: blcu-programming-darwin-arm64
- os: macos-15-intel
binary: backend-darwin-amd64
blcu-binary: blcu-programming-darwin-amd64
steps:
- uses: actions/checkout@v4

Expand All @@ -150,6 +237,12 @@ jobs:
name: backend-${{ matrix.os }}
path: electron-app/binaries

- name: Download BLCU binary
uses: actions/download-artifact@v4
with:
name: blcu-${{ matrix.os }}
path: electron-app/binaries

- name: Set executable permissions (Unix)
if: runner.os != 'Windows'
run: chmod +x electron-app/binaries/*
Expand All @@ -166,6 +259,12 @@ jobs:
name: competition-dist
path: electron-app/renderer/competition-view

- name: Download flashing-view dist
uses: actions/download-artifact@v4
with:
name: flashing-dist
path: electron-app/renderer/flashing-view

- uses: pnpm/action-setup@v4
with:
version: 10.26.0
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ node_modules/

# Global binaries
*.exe

# electron modules
electron-app/python
electron-app/logger
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Before starting, ensure you have the following installed:
- **PNPM** (v10.26.0+)
- **Node.js** (v20+)
- **Go** (for the backend)
- **Python** (v3.11+, for the BLCU programming service)

`pnpm install` automatically creates the Python virtual environment and installs dependencies for the BLCU programming service on Windows, macOS, and Linux.

---

Expand All @@ -24,7 +27,9 @@ Our `pnpm-workspace.yaml` defines the following workspaces:
| :----------------------------- | :------- | :---------------------------------------------------- |
| `testing-view` | TS/React | Web interface for telemetry testing |
| `competition-view` | TS/React | UI for the competition |
| `flashing-view` | TS/React | UI for flashing firmware to the BLCU board |
| `backend` | Go | Data ingestion and pod communication server |
| `blcu-programming` | Python | FastAPI service that flashes firmware to the BLCU board via TFTP |
| `hyperloop-control-station` | JS | The main Control Station electron desktop application |
| `e2e` | TS | End-to-end tests for the whole app (Playwright) |
| `@workspace/ui` | TS/React | Shared UI component library (frontend-kit) |
Expand Down Expand Up @@ -67,8 +72,14 @@ All Turbo scripts support filtering to target specific workspaces:
- `pnpm build:linux` – Packages the Electron app for Linux.
- `pnpm build:mac` – Packages the Electron app for macOS.

#### Frontend View Scripts

- `pnpm build:testing-view` – Builds only the Testing View frontend.
- `pnpm build:competition-view` – Builds only the Competition View frontend.
- `pnpm build:flashing-view` – Builds only the Flashing View frontend.

#### Utility Scripts

- `pnpm ui:add <component-name>` - To add shadcn/ui components

> Note: don't forget to also include it in frontend-kit/ui/src/components/shadcn/index.ts to be able to access it from @workspace/ui
> Note: don't forget to also include it in frontend-kit/ui/src/components/shadcn/index.ts to be able to access it from @workspace/ui
13 changes: 13 additions & 0 deletions backend/package-lock.json

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

8 changes: 8 additions & 0 deletions backend/pkg/adj/validator.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package adj

import (
"os"
"os/exec"
"path"
"strings"
Expand Down Expand Up @@ -62,6 +63,13 @@ func Validate() {
// If none of the candidates are found, an empty string is returned,
// indicating that no Python interpreter is available.
func pythonCommand() string {
// Prefer bundled Python shipped with the Electron app
if bundled := os.Getenv("HYPERLOOP_PYTHON_PATH"); bundled != "" {
if _, err := os.Stat(bundled); err == nil {
return bundled
}
}

candidates := []string{"python3", "python", "py"}

for _, c := range candidates {
Expand Down
44 changes: 44 additions & 0 deletions blcu-programming/BLCU-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"blcu": {
"host": "192.168.0.27",
"port": 69,
"UDP_PORT_DESTINATION": 50420,
"TCP_PORT_SERVER": 50500

},
"adj-data": {
"LVBMS": "192.168.1.11",
"HVBMS": "192.168.1.17",
"PCU": "192.168.1.5",
"LCU": "192.168.1.4",
"VCU": "192.168.1.3"
},
"orders":{
"Write Program": {"id":"700", "description":"Write Program to BLCU", "enum-order": [
"VCU",
"HVBMS",
"LVBMS",
"PCU",
"LCU"
]}
},
"packet":{

"id": 1,
"general_state_machine": [
"Connecting",
"Operational",
"Fault"
] ,
"operational_state_machine":[
"Idle",
"Flashing"
]
},
"api": {
"host": "0.0.0.0",
"port": 8069,
"log_level": "info"
},
"log_file": "tftp_server_activity.log"
}
44 changes: 44 additions & 0 deletions blcu-programming/BLCU-test-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"blcu": {
"host": "127.0.0.27",
"port": 69,
"UDP_PORT_DESTINATION": 50400,
"TCP_PORT_SERVER": 50500

},
"adj-data": {
"LVBMS": "192.168.1.11",
"HVBMS": "192.168.1.17",
"PCU": "192.168.1.5",
"LCU": "192.168.1.4",
"VCU": "192.168.1.3"
},
"orders":{
"Write Program": {"id":"700", "description":"Write Program to BLCU", "enum-order": [
"VCU",
"HVBMS",
"LVBMS",
"PCU",
"LCU"
]}
},
"packet":{

"id": 134,
"general_state_machine": [
"Connecting",
"Operational",
"Fault"
] ,
"operational_state_machine":[
"Idle",
"Flashing"
]
},
"api": {
"host": "0.0.0.0",
"port": 8069,
"log_level": "info"
},
"log_file": "tftp_server_activity.log"
}
Loading
Loading