Skip to content
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

fix(vendor.roborock): Fix resetting incomplete map on Roborock. Detect and reset current map slot. #1252

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

supersmile2009
Copy link
Contributor

Type of change

Type A:

  • Bug fix (non-breaking change which fixes an issue)
  • UI Feature
  • Refactor/Code Cleanup
  • Docs
  • Capability implementation for existing core capability
  • New robot implementation

Description (Type A)

This PR adds 2 fixes or rather improvements to RoborockMultiMapResetCapability.

  1. Roborocks can't delete current map if it's incomplete. You either have to save it manually first, or complete a full clean-up which ends with an auto-saving of the map to the first available slot. Since Valetudo has no concept of multi-map management, there's no way to save it manually. This PR adds an implicit map saving when reset is attempted with an incomplete map.

  2. Since Valetudo has no concept of multi-maps and performs actions against currently active map, it is reasonable to expect that it resets current map. Current map is not necessarily the one with id: 0. Even though Valetudo can't switch to a different map, user could do it through the official app or with other tools. So it's not entirely safe to assume current map id to be 0. This PR adds detection of currently used map slot to reset the correct map.

@Hypfer Hypfer merged commit ba86057 into Hypfer:master Nov 29, 2021
@supersmile2009 supersmile2009 deleted the fix/reset-map-roborock branch January 6, 2022 19:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants