Repository navigation
Battery: charge only while a pack is in the bay (no 100% / 0% flicker or speaker pops with the bay empty) - #45
Merged
Merged
Conversation
… or speaker pops with the bay empty) With the bay empty, initialize_battery() still enabled charging. The IP2326 then keeps retrying to charge nothing: its output pulsed between 8.4 V (read as a full pack) and ~4.4 V, every ~16 s, so the launcher's status bar flipped between 100% and 0%, and each retry pops on the speaker (the BSP's BatteryStatus::is_present says to leave charging off without a pack). initialize_battery() now enables charging only if the first reading sees a pack, and the battery task follows the bay: charging on when a pack appears, off when it goes (logged). With the charger off an empty bay reads a steady ~1.9 V, so it reads as empty from then on. Pulling a pack while it charges is caught once the BSP stops reading the charger's 8.4 V pulses as a pack (esp-cpp/espp#931); with espp/m5stack-tab5 1.4.5 a 4.4 V pulse still passes its 4 V test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
…red ST7123 touch interrupt (espp#933) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
usb_device was pinned to espp's 08295c0 for take_msc_from_ejected_host() (esp-cpp/espp#898), released in 1.4.3. 1.4.7 also checks the endpoints against the port's USB-OTG core (#925). hid-rp 1.4.7 brings the latest gamepad decoding (#918) and the rumble report fixes (#921, #927). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
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
With the battery bay empty, the Tab5 charged nothing at all. The IP2326 kept retrying and caused two visible problems:
BatteryStatus::is_presentalready says to leave charging off without a pack.Now the Tab5 charges only while a pack is in the bay:
initialize_battery()enables charging only if the first reading sees a pack.battery: charging on (a pack is in the bay)/off (the bay is empty).With the charger off, an empty bay reads a steady ~1.9 V, so it stays empty. A pack inserted later reads its own voltage, so it's seen at once and starts charging.
Dependencies (espp 1.4.9, all from the component registry)
08295c0, fortake_msc_from_ejected_host(), feat(usb_device): take_msc_from_ejected_host() for devices that stay attached espp#898, released in 1.4.3). 1.4.7 also checks the endpoints against the port's USB-OTG core (#925). tab5-emu's CDC + vendor + MSC fits the P4's full-speed port.Testing (Tab5, empty bay, USB-C power)
override_path), charging forced on for 90 s after boot by a test hook:fa9bdd0's dependencies):emulink ota);🤖 Generated with Claude Code
https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY