docs: document intentional masking in get_str() behavior#72
Conversation
Note in get_device_name() docstring that ESP_ERR_NVS_NOT_FOUND returns default name silently (intentional design). Closes #49
PR #68 Review: fix: add error handling to TrackerStateMachine::init()CI StatusAll checks passed:
Issues Found1. [BUG]
|
| Category | Count |
|---|---|
| BUG | 2 |
| BEST PRACTICE | 2 |
| IMPROVEMENT | 1 |
Primary concerns: Issues #1 and #2 are the most significant - both can cause unwanted system aborts or undefined behavior. The ESP_ERROR_CHECK() change in geofence is particularly questionable since BLE alerts are non-critical notifications.
|
These review comments reference issues in PR #68 (TrackerStateMachine::init() error handling) and were attached to the wrong PR due to review ordering. The issues mentioned have been addressed:
PR #72 only adds documentation for config.hpp:get_device_name() masking behavior. |

Summary
Document intentional behavior in
Config::get_str()- when key is not found, returns default value and ESP_OK.Changes
firmware/main/config.hpp: Add docstring note toget_device_name()explaining that callers who need to distinguish "stored value" vs "default" should usenvs_get_str()directly.Notes
Rebuilt from scratch (PR #67 had unintended BLE/state_machine changes from other PRs).
Closes #49