fix: align Bengle MMR units with firmware - #605
Draft
ODevStudio wants to merge 1 commit into
Draft
Conversation
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
MatSetPointin tenths, but the pinned firmware consumes whole degrees.MatSetPointwith x1 firmware units, update wire tests, and add a test-only JSON contract for every declaredMMRItem,BengleMmr,BengleSteamMmr, andBengleScaleMmrvalue.Firmware source: tadelv/Bengle
MMR.defat2377c7e0e48e9ee2c43cf02ad2f82028252f56e8Change Type (select all)
Scope (select all touched areas)
Linked Issues
Root Cause (if bug fix)
MatSetPointfollowed the x10 convention used by several temperature registers even though its firmware entry uses multiplier 1.v13Modelalso demonstrates why effective wire scaling must follow the actual firmware path rather than copying a nominal table column.Regression Test Plan (if bug fix or refactor)
simulate=1+ curl/websocat)test/unit/models/device/impl/bengle/mmr_contract_test.dartandtest/models/device/bengle_cup_warmer_test.dartDocumentation Obligations (required)
assets/api/rest_v1.ymlorassets/api/websocket_v1.yml(if REST/WebSocket changed)doc/Api.md(if user-facing endpoint changed)doc/Plugins.md(if events/API changed)doc/Skins.md(if skin behavior changed)doc/Profiles.md(if profile handling changed)doc/DeviceManagement.md(if device flows changed)The REST contract remains degrees Celsius in the existing 0..80 range.
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): YesYes/No): No at runtime; one unit test reads its tracked JSON fixture.Yes/No): NoYes, explain risk and mitigation: the existing cup-warmer write uses the firmware's x1 encoding instead of x10. The public 0..80 C validation is unchanged, and transport tests assert raw writes and reads.User-Visible Changes
Cup-warmer REST values remain degrees Celsius in the 0..80 range, but Bengle firmware now receives the correct whole-degree wire value.
Verification
Local gates (run before pushing)
dart format lib test- no remaining changesflutter analyze- clean (no new warnings)flutter test- all pass./scripts/fetch_dye2_plugin.sh- DYE2 plugin installed intoassets/plugins/dye2.reaplugin/Focused tests: 4 passed. The full suite ran to completion; its only failure was the pre-existing Windows CRLF-sensitive assertion in
test/connect_result_schema_test.dart.The fetch script could not be rerun because WSL startup is denied and
jqis unavailable in this Windows shell. The existing bundled DYE2 v0.1.4 manifest, API version, permissions, andcreatePluginentry point were validated locally.Manual verification (if applicable)
simulate=1): Nov13Model, whole-degreeMatSetPoint, and the 80 C clamp.universal_bleruntime incompatibilities.Evidence
Before correcting
MatSetPoint, the new contract test reported x10 instead of x1. Afterward all 4 focused tests passed.Compatibility & Migration
Yes/No): YesYes/No): NoYes/No): NoNoorYes, explain exact steps: no migration or configuration changes are required.Risks & Mitigations