Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
33fbfbd
first commit
Ludo-lab Jun 17, 2026
41e7df3
first commit
Ludo-lab Jun 17, 2026
c53709a
first commit
Ludo-lab Jun 17, 2026
3b97bc6
cloud: add get_gains / get_currents (read back staged ADPD config)
Ludo-lab Jun 17, 2026
0e53776
cloud mode
Ludo-lab Jun 17, 2026
c4b7ccd
cloud mode
Ludo-lab Jun 17, 2026
50f0a8d
cloude mode
Ludo-lab Jun 17, 2026
875bc4c
Add CERN-OHL-S-2.0 licence
Ludo-lab Jun 17, 2026
4919aa3
changed array name to be more transparent for user. Returns fluo = s_…
Ludo-lab Jun 19, 2026
f4ffa07
docs: add AGENTS.md and CLAUDE.md agent guidance
dominikvrbic Aug 4, 2026
d5e9393
feat(fw): single-image firmware with runtime host routing
dominikvrbic Aug 4, 2026
0972449
ci: add semantic-release versioning and release workflows
dominikvrbic Aug 4, 2026
b1e9a17
Merge pull request #1 from Jan-IngenHousz-Institute/feat/single-image…
Ludo-lab Aug 4, 2026
bba8725
ci(release): resolve the release PR via the API, not the commit subject
dominikvrbic Aug 4, 2026
1f7f062
fix(router): never let a finished envelope stall the first-byte router
dominikvrbic Aug 4, 2026
1218d74
fix(uart): stop ARDUHAL writing ASCII onto the protocol port
dominikvrbic Aug 4, 2026
27971fa
Revert "fix(uart): stop ARDUHAL writing ASCII onto the protocol port"
dominikvrbic Aug 4, 2026
65fd01e
Reapply "fix(uart): stop ARDUHAL writing ASCII onto the protocol port"
dominikvrbic Aug 4, 2026
1be78f4
fix(json): honor arrun request length
dominikvrbic Aug 4, 2026
9732b2f
fix(router): keep unknown host discovery awake
dominikvrbic Aug 5, 2026
4ed94de
docs(hw): record rc4 conformance run
dominikvrbic Aug 5, 2026
e80e81e
Merge pull request #2 from Jan-IngenHousz-Institute/fix/openjii-route…
dominikvrbic Aug 5, 2026
8fb51cb
chore(adpd): replace vendor SDK with JII clean-room driver
dominikvrbic Aug 5, 2026
ec99a27
chore(migration): import JII AMBIT continuation
dominikvrbic Aug 5, 2026
c81c928
Merge pull request #1 from Jan-IngenHousz-Institute/agent/import-jii-…
dominikvrbic Aug 5, 2026
1cb4e60
Merge pull request #3 from Jan-IngenHousz-Institute/fix/openjii-route…
dominikvrbic Aug 5, 2026
211bba8
chore(history): restore attributed private development record
dominikvrbic Aug 5, 2026
fdf7573
Merge pull request #2 from Jan-IngenHousz-Institute/history/restorati…
dominikvrbic Aug 5, 2026
10fc51f
docs(readme): document firmware operation and integration
dominikvrbic Aug 6, 2026
a503345
Merge pull request #3 from Jan-IngenHousz-Institute/docs/public-ambit…
dominikvrbic Aug 6, 2026
540cd3f
fix(calibration): apply persisted coefficients and baselines
dominikvrbic Aug 6, 2026
521d10c
ci: trigger calibration candidate checks
dominikvrbic Aug 6, 2026
f93485b
fix(calibration): distinguish absent and zero baselines
dominikvrbic Aug 6, 2026
3f3fcee
fix(release): target the public ambit repository
dominikvrbic Aug 6, 2026
e65b67d
fix(calibration): harden persistence and acquisition
dominikvrbic Aug 7, 2026
264828b
ci(release): harden immutable finalizer
dominikvrbic Aug 7, 2026
84648b1
fix(release): close final qualification gaps
dominikvrbic Aug 7, 2026
56c9174
Merge pull request #4 from Jan-IngenHousz-Institute/fix/calibration-a…
dominikvrbic Aug 7, 2026
10cb8be
chore(release): validate draft asset namespaces
dominikvrbic Aug 7, 2026
2c5be42
Merge pull request #5 from Jan-IngenHousz-Institute/fix/release-draft…
dominikvrbic Aug 7, 2026
a1ff230
feat(spec): add get_spec_raw and stop spectral channel overflow
Ludo-lab Aug 12, 2026
4daec85
pre AMBIT_COMMAND35_SPECPAR.md
Ludo-lab Aug 17, 2026
c919e24
pre AMBIT_COMMAND35_SPECPAR.md
Ludo-lab Aug 17, 2026
9dd4553
commit pre seeding
Ludo-lab Aug 17, 2026
76bf9c3
(feature) command 35, AN000633 spectral reads
Ludo-lab Aug 18, 2026
b6ed93a
(calibration) adjusted the PAR coef baked in the fw
Ludo-lab Aug 18, 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
201 changes: 201 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
name: Firmware PR

on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
contents: read
pull-requests: read

jobs:
validate-pr:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

host-tests:
name: Host unit and release-boundary tests
needs: validate-pr
runs-on: ubuntu-latest
steps:
- name: Checkout PR head
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Compile and run calibration suite
run: |
mkdir -p "${RUNNER_TEMP}/ambit-host-tests"
c++ -std=c++11 -Wall -Wextra -Werror \
test/calibration/test_main.cpp \
-o "${RUNNER_TEMP}/ambit-host-tests/calibration"
"${RUNNER_TEMP}/ambit-host-tests/calibration"

- name: Compile and run ADPD fake-transport suite
run: |
c++ -std=c++11 -Wall -Wextra -Werror \
test/adpd6000/test_main.cpp src/src/adpd/jii_adpd6000.cpp \
-o "${RUNNER_TEMP}/ambit-host-tests/adpd6000"
"${RUNNER_TEMP}/ambit-host-tests/adpd6000"

- name: Run release-boundary tests
run: python3 -m unittest discover -s test/release_process -p 'test_*.py' -v

build:
name: Build firmware
needs: validate-pr
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Checkout PR head
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"

- name: Install release tooling
run: bash tools/install_release_tooling.sh

- name: Prove pinned GitHub plugin remains draft-only
run: node test/release_process/semantic_release_github_draft.mjs

- name: Compute release preview
id: preview
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
shell: bash
run: |
set -euo pipefail
# Present semantic-release with the PR tree as one squash commit whose
# message is the already validated PR title.
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -B main "${PR_HEAD_SHA}"
git reset --soft "${PR_BASE_SHA}"
git commit --allow-empty -m "${PR_TITLE}"

export GITHUB_REF="refs/heads/main"
export GITHUB_EVENT_NAME="push"
set +e
npx semantic-release --dry-run --no-ci 2>&1 | tee release-preview.log
RELEASE_STATUS=${PIPESTATUS[0]}
set -e
if [[ ${RELEASE_STATUS} -ne 0 ]]; then
exit "${RELEASE_STATUS}"
fi

VERSION=$(grep -Eo 'The next release version is [0-9]+\.[0-9]+\.[0-9]+' release-preview.log | tail -n 1 | awk '{print $6}' || true)
if [[ -n "${VERSION}" ]]; then
BUILD_VERSION="${VERSION}"
WILL_RELEASE=true
else
BUILD_VERSION="pr-${PR_NUMBER}-${PR_HEAD_SHA:0:12}"
WILL_RELEASE=false
fi

echo "version=${BUILD_VERSION}" >> "${GITHUB_OUTPUT}"
echo "will-release=${WILL_RELEASE}" >> "${GITHUB_OUTPUT}"
{
echo "## Firmware release preview"
echo
if [[ "${WILL_RELEASE}" == "true" ]]; then
echo "Merging this PR will publish **v${VERSION}**."
else
echo "Merging this PR will not create a firmware release."
fi
echo
echo "- Title: \`${PR_TITLE}\`"
echo "- Build version: \`${BUILD_VERSION}\`"
} | tee release-preview.md >> "${GITHUB_STEP_SUMMARY}"

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install PlatformIO
run: |
python -m venv "${RUNNER_TEMP}/platformio"
"${RUNNER_TEMP}/platformio/bin/pip" install --disable-pip-version-check platformio==6.1.19

- name: Build firmware
env:
AMBIT_RELEASE_VERSION: ${{ steps.preview.outputs.version }}
# platformio.ini redirects build_dir under LOCALAPPDATA (a Windows
# OneDrive workaround); give it a sane root on the runner.
LOCALAPPDATA: ${{ runner.temp }}/pio_build_root
run: "${RUNNER_TEMP}/platformio/bin/pio run -e ambit"

- name: Verify version and assemble release assets
env:
FIRMWARE_VERSION: ${{ steps.preview.outputs.version }}
LOCALAPPDATA: ${{ runner.temp }}/pio_build_root
shell: bash
run: |
set -euo pipefail
BUILD_DIR="${LOCALAPPDATA}/pio_build/ambit_fw_new/ambit"
for FILE in firmware.bin bootloader.bin partitions.bin; do
test -f "${BUILD_DIR}/${FILE}"
done

# The build-injected AMBIT_FW_VERSION must be embedded verbatim: it is
# what cmd 33/2, `hello` and the JSON identity report after flashing.
strings "${BUILD_DIR}/firmware.bin" | grep -qx "${FIRMWARE_VERSION}"

# boot_app0.bin is not a build product: it ships with the Arduino-ESP32
# core, but the Calibratron's 4-region flash layout needs it at 0xe000.
BOOT_APP0=$(find "${HOME}/.platformio/packages" -path "*framework-arduinoespressif32*" -name boot_app0.bin | head -n 1)
test -n "${BOOT_APP0}"

mkdir -p dist
APP_NAME="ambit-fw-v${FIRMWARE_VERSION}.bin"
cp "${BUILD_DIR}/firmware.bin" "dist/${APP_NAME}"
cp "${BUILD_DIR}/bootloader.bin" dist/bootloader.bin
cp "${BUILD_DIR}/partitions.bin" dist/partitions.bin
cp "${BOOT_APP0}" dist/boot_app0.bin
# Manifest: downstream flashers (Calibratron) read names, offsets and
# hashes from here instead of hardcoding them.
python3 - "$FIRMWARE_VERSION" "$APP_NAME" <<'EOF'
import hashlib, json, sys
version, app_name = sys.argv[1], sys.argv[2]
def entry(file, offset):
data = open(f"dist/{file}", "rb").read()
return {"file": file, "offset": offset,
"size": len(data), "sha256": hashlib.sha256(data).hexdigest()}
manifest = {
"name": "ambit-iot",
"version": version,
"chip": "esp32c3",
"flash": [
entry("bootloader.bin", "0x0"),
entry("partitions.bin", "0x8000"),
entry("boot_app0.bin", "0xe000"),
entry(app_name, "0x10000"),
],
"ota": {"file": app_name},
}
json.dump(manifest, open("dist/manifest.json", "w"), indent=2)
EOF

- name: Upload firmware candidate
uses: actions/upload-artifact@v6
with:
name: firmware-${{ github.event.pull_request.head.sha }}
path: dist/
if-no-files-found: error
retention-days: 30
Loading