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 for Firmware 3.6.6 Mi Flora Max #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DarkByteZero
Copy link

first fix for Mi Flora Max

first fix for Mi Flora Max
@DarkByteZero DarkByteZero changed the title Fix for Firmare 3.6.6 Mi Flora Max Fix for Firmware 3.6.6 Mi Flora Max Aug 8, 2022
@DarkByteZero
Copy link
Author

Fixes #171

@@ -104,6 +104,7 @@ def fill_cache(self):
datetime.now() - self._cache_timeout + timedelta(seconds=300)
)
return
time.sleep(1) # without this, the previous write_handle is done after we read the data
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a poor fix, I know that. But I don't really know much about Python or the Bluethooth libaray. It should be checked whether the handle has already been written.

# With this cleaning, the cache is always empty.

#if self._firmware_version >= "2.6.6":
# if sum(self._cache[10:]) == 0:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the bytes 11-16 important?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant