Repository navigation
more descriptive errors - #49
Open
PaulaScharf wants to merge 7 commits into
Open
PaulaScharf wants to merge 7 commits into
PaulaScharf wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Header-level dependency coupling (notably Display.h including sensors and DistanceSensor.h including heavy ML headers) is likely to cause circular/expensive includes and should be restructured before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR improves startup resilience and user feedback by allowing the firmware to continue booting when individual sensors (or BLE) cannot be initialized, while surfacing clearer error/status information on the OLED.
Changes:
- Add bounded init retries plus “sensor missing” tracking (
isPresent()) across sensors and BLE instead of blocking forever. - Enhance OLED UI with a warning/error screen, a Bluetooth-connected icon, and a list of missing modules on the connection screen.
- Update PlatformIO platform/library versions and adjust DistanceSensor VL53L8CX integration to match updated headers/APIs.
File summaries
| File | Description |
|---|---|
| senseBox-bike-atrai-v2/src/sensors/TempHumiditySensor/TempHumiditySensor.h | Adds isPresent() API for temp/humidity sensor presence reporting. |
| senseBox-bike-atrai-v2/src/sensors/TempHumiditySensor/TempHumiditySensor.cpp | Adds retry-based init and non-fatal missing-sensor behavior + display error. |
| senseBox-bike-atrai-v2/src/sensors/DustSensor/DustSensor.h | Adds isPresent() and per-sensor init attempt constant. |
| senseBox-bike-atrai-v2/src/sensors/DustSensor/DustSensor.cpp | Adds retry-based init and non-fatal missing/error behavior + display error. |
| senseBox-bike-atrai-v2/src/sensors/DistanceSensor/DistanceSensor.h | Updates VL53L8CX include and pulls in EdgeImpulse/TFLM headers. |
| senseBox-bike-atrai-v2/src/sensors/DistanceSensor/DistanceSensor.cpp | Adds retry-based init and non-fatal missing/error behavior + display error; updates VL53L8CX API calls. |
| senseBox-bike-atrai-v2/src/sensors/BatterySensor/BatterySensor.h | Adds isPresent() API for battery sensor presence reporting. |
| senseBox-bike-atrai-v2/src/sensors/BatterySensor/BatterySensor.cpp | Adds retry-based init and guards for missing battery sensor. |
| senseBox-bike-atrai-v2/src/sensors/BaseSensor.h | Introduces shared MAX_INIT_ATTEMPTS constant for init retry loops. |
| senseBox-bike-atrai-v2/src/sensors/AccelerationSensor/AccelerationSensor.h | Adds isPresent() and sensorFound tracking. |
| senseBox-bike-atrai-v2/src/sensors/AccelerationSensor/AccelerationSensor.cpp | Adds retry loop across supported accel sensors and non-fatal missing behavior + display error. |
| senseBox-bike-atrai-v2/src/main.cpp | Adjusts loop scheduling: fall back to timed reads when accel sensor is missing. |
| senseBox-bike-atrai-v2/src/display/Display.h | Adds API for loading errors and includes module headers for presence display. |
| senseBox-bike-atrai-v2/src/display/Display.cpp | Adds loading error screen, BT connected icon, missing-module list, and bitmap include refactor. |
| senseBox-bike-atrai-v2/src/display/bitmaps.h | Adds warning and Bluetooth icon bitmaps. |
| senseBox-bike-atrai-v2/src/ble/BLEModule.h | Adds isPresent() API for BLE presence reporting. |
| senseBox-bike-atrai-v2/src/ble/BLEModule.cpp | Adds BLE presence detection and non-fatal error display on missing BLE module. |
| senseBox-bike-atrai-v2/platformio.ini | Pins platform and bumps several library versions. |
Review details
- Files reviewed: 18/18 changed files
- Comments generated: 10
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: PaulaScharf <48286621+PaulaScharf@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
first merge #49 before this.