Skip to content

Refactor and harden firmware measurement logic#20

Open
Rogger wants to merge 9 commits into
mainfrom
harden-architecture-tests
Open

Refactor and harden firmware measurement logic#20
Rogger wants to merge 9 commits into
mainfrom
harden-architecture-tests

Conversation

@Rogger

@Rogger Rogger commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • extract measurement reporting policy, battery conversion, and ZCL report helpers out of main.c
  • split sensor and battery update paths to reduce mixed hardware/reporting responsibilities
  • harden battery ADC conversion overflow, battery ZCL attribute saturation, and Zigbee startup failure handling with regression tests

Verification

  • cmake -S tests/unit -B /tmp/schneggi-unit-tests && cmake --build /tmp/schneggi-unit-tests && ctest --test-dir /tmp/schneggi-unit-tests --output-on-failure
  • make build CONF_FILE=prj_debug_no_scd4x.conf OVERLAY='boards/adafruit_feather_nrf52840.overlay;boards/no_scd4x.overlay' BUILD_DIR=/tmp/schneggi-build-debug-no-scd4x
  • make build CONF_FILE=prj_debug.conf OVERLAY=boards/adafruit_feather_nrf52840.overlay BUILD_DIR=/tmp/schneggi-build-debug-co2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant