This disables low battery monitor shutdown (LBM shutdown) on boot and checks if battery is enough.
The logic is as follows:
If battery is not enough:
- If not charging and 15s pass, it will re enable LBM shutdown and power off.
- If charging, it will wait until it is charged above the limit.
Screen will auto turn off to save power. A press on Power button or a change on charger, will enable it for another 15s.
If battery is enough:
- Enables LBM shutdown and continues with the boot process.
This fixes an edge case where the original label set was done with set_static_text, the next one with set_text and the text is at the same address.
The incomplete check would think that the text resides on heap and it would reallocate it as such, effectively corrupting .data on the next sets.
This patch applies the simpler init from HOS driver.
The most important change is enabling a feature that the fw supports:
Automatic tuning and calibration based on saved tuning values (running HOS only once saves these).
Use key `fss0experimental=1` in a boot entry with `fss0=` defined to enable experimental content.
(Older versions of hekate will just skip any experimental content.)
Additionally disable archive bit fix tool in hekate main to shave binary size.
The archive bit fix in Nyx is the only maintained one and so the only one that should be used.
Switch touch panels have a 10-15px offset around the edges.
(10-1269, 10-709) / (15-1264, 15-704)
This allows touch driver to report a max of 0-1279, 0-719.
There is an edge case fixed where the whole would be freed and this would make use of a nullptr.
Additionally, remove usage of reserved names for vars and add comments on how it works.
This fixes the following case:
When force is 0 and the payload is not hekate, the function jumps to the 'is old' check.
This skips the is magic value check and only does the version check.
In case the foreign payload has a low value on that offset, it causes an overwrite which is unneeded.
Fixes a hang caused when rebooting 2 payload from L4T with old hekate in vendor partition.
L4T does not overwrite the nyx storage where the Minerva configuration is stored.
This makes new Minerva parse the wrong tables from old hekate and eventually hang the RAM, which causes an exception on BPMP.