Add second mock battery - #37
Merged
Merged
Conversation
Register a distinct 2S fuel gauge as battery 1 so integration tests can verify that callers select a battery by ID. Assisted-by: GitHub Copilot:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
There was a problem hiding this comment.
Pull request overview
Extends the platform-common mock battery fixture to expose two independently-driven mock fuel gauges, enabling end-to-end validation of battery-ID selection through the battery service.
Changes:
- Expand the mock battery registration from 1 to 2 fuel gauges (battery 0 = 3S, battery 1 = 2S).
- Initialize and drive each mock fuel gauge independently by spawning separate update tasks.
- Increase the Embassy task pool size to allow multiple
update_data_taskinstances.
Member
|
@jerrysxie Looks like CI is failing due to |
RobertZ2011
previously approved these changes
Jul 27, 2026
kurtjd
previously approved these changes
Jul 27, 2026
Member
|
@dymk Looks like I can merge and bypass the failed job myself, let me know when you want it merged. |
felipebalbi
previously approved these changes
Jul 29, 2026
felipebalbi
left a comment
Contributor
There was a problem hiding this comment.
Copilot's suggestion to pass a battery_id is valid, but can also be done later.
Include each registered battery ID in update and recovery errors so failures from the two mock gauges are distinguishable. Assisted-by: GitHub Copilot:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
dymk
dismissed stale reviews from felipebalbi, kurtjd, and RobertZ2011
via
July 29, 2026 15:59
24b19a2
felipebalbi
previously approved these changes
Jul 29, 2026
Apply the platform-common rustfmt layout required by its standalone CI formatting job. Assisted-by: GitHub Copilot:gpt-5.6-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
kurtjd
approved these changes
Jul 29, 2026
dymk
enabled auto-merge (squash)
July 29, 2026 18:14
felipebalbi
approved these changes
Jul 29, 2026
This was referenced Jul 29, 2026
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.
Summary
This fixture enables end-to-end validation of battery-ID selection through OpenDevicePartnership/odp-secure-services#88.
Validation
cargo fmt --checkcargo build --lockedcargo clippy --locked -- -D warnings