Skip to content

Commit 2ddcfae

Browse files
hhvrcclaude
andcommitted
Merge branch 'develop' into feature/improve-led-managers
Resolve merge conflicts keeping MonoLedDriver/RgbLedDriver renames while adopting develop's improvements: atomic state flags, cooperative task shutdown, SimpleMutex wrappers, EStopState::ActiveClearing, IP event handler, CSR_PATTERN macro, and thread-safe gateway connection management. Fix MonoLedDriver LEDC speed mode to be chip-agnostic (SOC_LEDC_SUPPORT_HS_MODE), add missing ledc_update_duty call, and correct FnProxy usage (no address-of on variable template). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents 3f67132 + 78a3fa3 commit 2ddcfae

453 files changed

Lines changed: 22110 additions & 17115 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/mighty-pets-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'frontend': patch
3+
---
4+
5+
Improve authtoken handling in 401 responses
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'firmware': patch
3+
---
4+
5+
fix: Serial now uses CRLF rather than just LF for better compatibility

.clang-format

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ AlignTrailingComments:
6767
Kind: Always
6868
OverEmptyLines: 1
6969
AllowAllArgumentsOnNextLine: true
70-
AllowAllParametersOfDeclarationOnNextLine: false
70+
AllowAllParametersOfDeclarationOnNextLine: true
7171
AllowShortBlocksOnASingleLine: Always
7272
AllowShortCaseLabelsOnASingleLine: false
7373
AllowShortEnumsOnASingleLine: false
@@ -87,7 +87,7 @@ BraceWrapping:
8787
AfterClass: false
8888
AfterControlStatement: MultiLine
8989
AfterEnum: false
90-
AfterFunction: false
90+
AfterFunction: true
9191
AfterNamespace: false
9292
AfterStruct: false
9393
AfterUnion: false
@@ -100,7 +100,7 @@ BraceWrapping:
100100
SplitEmptyFunction: true
101101
SplitEmptyRecord: true
102102
SplitEmptyNamespace: true
103-
BreakAfterAttributes: Never
103+
BreakAfterAttributes: Leave
104104
BreakBeforeBinaryOperators: All
105105
BreakBeforeConceptDeclarations: Allowed
106106
BreakBeforeInlineASMColon: Always
@@ -125,12 +125,9 @@ IndentWrappedFunctionNames: true
125125
InsertNewlineAtEOF: true
126126
InsertTrailingCommas: Wrapped
127127
IntegerLiteralSeparator:
128-
Binary: 4
129-
BinaryMinDigits: 9
130-
Decimal: 3
131-
DecimalMinDigits: 5
132-
Hex: 2
133-
HexMinDigits: 9
128+
Binary: 0
129+
Decimal: 0
130+
Hex: 0
134131
KeepEmptyLinesAtEOF: false
135132
KeepEmptyLinesAtTheStartOfBlocks: false
136133
LambdaBodyIndentation: OuterScope

.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
Checks: '*, -bugprone-easily-swappable-parameters, -modernize-use-trailing-return-type'
3+
4+
ExcludePaths: '.pio/build/|include/serialization/_fbs/'

.claude/hooks/clang-format.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
FILE_PATH=$(jq -r '.tool_input.file_path // empty')
3+
4+
if [[ "$FILE_PATH" =~ \.(cpp|c|h|hpp|cc|cxx)$ ]] && [[ "$FILE_PATH" != */_fbs/* ]]; then
5+
npx clang-format -i "$FILE_PATH"
6+
fi
7+
8+
exit 0

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Edit|Write",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/clang-format.sh"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

.github/actions/build-firmware/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ runs:
2121
- uses: actions/cache@v4
2222
with:
2323
path: |
24+
.pio/libdeps
2425
~/.platformio/platforms
2526
~/.platformio/packages
2627
~/.platformio/.cache

.github/actions/build-frontend/action.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: build-frontend
22
description: Builds the frontend and uploads it as an artifact
33
inputs:
4-
node-version:
5-
description: 'NodeJS runtime version to use'
6-
required: true
74
skip-checkout:
85
description: 'If true, skips checkout'
96
default: false
@@ -18,21 +15,43 @@ runs:
1815
frontend
1916
path: ${{ github.repository }}
2017

18+
- uses: pnpm/action-setup@v4
19+
name: Install pnpm
20+
with:
21+
package_json_file: ./frontend/package.json
22+
run_install: false
23+
2124
- uses: actions/setup-node@v4
2225
with:
23-
node-version: ${{ inputs.node-version }}
24-
cache: 'npm'
25-
cache-dependency-path: ./frontend/package-lock.json
26+
node-version-file: ./frontend/package.json
27+
cache: 'pnpm'
28+
cache-dependency-path: ./frontend/pnpm-lock.yaml
2629

2730
- name: Install dependencies
2831
working-directory: ./frontend
2932
shell: bash
30-
run: npm ci
33+
run: pnpm install --frozen-lockfile --strict-peer-dependencies
34+
35+
- name: Check
36+
working-directory: ./frontend
37+
shell: bash
38+
run: pnpm run check
39+
40+
# FIXME: Playwirght is not working: Error: browserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium_headless_shell-1161/chrome-linux/headless_shell
41+
# - name: Install playwright
42+
# working-directory: ./frontend
43+
# shell: bash
44+
# run: pnpx playwright install --with-deps
45+
46+
- name: Test
47+
working-directory: ./frontend
48+
shell: bash
49+
run: pnpm test:unit # TODO: Change back to pnpm test when playwright is working
3150

3251
- name: Build
3352
working-directory: ./frontend
3453
shell: bash
35-
run: npm run build
54+
run: pnpm run build
3655

3756
- name: Upload artifacts
3857
uses: actions/upload-artifact@v4
Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
name: cdn-bump-version
22
description: Uploads version file to CDN
33
inputs:
4-
cf-bucket:
5-
description: Name of the S3 bucket
4+
bunny-stor-hostname:
5+
description: Bunny SFTP Hostname
6+
required: true
7+
bunny-stor-username:
8+
description: Bunny SFTP Username
9+
required: true
10+
bunny-stor-password:
11+
description: Bunny SFTP Password
12+
required: true
13+
bunny-api-key:
14+
description: Bunny API key
15+
required: true
16+
bunny-cdn-url:
17+
description: Bunny pull zone base url e.g. https://firmware.openshock.org (no trailing slash)
618
required: true
719
version:
820
description: 'Version of the release'
@@ -14,9 +26,26 @@ inputs:
1426
runs:
1527
using: composite
1628
steps:
17-
- name: Upload version file
29+
- name: Prepare Upload Folder
1830
shell: bash
1931
run: |
2032
mkdir -p upload
2133
echo "${{ inputs.version }}" >> upload/version-${{ inputs.release-channel }}.txt
22-
rclone copy upload cdn:${{ inputs.cf-bucket }}/
34+
35+
- name: Upload version file
36+
uses: milanmk/actions-file-deployer@master
37+
with:
38+
remote-protocol: "sftp"
39+
remote-host: "${{ inputs.bunny-stor-hostname }}"
40+
remote-user: "${{ inputs.bunny-stor-username }}"
41+
remote-password: "${{ inputs.bunny-stor-password }}"
42+
remote-path: "/"
43+
local-path: "upload"
44+
sync: "full"
45+
46+
- name: Purge CDN cache
47+
shell: bash
48+
run: |
49+
curl -X POST "https://api.bunny.net/purge?url=${{ inputs.bunny-cdn-url }}/version-${{ inputs.release-channel }}.txt" \
50+
-H "Content-Type: application/json" \
51+
-H "AccessKey: ${{ inputs.bunny-api-key }}"
Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
11
name: cdn-prepare
2-
description: Prepares the CDN for firmware uploads
2+
description: Bunny sshpass and knowhosts setup
33
inputs:
4-
cf-account-id:
5-
description: Cloudflare Account ID
6-
required: true
7-
cf-access-key-id:
8-
description: Cloudflare Access Key ID
9-
required: true
10-
cf-secret-access-key:
11-
description: Cloudflare Secret Access Key
4+
bunny-ssh-knownhosts:
5+
description: Bunny SFTP Hostname
126
required: true
137

148
runs:
159
using: composite
1610
steps:
17-
- name: Install rclone
11+
- name: Install sshpass
1812
shell: bash
19-
run: sudo apt-get install -y rclone
13+
run: sudo apt-get install -y sshpass
2014

21-
- name: Configure rclone
15+
- name: Configure known hosts
2216
shell: bash
2317
run: |
24-
mkdir -p ~/.config/rclone/
25-
conf=~/.config/rclone/rclone.conf
26-
echo "[cdn]" >> $conf
27-
echo "type = s3" >> $conf
28-
echo "provider = Cloudflare" >> $conf
29-
echo "access_key_id = ${{ inputs.cf-access-key-id }}" >> $conf
30-
echo "secret_access_key = ${{ inputs.cf-secret-access-key }}" >> $conf
31-
echo "endpoint = https://${{ inputs.cf-account-id }}.r2.cloudflarestorage.com" >> $conf
32-
echo "acl = public-read" >> $conf
18+
mkdir -p ~/.ssh
19+
echo "${{ inputs.bunny-ssh-knownhosts }}" >> ~/.ssh/known_hosts
3320

0 commit comments

Comments
 (0)