From d209a472a620b79c74702a4005b4351f5610ba30 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 30 Apr 2026 09:11:06 -0400 Subject: [PATCH 1/5] feat: broadcast uaux (12V aux battery) on CAN 0x210 (SKUDAK-448) Adds AddSend for Param::uaux at CAN ID 0x210, bit 0, length 8, gain=10. Transmits 12V aux battery voltage in decivolts/0.1V steps (e.g. 125 = 12.5V). VCU reads byte 0 of 0x210 for 12V battery protection logic per SKUDAK-448. Co-Authored-By: Claude Sonnet 4.6 --- src/chargercan.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/chargercan.cpp b/src/chargercan.cpp index bd15864..e20d901 100644 --- a/src/chargercan.cpp +++ b/src/chargercan.cpp @@ -99,4 +99,7 @@ void ChargerCAN::MapMessages(CanMap* can) can->AddSend(Param::udc, 0x109, 8, 16, 1); can->AddSend(Param::idc, 0x109, 24, 16, 1); can->AddSend(Param::opmode, 0x109, 40, 3, 5); //Set charging and connlock at once + + /***** Auxiliary TX *****/ + can->AddSend(Param::uaux, 0x210, 0, 8, 10); //12V aux battery: byte 0, gain=10 (0.1V/decivolts, SKUDAK-448) } -- 2.52.0 From 224e7ff2864643a731b4b55c37f42868c57e2028 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 30 Apr 2026 09:55:53 -0400 Subject: [PATCH 2/5] ci: add Gitea Actions build workflow Builds firmware on PR/push to main. Initializes libopencm3 and libopeninv submodules then runs make. Uploads stm32_charger.bin as a 30-day retained artifact. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/build.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..f8adaa5 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,38 @@ +name: Build Firmware + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +jobs: + build: + name: Build stm32-teslacharger + runs-on: fedora + + steps: + - name: Checkout with submodules + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Build libopencm3 + run: make -C libopencm3 -j$(nproc) + + - name: Build firmware + run: make -j$(nproc) + + - name: Show binary size + run: | + arm-none-eabi-size stm32_charger.elf + ls -lh stm32_charger.bin + + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: stm32-teslacharger-${{ github.sha }} + path: stm32_charger.bin + retention-days: 30 -- 2.52.0 From 7f1d417db6fe0360d6897bfbb85c1e6680a66733 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 30 Apr 2026 10:01:40 -0400 Subject: [PATCH 3/5] fix: use HTTPS submodule URLs for CI (SSH has no GitHub key on runner) Co-Authored-By: Claude Sonnet 4.6 --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9d3d04c..e53231c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "libopencm3"] path = libopencm3 - url = git@github.com:jsphuebner/libopencm3.git + url = https://github.com/jsphuebner/libopencm3.git [submodule "libopeninv"] path = libopeninv - url = git@github.com:jsphuebner/libopeninv.git + url = https://github.com/jsphuebner/libopeninv.git -- 2.52.0 From 69822ca08ec3a0e2a310ea445b4e34a00db0d4c7 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 30 Apr 2026 10:40:24 -0400 Subject: [PATCH 4/5] fix: use 'make get-deps' and 'make images' to skip host unit tests in CI --- .gitea/workflows/build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f8adaa5..69eef2a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -20,15 +20,13 @@ jobs: fetch-depth: 0 - name: Build libopencm3 - run: make -C libopencm3 -j$(nproc) + run: make get-deps - name: Build firmware - run: make -j$(nproc) + run: make images -j$(nproc) - name: Show binary size - run: | - arm-none-eabi-size stm32_charger.elf - ls -lh stm32_charger.bin + run: ls -lh stm32_charger.bin - name: Upload binary uses: actions/upload-artifact@v3 -- 2.52.0 From 3d2dbbc70979330f8f3c71d2908d8d52a6b594e9 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 30 Apr 2026 11:01:41 -0400 Subject: [PATCH 5/5] fix: create obj/ directory before parallel build --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 69eef2a..9000b86 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -23,7 +23,7 @@ jobs: run: make get-deps - name: Build firmware - run: make images -j$(nproc) + run: make directories && make images -j$(nproc) - name: Show binary size run: ls -lh stm32_charger.bin -- 2.52.0