-
Notifications
You must be signed in to change notification settings - Fork 88
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
Re-Enable the battery monitoring on Enviro! 🥳 #146
base: main
Are you sure you want to change the base?
Conversation
Hi @PascalKern. Thanks for raising this. You're proposed solution is interesting, as your sources are the exact two things I tried but still had issues with. Perhaps I didn't implement them correctly?? I will need to set up my own tests for this code to check if it works, though I do very much appreciate the inclusion of the config parameter! That makes the risk of merging this much lower than would otherwise be the case. I just need to check how you are adding that parameter, as additions to config_template.py should be treated as optional, so users can safely upgrade without re provisioning.
When you mention no instability issues, I assume you are still experiencing the other know lock-ups, just not any that are obviously attributed to vsys measurement? |
…atibility for feature toggle
First of all sorry for the late reply. Sometimes life (or just too much work) comes in the way when not expected. Regarding the additions to the config_template.py, I took care of backward compatibility. I had the same issue with my other devices while developing and testing the solution on just one of them. :) But more checks are always better than fewer. For the no instability issues I mentioned I can only tell about the issues I had before the implementation. I only had some in earlier versions of the FW but I'm also only using MQTT as a destination. Anyway. I appreciate any further, most likely deeper and dedicated, testing for that feature. I'm going to rebase the branch anyway to not lag to much behind the main branch in case of a future merge. Best, |
be9efad
to
85914fa
Compare
@@ -0,0 +1,30 @@ | |||
import machine | |||
|
|||
ADC_VOLT_CONVERSATION = 3.3 / 65535 |
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.
ADC_VOLT_CONVERSATION = 3.3 / 65535 | |
ADC_VOLT_CONVERSION = 3.3 / 65535 |
(And below, appears to be a sneaky typo. :) I hope this gets merged for v0.0.11!)
Hope this gets merged into the main codebase soon! I've just manually implemented the changes and it all seems to be working fine, fingers crossed this project hasn't been abandoned by Pimoroni! |
A rebase would be very much appreciated here, if you have the time and inclination! |
As mentioned in the release note of v0.0.9 the battery voltage monitoring was disabled due to issues with the stability
This pull request will solve this after I tested it as well as possible to be more or less 100% sure that the issue is gone.
Credit Note: The solution does (unfortunately) not origin in my own knowledge but was more or less inspired and then a partial C&P action from the following source(s) and super great work of Daniel Peron
All credit to him as he did the hard work or at least found a way with fiddling with the low-level documentation and configuration for the PicoW.
The current solution was tested on my Enviro devices. Below is the list of when the patch was applied ie. since when the patch runs on each device(s). All the devices were using the
pimoroni-picow_enviro-v1.19.10-micropython-v0.0.9.uf2
OS as the base.Since I applied the patch to these devices on the given dates I never had any instability issues! 🤩
As this feature created a lot of issues in the past I added a feature toggle to the config so that the voltage monitoring can simply be deactivated in case one experience stability issues again with the feature enabled.
Important: In the config_template.py is the feature DISABLED by default!