-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add device_features to automatically determine what is supported. #365
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
Conversation
ignore ci error - will fix when i squash |
Will this help with automatically exposing all the supported features and options like mopping modes for currently unsupported devices like the Saros 10? |
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.
This looks fantastic, minor comments but looks good to go.
roborock/containers.py
Outdated
try: | ||
l = o % 4 | ||
target_index = -((o // 4) + 1) | ||
p = new_feature_info_str[target_index] |
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.
Can we convert the string to a number then do a bit check?
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.
Given this is not yet used, feel free to submit and we can increase test coverage as we go.
…ework device_features
Made some changes to match that the data actually comes from init app status Had to rework logic as there were some false assumptions. Also pulled it out of containers as to not crowd that file. |
This is a long change so i am separating it from the other PR. Basically just a bunch of mathematical calculations to determine what is supported.