• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Alan-Jowett / sonde / 23669247106
82%

Build:
DEFAULT BRANCH: main
Ran 27 Mar 2026 10:00PM UTC
Jobs 1
Files 76
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Mar 2026 09:58PM UTC coverage: 85.704% (-0.003%) from 85.707%
23669247106

push

github

web-flow
feat(node): add GPIO sleep hygiene before deep sleep (#534)

* feat(node): add GPIO sleep hygiene before deep sleep

Add Hal::prepare_for_sleep() to centralize pre-sleep peripheral and
GPIO cleanup, preventing leakage current during deep sleep.

The ESP32 implementation (EspHal::prepare_for_sleep):
- Deletes the I2C driver and resets SDA/SCL pins to disabled state
  (no I/O buffer, no pull resistors)
- Resets all BPF-configured output GPIOs to GPIO_MODE_DISABLE
  with pull-up and pull-down disabled
- Clears ADC tracking flags for a clean next-wake reconfiguration

The trait method has a default no-op so existing test mocks are
unaffected.

Called in \in/node.rs\ immediately before \nter_deep_sleep()\.

Closes #517

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: always reset I2C pins and check cleanup return codes

Address review feedback:
- Reset I2C SDA/SCL pins unconditionally since \i2c_param_config\
  enables pull-ups even when \i2c_driver_install\ later fails
- Log warnings on \i2c_driver_delete\ and \gpio_set_direction\
  failures instead of silently ignoring them
- Only clear \i2c0_initialized\ after successful driver deletion

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: add ND-1013 GPIO sleep preparation spec

Add requirement ND-1013 for resetting bus peripheral GPIOs before deep
sleep to minimize leakage current.

- node-requirements.md: ND-1013 with acceptance criteria and appendix entry
- node-design.md: §11.3 \prepare_for_sleep()\ design, module table update
- node-validation.md: T-N1016 test case, appendix A/B entries

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: address review findings for ND-1013 GPIO sleep hygiene

- Fix ND-1013 Source field: \PR #534\ → \issue #517\ (traceability)
- Scope design §11.3 I2C text to I2C0 (matches implementation)
- Fix call-site note: \SleepManager\ → \in/node.rs\ main loop

Co-authored-by: Copilot <2235562... (continued)

0 of 1 new or added line in 1 file covered. (0.0%)

22799 of 26602 relevant lines covered (85.7%)

158.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.0
-4.0% crates/sonde-node/src/hal.rs
Jobs
ID Job ID Ran Files Coverage
1 23669247106.1 27 Mar 2026 10:00PM UTC 76
85.7
GitHub Action Run
Source Files on build 23669247106
  • Tree
  • List 76
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23669247106
  • 8ada38d2 on github
  • Prev Build on main (#23666080568)
  • Next Build on main (#23670434641)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc