Skip to content

fix: silence false-alarm boot log errors from NVS and accelerometer probe - #55

Merged
thePunderWoman merged 1 commit into
mainfrom
boot-log-noise-fixes
Sep 23, 2026
Merged

thePunderWoman merged 1 commit into
mainfrom
boot-log-noise-fixes

Conversation

@thePunderWoman

Copy link
Copy Markdown
Owner

Summary

  • All four persistence load() functions (CalibrationStore, DroidPersistence, ComplicationPersistence, PowerConfigStore) opened their Preferences namespace read-only, which makes nvs_open() fail with NOT_FOUND — logged as an alarming error — on a device that's never saved that namespace yet, i.e. every first boot. Opening read-write instead silently creates the empty namespace; no behavior change to what's actually loaded (still falls back to defaults), just no more false "hardware is broken" errors in the boot log.
  • Accelerometer::begin() now does a plain presence probe (address-only write, real stop condition) before attempting its repeated-start register read. On boards without this part, endTransmission(false)'s repeated-start check doesn't reliably report the missing ACK by itself — a known ESP32 I2C driver quirk — so Wire.requestFrom() was getting called against a device that was never there, which the Wire library logs as an error.

Test plan

  • pio test -e native — 284/284 passing (none of these files are in the native coverage set; they're hardware-touching adapters per the existing exclusion policy)
  • pio run -e esp32s3 — builds clean
  • Verified against real hardware: boot log is clean, no more nvs_open failed or i2cWriteReadNonStop errors

🤖 Generated with Claude Code

…robe

- All four persistence load() functions (CalibrationStore,
  DroidPersistence, ComplicationPersistence, PowerConfigStore) opened
  their Preferences namespace read-only, which makes nvs_open() fail
  with NOT_FOUND (logged as an alarming error) on a device that's never
  saved that namespace yet -- true on every first boot. Opening
  read-write instead silently creates the empty namespace; no behavior
  change to what's actually loaded (still falls back to defaults),
  just no more false "hardware is broken" errors.
- Accelerometer::begin() now does a plain presence probe (address-only
  write, real stop condition) before attempting its repeated-start
  register read. On boards without this part, endTransmission(false)'s
  repeated-start check doesn't reliably report the missing ACK by
  itself -- a known ESP32 I2C driver quirk -- so Wire.requestFrom() was
  getting called against a device that was never there, which the Wire
  library logs as an error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thePunderWoman
thePunderWoman merged commit ef7a51f into main Sep 23, 2026
2 checks passed
@thePunderWoman
thePunderWoman deleted the boot-log-noise-fixes branch September 23, 2026 05:51
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