Skip to content

Conversation

@nchapman
Copy link
Collaborator

No description provided.

nchapman and others added 2 commits November 29, 2025 16:42
Ported bug fixes from upstream MinUI (github.com/shauninman/MinUI):

- rg35xxplus: Fix mid-poweroff resume on newer OFW by adding sleep after poweroff
- zero28: Fix screen not turning on after sleep on some board revisions
- tg5040: New Helaas-based limbo fix with direct AXP power management
- my355: Fix right analog stick axes (swap RX/RY)

Credit: Shaun Inman <shaun@panic.com>

Co-Authored-By: Shaun Inman <shaun@panic.com>
Ported Mini Flip features from upstream MinUI:

- keymon.c: Add USB audio detection via GPIO45/44 polling
  - checkUSB() monitors speaker/headphone switching
  - Updates volume setting when audio output changes
  - Runs checks every 500ms alongside battery monitoring
  - Add getInt/putInt helpers for sysfs access

- msettings.c: Separate speaker and headphone volumes
  - Add headphones and jack fields to settings struct
  - Version migration from v1 to v2 settings
  - GetVolume/SetVolume now jack-aware
  - SetJack updates volume when switching outputs

Note: show.c and batmon.c already had 640x480 framebuffer forcing.
Note: platform.c already had lid detection, wifi status, model detection.

Credit: Shaun Inman <shaun@panic.com>

Co-Authored-By: Shaun Inman <shaun@panic.com>
Copilot AI review requested due to automatic review settings November 30, 2025 01:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates various MinUI platform updates and bug fixes across multiple handheld gaming devices, including improvements to hardware detection, LED control, audio management, and shutdown procedures.

Key Changes

  • Hardware-specific fixes: Added brightness workaround for zero28 board revisions, corrected axis mappings for my355 controller
  • Audio enhancements: Implemented USB audio detection and headphone jack support for Miyoo Mini Flip with proper settings versioning and migration
  • LED control improvements: Fixed inverted LED logic in tg5040 to correctly reflect enabled/disabled states
  • Shutdown refinements: Streamlined tg5040 shutdown script by removing debug logging and simplifying AXP power management calls

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
workspace/zero28/platform/platform.c Added SetRawBrightness(8) call before restoring user brightness to fix screen wake issues on certain board revisions
workspace/tg5040/platform/platform.c Corrected LED enable logic (inverted parameter) and updated documentation to match actual behavior (60=on, 0=off); added PLAT_enableBacklight call during poweroff
workspace/rg35xxplus/boot/boot.sh Added 60-second sleep after poweroff command (purpose unclear - may be workaround for async shutdown)
workspace/my355/platform/platform.h Swapped AXIS_RX and AXIS_RY mappings (3↔4) to correct right analog stick orientation
workspace/miyoomini/libmsettings/msettings.c Incremented settings version to 2; added headphones volume and jack state fields with migration logic; implemented proper headphone/speaker volume switching based on jack detection
workspace/miyoomini/keymon/keymon.c Added USB audio detection for Mini Flip via GPIO45/44; refactored battery monitoring thread to also poll USB state every 500ms; fixed initialization order (settings before ADC checks)
skeleton/SYSTEM/tg5040/bin/shutdown Replaced complex shutdown procedure with direct AXP register writes for cleaner poweroff; removed debug logging to /mnt/UDISK
skeleton/SYSTEM/rg35xxplus/bin/shutdown Added 60-second sleep after poweroff command (purpose unclear - may be workaround for async shutdown)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nchapman nchapman merged commit a302ee0 into develop Nov 30, 2025
4 checks passed
@nchapman nchapman deleted the feature/minui-fixes branch November 30, 2025 01:30
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.

2 participants