Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6c07c0d
Simplify docs build process by removing Doxygen step from GitHub Acti…
baileyji May 12, 2026
1c70b0c
Refactor attenuator and MEMS switch models: implement paired physical…
baileyji May 13, 2026
4654abe
Refactor telemetry and queue logic: replace `photodiode_queue` with d…
baileyji May 13, 2026
00aa0db
Update README: clarify MQTT 5 `response_topic` and `correlation_data`…
baileyji May 13, 2026
6d175ad
Add laser-bank heater control: implement TIB auto/override policy, TE…
baileyji May 14, 2026
6409db2
Work on sorting out GPIOs, some minor cleanup of laser enum and board…
baileyji May 14, 2026
518ef2b
Describe plan for photodiode monitoring.
baileyji May 14, 2026
b9e538d
docs: specify measure_throughput command
baileyji May 14, 2026
fa95374
photodiode: keep rolling windows without streaming
baileyji May 14, 2026
0a85871
settings: add route loss records
baileyji May 14, 2026
c064821
throughput: add measure_throughput monitor
baileyji May 14, 2026
9a9ceab
throughput: revise telemetry and mappings
baileyji May 14, 2026
051a9f0
Doc tidy
baileyji May 14, 2026
4c50ca0
Doc tidy
baileyji May 15, 2026
7bf6f58
Doc tidy
baileyji May 15, 2026
711b180
network: apply runtime config and consolidate docs
baileyji May 15, 2026
e440ca3
Doc tidy
baileyji May 15, 2026
8336651
mqtt: select topic identity from board strap
baileyji May 15, 2026
8aeef5c
Isolate timing-critical firmware work
baileyji May 15, 2026
2a8d3b6
Build SNTP sync only when configured
baileyji May 15, 2026
8cec7cc
Doc tidy
baileyji May 15, 2026
7cd5c48
Update and flesh out laser control intentions
baileyji May 15, 2026
a2814b1
Update and flesh out laser control intentions
baileyji May 15, 2026
9d03b58
Implement laser command suite
baileyji May 15, 2026
c20e5a7
Use laser percent for throughput autolevel
baileyji May 15, 2026
0ac3013
Load laser runtime settings lazily
baileyji May 15, 2026
6419615
Move throughput flux estimate into laser module
baileyji May 15, 2026
eff0efd
Add command endpoint anchors
baileyji May 15, 2026
c9f01b8
Refactor MEMS pin mapping and toggle rate handling; simplify docs build
baileyji May 15, 2026
8180eac
Clarify and enhance command endpoint documentation.
baileyji May 15, 2026
fc66b29
Refactor command handling: streamline error responses, enhance MQTT p…
baileyji May 15, 2026
24b007f
Track laser-bank power-on time and expose via status response
baileyji May 15, 2026
cd2a756
Update command documentation: remove unused `pd_offin_s`, clarify res…
baileyji May 16, 2026
e55ba36
Remove legacy `unit: volts` references in `pd_get`, streamline MEMS s…
baileyji May 16, 2026
a43b7ea
Refactor command documentation: update query/effect request distincti…
baileyji May 16, 2026
22a55ed
Add throughput monitor flow diagrams, update related flows, and align…
baileyji May 16, 2026
187c76f
Add reusable command dispatch helpers
baileyji May 16, 2026
2935c19
Move throughput command handler to adapter
baileyji May 16, 2026
a455baf
Move photodiode command handlers to adapter
baileyji May 16, 2026
6ed18a2
Move attenuator command handlers to adapter
baileyji May 16, 2026
59ee8b7
Align photodiode response settings with throughput
baileyji May 16, 2026
06c48c2
Move MEMS command handling to adapter
baileyji May 16, 2026
871dc36
Centralize command response helpers
baileyji May 16, 2026
8f1e1fc
Clarify error message fallback in command dispatch response
baileyji May 16, 2026
eed155d
Expand reusable command runtime helpers
baileyji May 16, 2026
293279d
Move app warning and topic formatting into command layer
baileyji May 16, 2026
5d6a119
Move laser command handlers to adapter
baileyji May 16, 2026
03949ad
Tighten laser command domain boundaries
baileyji May 16, 2026
da08408
Rename laser bank temperature control module
baileyji May 16, 2026
c60f355
Move command ingress plumbing into runtime
baileyji May 17, 2026
a9509c3
Add support for splitting where individual route outputs do not have …
baileyji May 18, 2026
f01bcef
Switch app settings persistence from Zephyr string-based settings API…
baileyji May 18, 2026
90a5fda
Clarify documentation to reflect NVS-based app settings persistence
baileyji May 18, 2026
e871529
Trim unused laser pulse helpers
baileyji May 18, 2026
4bc3f84
Stop compiling unused PID helper
baileyji May 18, 2026
b67276a
Remove legacy JSON msg_type parser
baileyji May 18, 2026
d33154b
Remove app command alias layer
baileyji May 18, 2026
3c5ae66
Drop dead command wrappers
baileyji May 18, 2026
d142d1d
Consolidate laser runtime counters
baileyji May 18, 2026
7cc2a8f
Share IP status payload formatting
baileyji May 18, 2026
6943969
Keep app CMake sources to C files
baileyji May 18, 2026
114f3e0
Use Zephyr realtime clock APIs
baileyji May 18, 2026
b0273b8
Restore Maiman CW configuration writes
baileyji May 19, 2026
1be2441
Merge slow housekeeping actors
baileyji May 19, 2026
00fec65
Share optional JSON field parsing
baileyji May 19, 2026
e4d899e
Consolidate command behavior metadata
baileyji May 19, 2026
d9dbcff
Share command key suffix helper
baileyji May 19, 2026
f43630c
Share single-segment command key parsing
baileyji May 19, 2026
216fbfc
Centralize command key segment parsing
baileyji May 19, 2026
3d04a49
Trim unused Maiman helper surface
baileyji May 19, 2026
b695b88
Hide dormant PID helper from project docs
baileyji May 19, 2026
d2395af
Prune unused Maiman status wrappers
baileyji May 19, 2026
b819ff8
Fold temperature status into housekeeping
baileyji May 19, 2026
f3f99f8
Move relay power ownership to housekeeping
baileyji May 19, 2026
8947dc3
Run throughput monitoring from housekeeping
baileyji May 19, 2026
2870419
Revert throughput housekeeping service
baileyji May 19, 2026
84b75ee
Restore Maiman helper surface
baileyji May 19, 2026
d1546e8
Share command string choice parsing
baileyji May 19, 2026
780adb3
Use shared choices in throughput command
baileyji May 19, 2026
96e7b23
Use shared choices in attenuator command
baileyji May 19, 2026
5830647
Use shared choices for laserbank modes
baileyji May 19, 2026
7bf5bc7
Use shared choices for MEMS switch state
baileyji May 19, 2026
b1e9a2f
Document command choice parse limit
baileyji May 19, 2026
0930705
Remove misspelled heater mode aliases
baileyji May 19, 2026
56216b7
Tighten laserbank mode command aliases
baileyji May 19, 2026
fc37dac
Update housekeeping thread documentation
baileyji May 19, 2026
74f3290
Deduplicate implemented command docs
baileyji May 19, 2026
c8506d9
Move laser autooff to laser timeout actor
baileyji May 19, 2026
e0b39a2
Remove unused common dispatch fallback
baileyji May 19, 2026
d2c2f06
Use delayable work for laser autooff
baileyji May 19, 2026
bee5110
Allow TEC current limit laser setting
baileyji May 19, 2026
0e83bf1
Share laserbank override parsing
baileyji May 19, 2026
669b743
Remove command classification wrappers
baileyji May 19, 2026
5f63480
Separate laser temperature ownership
baileyji May 19, 2026
6cf1047
Move bank on-time to laser power owner
baileyji May 19, 2026
f8bd9b0
Use delayable work for housekeeping cadence
baileyji May 19, 2026
4522849
Centralize TIB command and actor guards
baileyji May 19, 2026
c30b824
Expand stack sizes, enable thread analyzer, and add boot reset teleme…
baileyji May 19, 2026
018dedb
Add device readiness check and configure board straps upfront. Theres…
baileyji May 19, 2026
daf40fb
Replace serial thread with buffered character polling and runtime-man…
baileyji May 19, 2026
9762e9d
Persist last known UTC time, restore it on boot, and update overlay/d…
baileyji May 20, 2026
9ddde58
Remove redundant app-specific CMakeLists and update hardware document…
baileyji May 20, 2026
d1d6fe0
Add MQTT client for HISPEC FIB PCB with JSON command API, telemetry d…
baileyji May 20, 2026
1909abe
Add attenuator calibration module with automatic and manual modes and…
baileyji May 20, 2026
812cd6e
Simplify photodiode to use averaging functionality for dark measureme…
baileyji May 20, 2026
90ab9dc
Add attenuator calibration functionality with new dataclasses, valida…
baileyji May 20, 2026
0e46cb8
Disable HSE and update PLL configurations for HISPEC-FIB PCB to suppo…
baileyji May 20, 2026
ac56b8c
Update hardware documentation and overlay to detail MB1404 solder bri…
baileyji May 20, 2026
72a3e9f
Enable floating-point support for cbprintf in prj.conf
baileyji May 20, 2026
39f8c75
Improve MQTT handling: log retained command errors, limit socket poll…
baileyji May 20, 2026
04d2165
Lower I2C1 clock frequency to 100 kHz in NUCLEO_H563ZI overlay config…
baileyji May 23, 2026
3631c12
Adjust logging levels, update hardware documentation, improve network…
baileyji May 23, 2026
9137ae0
board: configure strap inputs with gpio hogs
baileyji May 23, 2026
74b2f27
ds2408: apply overlay defaults during init
baileyji May 23, 2026
54459b0
logging: back off repeated ADC errors
baileyji May 23, 2026
494918e
board: disable DAC7578 clear pin
baileyji May 23, 2026
70ee2f5
config: document bring-up options
baileyji May 23, 2026
94846c0
Simplify devices.c
baileyji May 25, 2026
cc43bea
attenuator: use DAC7x78 driver API
baileyji May 26, 2026
f27b531
docs: add attenuator serial examples
baileyji May 27, 2026
f21bcb8
docs: clarify attenuator serial versus mqtt payloads
baileyji May 27, 2026
a64e8ae
Ratelimit Mems warnings
baileyji May 27, 2026
58e4369
config: enable JSON floating-point parsing
baileyji May 27, 2026
47ac91c
Switch to dac7678
baileyji May 27, 2026
e5be927
config: add pySourceRootDetection for devicetree scripts
baileyji May 27, 2026
22926c2
Sigh, doxygen got added. remove it
baileyji May 27, 2026
916eef1
workflow: simplify and modernize docs CI setup
baileyji May 27, 2026
6e3cf51
Add todos
baileyji May 27, 2026
8135408
Add generic scheduled action helper
baileyji May 27, 2026
82e044b
Move serial help plumbing into command dispatch
baileyji May 27, 2026
730bf73
Refactor command help guard and reboot ownership
baileyji May 27, 2026
3b7e970
Update command dispatch documentation
baileyji May 27, 2026
7e7567a
Move command spec lookup into dispatch
baileyji May 27, 2026
1408b46
Pass MQTT callback context through wrapper
baileyji May 27, 2026
1f7f60f
Update command dispatch docs
baileyji May 27, 2026
45f2b50
Update DAC channel mappings and attenuator terminology
baileyji May 27, 2026
c43f427
Move command execution into dispatch
baileyji May 27, 2026
b2c2dd7
Document dispatch-owned command execution
baileyji May 27, 2026
a96b70c
Refactor reboot preparation to conditionally handle photodiode power …
baileyji May 27, 2026
5f70d4e
Update attenuator voltage limits and DAC configuration
baileyji May 28, 2026
b9a0bff
Refactor command execution and JSON rendering in dispatcher
baileyji May 28, 2026
b590f86
Update uptime field to `uptime_s` and convert to seconds
baileyji May 29, 2026
af51455
Get MEMS working.
baileyji May 29, 2026
0245684
Add DHCPv4 event handling and preferred address checks
baileyji May 29, 2026
2f91343
Refactor laser bank power management to improve GPIO handling and fir…
baileyji May 30, 2026
afd8b96
Refactor MEMS switch pulse handling to use uptime-based deadlines
baileyji May 30, 2026
d2e73bc
Increase main stack size to 8192 and disable thread analyzer features
baileyji May 30, 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
73 changes: 36 additions & 37 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,68 @@
# Copyright (c) 2024, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

name: Documentation
name: Build and deploy documentation

on:
pull_request:
push:
branches:
- main
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
doxygen-version: [1.9.6, 1.14.0]
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Install dependencies
run: |
DOXYGEN_VERSION="${{ matrix.doxygen-version }}"
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
pip install -r doc/requirements.txt
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: doc/requirements.txt

- name: Build
- name: Install system dependencies
run: |
cd doc
doxygen
sudo apt-get update
sudo apt-get install --no-install-recommends --yes doxygen

SPHINXOPTS="-W" make html
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r doc/requirements.txt

mkdir deploy
mv _build_doxygen/html deploy/doxygen
mv _build_sphinx/html/* deploy
- name: Build Sphinx HTML
run: python -m sphinx -b html doc doc/_build_sphinx/html

- name: Setup pages
if: github.event_name != 'pull_request' && matrix.doxygen-version == '1.14.0'
- name: Configure GitHub Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5

- name: Upload pages artifact
if: github.event_name != 'pull_request' && matrix.doxygen-version == '1.14.0'
uses: actions/upload-pages-artifact@v4
- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v5
with:
path: doc/deploy
path: doc/_build_sphinx/html

- name: Upload artifacts
- name: Upload PR documentation artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: docs-doxygen-${{ matrix.doxygen-version }}
path: doc/deploy
name: documentation-html
path: doc/_build_sphinx/html

deploy:
name: Deploy
runs-on: ubuntu-22.04
name: Deploy documentation
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
permissions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ __pycache__/
# docs
/doc/_build*
/app/build/
/doc/_doxygen/
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Default command responses use:
cmd/hsfib-tib/resp/<key>
```

MQTT 5 `response_topic` and `correlation_data` are honored when they fit the
fixed command buffers.
MQTT 5 `response_topic` is honored when it fits the fixed topic buffer.
`correlation_data` is echoed when it is 16 bytes or less.

Serial commands share the same normalized command path. A bare serial key is a
GET; a key with payload is a SET. See:
Expand All @@ -68,16 +68,18 @@ GET; a key with payload is a SET. See:
## Runtime Shape

- `main.c`: boot order, watchdog feed, network/MQTT loop, outbound publish.
- `command.c`: MQTT/serial ingress, serial guard, dispatch, response queues.
- `command.c`: app command queues, serial guard policy, command table, and
command handlers, using `lib/coo_commons/command_dispatch.c` for reusable
MQTT/serial request and response mechanics.
- `devices.c`: board strap detection and board-profile setup.
- `mems_switching.c`: MEMS switch state, routes, and toggler work.
- `attenuator.c`: DAC-backed logical attenuator control and calibration.
- `maiman.c` and `lasers.c`: Maiman Modbus and laser-bank helpers.
- `photodiode.c`: ADS1115 sampling, dark calibration, noise, telemetry.
- `tempsense.c`: DS18B20 ambient temperature cache.
- `sntp_sync.c`: SNTP sync and time status.
- `app_settings.c`: Zephyr settings-backed app state.
- `app_warning.c`: best-effort warning publication.
- `app_settings.c`: app-owned runtime settings and direct Zephyr NVS persistence.
- `app_identity.c`: selected board-profile MQTT device ID.

Architecture pages live in `doc/architecture.md`, `doc/threads.md`, and `doc/queues_and_work.md`.

Expand Down
7 changes: 6 additions & 1 deletion agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ Build discipline:
- newly introduced non-blocking warnings,
- tests or static checks run.

Workspace metadata discipline:

- Do not edit files under `.idea/`. Those files are developer IDE state, not
firmware source or documentation.

---

## 4. Coding Style and Architecture
Expand Down Expand Up @@ -406,4 +411,4 @@ Before finalizing, self-review:
- Did this add blocking behavior to a timing-sensitive path?
- Did this preserve best-effort warnings and telemetry?
- Did this require a west build?
- Were build steps sequential?
- Were build steps sequential?
10 changes: 10 additions & 0 deletions app/.idea/pySourceRootDetection.xml

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

1 change: 1 addition & 0 deletions app/.idea/vcs.xml

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

30 changes: 13 additions & 17 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,26 @@ project(app LANGUAGES C)

target_sources(app PRIVATE
src/main.c
src/app_scheduled_actions.c
src/app_identity.c
src/app_settings.c
src/app_warning.c
src/attenuator.c
src/attenuator_calibration.c
src/attenuator_command.c
src/command.c
src/devices.c
src/housekeeping.c
src/laser_command.c
src/lasers.c
src/laserbank_tempcontrol.c
src/maiman.c
src/mems_command.c
src/photodiode.c
src/tempsense.c
src/tempsense.h
src/photodiode_command.c
src/throughput_command.c
src/throughput_monitor.c
src/mems_switching.c
)

target_sources_ifdef(CONFIG_SNTP app PRIVATE
src/sntp_sync.c
src/attenuator.h
src/app_scheduled_actions.h
src/app_settings.h
src/app_warning.h
src/app_identity.h
src/command.h
src/devices.h
src/lasers.h
src/maiman.h
src/laser_properties.h
src/photodiode.h
src/mems_switching.h
src/sntp_sync.h
)
22 changes: 22 additions & 0 deletions app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@ menu "Zephyr"
source "Kconfig.zephyr"
endmenu

config NET_DHCPV4_OPTION_NTP_SERVER
default y if SNTP && NET_DHCPV4

config APP_DEFAULT_DNS_SERVER
string "Default manual DNS server IPv4 address"
default "0.0.0.0"
help
Default app-owned manual DNS server stored in the initial settings
snapshot. Use 0.0.0.0 to leave manual DNS disabled.

config APP_DEFAULT_NTP_SERVER
string "Default manual NTP server IPv4 address"
default "0.0.0.0"
help
Default app-owned manual NTP server stored in the initial settings
snapshot. The current settings schema stores IPv4 strings, not
hostnames. Use 0.0.0.0 to prefer DHCP-provided NTP.

choice SNTP_LOG_LEVEL_CHOICE
default SNTP_LOG_LEVEL_DBG if SNTP
endchoice

module = APP
module-str = APP
source "subsys/logging/Kconfig.template.log_config"
Loading
Loading