solid green when the battery over 98% in charging mode#3768
Conversation
Discharge --> back to red/blue led status |
There was a problem hiding this comment.
Code Review
This pull request updates the device's charging indicator to show a solid green LED when the battery level is 98% or higher. It also increases the frequency of battery level broadcasts from every 60 seconds to every 10 seconds. The changes are functionally correct, but I have identified a couple of areas for improvement. A global variable battery_percentage has been introduced, which is not thread-safe and creates undesirable coupling between modules; I've recommended an alternative approach using an accessor function. Additionally, a magic number is used for the battery threshold, which should be defined as a constant for better readability and maintainability.
|
lgtm @TuEmb |
…#3768) * solid green when the battery over 98% in charging mode * remove magic number


related to #3545