Repository navigation
feat(v1): add CleaningMode.VAC_THEN_MOP #1024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paulleonartcalvo
wants to merge
5
commits into
Python-roborock:main
Choose a base branch
from
paulleonartcalvo:feat/vac-then-mop-cleaning-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bd10c2d
feat(v1): expose clean-then-mop status from the device
klowdo f58117c
feat(v1): add set_clean_then_mop and document how it relates to Clean…
klowdo 5fa03d3
fix(v1): notify listeners and guard unloaded status in set_clean_then…
klowdo a24fe07
feat(v1): add CleaningMode.VAC_THEN_MOP
paulleonartcalvo f636608
fix(v1): send VAC_THEN_MOP changes as one sequence request
paulleonartcalvo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Priority 2 (Data Lifecycle & State Management): Partial local state mutation before
_notify_update()Updating only
self.seq_typeand callingself._notify_update()while leavingself.fan_power,self.water_box_mode, andself.mop_modeat their pre-call values exposes an inconsistentcurrent_cleaning_modeto update listeners until the nextrefresh():VAC_THEN_MOP(water_box_mode=235, seq_type=1) ->VACUUM(water_box_mode=200, seq_type=0):self.seq_typebecomes0whilewater_box_modestays235, so listeners readcurrent_cleaning_mode == CleaningMode.VAC_AND_MOPinstead ofVACUUM.VACUUM(water_box_mode=200, seq_type=0) ->VAC_THEN_MOP:self.seq_typebecomes1whilewater_box_modestays200, so listeners readclean_then_mop is Truewhilecurrent_cleaning_modeis stillCleaningMode.VACUUM.Suggested fix: Update all written motor fields alongside
seq_typebefore notifying listeners (matching the official app'ssendCleanWaterMopModeRpc, which updatescleanThenMop,fanPower,waterBoxMode, andmopModetogether):