Xpndable / DotUI

MiniUI port for Miyoo Mini+
89 stars 12 forks source link

Charging While Powered Off #2

Open birby0 opened 1 year ago

birby0 commented 1 year ago

Hi again! Sorry if I’m doing this incorrectly I’m new to github and the miyoo community. Is there a way to make it to that the device stays powered off (red light) when plugged into the charger? It turns on and stays on instead of staying powered off during charge. I’ve also noticed the battery indicator incorrectly reporting battery life. It’ll say the batteries about to die and flash red then when I exit to the main menu of DotUI it shows half full. Let me know if I can help in any way!

Xpndable commented 1 year ago

Hi, the default behaviour was to keep the device powered on. This was the method used on the Miyoo Mini, because it didn't have a system for powered off charging. As an improvement, I can add the 1-2 minute check that the stock OS is doing before powering off, while still charging with the red light. This would take advantage of the new power management chip and theoretically allow for faster charging, but that would have to be benchmarked to see if there was an actual improvement.

That idea is worth pursuing, so I'll keep this issue open for tracking.

The battery life issue I think must be coming from picoarch while you're playing a game, because the battery is reported differently on this device, again because of the new power management chip, picoarch may also need to be updated to read the battery level correctly, something I overlooked in my testing.

Thank you for the feedback, it's very useful, I'll look into the battery level issue as a priority.

instrumentalcase commented 1 year ago

I'm quite new to playing retro games via emulators, having just purchased the Miyoo Mini Plus. Yesterday, I updated my device to the latest firmware and then installed DotUI successfully. The only issue I'm running into thus far is that the battery status icon is only displaying as red / nearly empty, despite the device itself being fully charged and showing all green LEDs up top. Any ideas?

anzz1 commented 1 year ago

@instrumentalcase That is indeed very strange. What is your exact firmware version when you press the MENU button? The battery charge level is read from the FW which outputs the charge values as a voltage and a 1-100 percentage, MiniUI only reads the value and displays it graphically. While not counting out a bug in MiniUI, the code for battery level is very simple so it seems likely that the values reported by FW are incorrect for some reason.

anzz1 commented 1 year ago

The strange battery bug was probably related to this: https://github.com/Xpndable/DotUI/issues/5#issuecomment-1536020281

updated batmon will shutdown after 30sec of not pressing anything after plugging to charger https://github.com/anzz1/DotUI-X/commit/b1960fed185b321adb7509c031a34235675ffade