Conversation
|
Working now (as expected). Now some long time tests have to follow. |
|
We are coming to an end, hopefully. |
|
Random query: what does the sunxi otg flag do that benefits the use-case here? |
| startTextInput = SDL.startTextInput, | ||
| stopTextInput = SDL.stopTextInput, | ||
| canOpenLink = getLinkOpener, | ||
| canControlCharge = yes, -- development of batteryCare |
There was a problem hiding this comment.
please make it a property of the Emulator, not a property of a generic SDL device.
There was a problem hiding this comment.
Isn't this redundant with hasBattery btw?
There was a problem hiding this comment.
@Frenzie: It is not redundant, as hasBattery tells us there is a battery and canControlCharge tells us we can turn charging on/off programmatically.
There was a problem hiding this comment.
Then it definitely doesn't belong here.
IIRC (I will check that later today): The otg flag is needed, because you can not toggle batt and aux_batt independently. It took me quite some time to get this working as expected. There are quite some states and transistions in the state machine (bat(on/off/x), aux_bat(on/off/x), is_charger_present(yes/no)). |
|
Now works when using a data cable for charging, too. |
|
I have forgot to mention, that with this PR the battery and aux battery are charged both at the same time (and not one after the other). |
|
This is also ready from my side |
|
One last quirk exists. If I plug the device in, out and in again (within a few seconds) then everything works as expected. |
|
I'm seeing wonky charging behavior (and charger detection, for that matters) if I boot the device while plugged in to a wall charger, FWIW ;). (This is... not a new issue. Kindles have had a long history of weird shit happening when you boot them plugged in ;p). |
|
Pushing my last developer version for reference, maybe I will try it on a newer FW again. Normal reading works, but if it comes to suspend ... Most times it works, but then suddenly either charging of the power cover or the internal battery can not be turned on. There are quite some incomprehensible quirks when turning charging on and off with the power cover during suspend. Plugging the device into a charger seems to solve this problem, but I did not find a proper way for this programmatically. (Even Nickel can't do that, only a restart or plug in solves it.) It seems that the cilix FSM has some quirks, but I can not confirm this. |
|
Yeah, the PowerCover behavior is, quite frankly, hilariously broken :/. |
Not connected to any power-saving strategies, but can improve lifetime of batteries.
Currently, quite common sense for Lithium (anything) is, that for battery health it is important not to overcharge and not to undercharge it.
A sane strategy is not to charge it to 100% and not to suck it out (0%). On Laptops and electric vehicles this should be done by the intelligent charger.
On our devices, we don't really know what the vendor has implemented.
This PR allows to set a
start_charging_thresholdand astop_charging_thresholdfor the battery (on a Sage with power cover the batteries).This change is