Fix X1 charge status LED always showing charged - #3124
Closed
Hacuchino-hash wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Closing this for now. The charge complete state needs more work than this change covers: on this board neither charger status line gives a usable done signal, so the charged state is still not reachable. I will retest properly on hardware and open a complete fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow up to #3122, correcting the charge complete handling on the MeshTracker X1.
The charging indication itself works, the LED shows the charging animation while power is applied. What is wrong is the charge complete branch: it gives priority to the charger's second status line (P1.4) as a "done" signal, and on this board that pin reads low regardless of charge state, so the complete branch always wins and the LED sits on the charged colour.
Charge state now comes from P1.3 alone, which behaves correctly (low while charging, high once charging stops). P1.4 is left unused with a comment explaining why, the same choice Meshtastic makes in their X1 variant where the equivalent define is commented out.
Testing
Measured on hardware at partial charge (4.15 V, actively charging): P1.3 reads low as expected, and P1.4 also reads low, which is what sends it down the wrong branch. With this change the LED correctly shows the charging animation at that state. All four X1 environments build clean.