Repository navigation
Hide frontlight controls on Xiaomi Reader and Moaan Mix7 (both RK3566) - #619
Conversation
|
Just add your devices to https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt#L773 since the quirk is doing the same thing. |
|
But maybe add a tiny one-line comment saying it doesn't actually have no lights but that there's no added value to controlling them. |
|
I did consider adding them to QUIRK_NO_LIGHTS. I kept a separate quirk because I prefer code that documents itself: every device in QUIRK_NO_LIGHTS has no frontlight hardware, while the Xiaomi Reader and Moaan Mix7 do have one that we just can't drive. Merging them would make the "devices without lights" list untrue. That said, this is a small thing and I don't want to hold up the PR over naming. If you'd both rather keep a single list, I'm happy to fold the two entries into QUIRK_NO_LIGHTS with a comment on each line, just say so and I'll update the branch. |
|
Yes, a QUIRK_NO_LIGHTS with a comment will do it |
…so KOReader shows brightness controls that do nothing. Add QUIRK_UNSUPPORTED_LIGHTS, separate from QUIRK_NO_LIGHTS which lists devices without frontlight hardware, and make Device.hasLights false when either quirk is set so KOReader hides its frontlight UI.
EPD_AUTO (0) is dropped as invalid by MainActivity.einkUpdate(), so full refreshes requested by KOReader never reached the panel. Same fix as in koreader#611.
51ff63c to
1e7025b
Compare
|
Updated the branch:
|
|
Looks like RK35xxEPDController.kt is already working for the Xiaomi 7 Reader: #478 You may break other devices if you change EPD_AUTO globally. It would be better to use a separate driver for this. Also, I don't think the changes here will have any effect, because setMode is commented out and the code only calls sendOneFullFrame(): |
|
What I did in #478 those 2 years ago only made EPD test procedure work properly for all RK3566 devices. Due to EPD_AUTO being interpreted as "invalid" (as described in #611) full screen refresh does not work on any RK3566 devices when requested directly by KOReader (another proof of this faulty behaviour is #608). When it comes to |
|
All right, now I understand. getWaveformFull with 0 doesn't even call sendOneFullFrame because is ignored in some if/else clause... |
Closes #16134, closes #14423. * Add Onyx Boox Faraday 2 support and switch Poke3 to ADB lights (koreader/android-luajit-launcher#609) @hugleo * Fix EPD full refresh not working and add test entries for Lenovo Smart Paper (koreader/android-luajit-launcher#608) @4285f4 * Add Onyx Boox Go 6 Gen 2 support (koreader/android-luajit-launcher#616) @afzafri * Onyx Boox Go 10.3 Gen II (Lumi) (koreader/android-luajit-launcher#613) @SirProdigle * Add e-ink refresh support for Topjoy E602. (koreader/android-luajit-launcher#618) @meeraez64-rgb * Change lights for Onyx Leaf and Onyx Poke3 (koreader/android-luajit-launcher#617) @hugleo * Nook GL4 Plus: make warmth survive B&N's colour temperature service (<koreader/android-luajit-launcher#620>) @backcountrymountains * Apply android.supports_size_changes to the main activity (koreader/android-luajit-launcher#615) @xeropresence * Hide frontlight controls on Xiaomi Reader and Moaan Mix7 (both RK3566) (koreader/android-luajit-launcher#619) @jkl16 * Ridi Paper 3: switch EPD controller to Nook/NTX (koreader/android-luajit-launcher#621) @nar-io
Problem
The Xiaomi Reader (rk3566_eink) and Moaan Mix7 have a frontlight, but the launcher has no driver for it. They fall through to
GenericController, which adjusts the window brightness attribute. That has no effect on these panels, so KOReader shows a Frontlight menu entry, gesture actions and a footer brightness item that do nothing.The RK3566 lights driver from #573 does not work here either. It writes to the
lm3630a_leda/lm3630a_ledbsysfs backlight nodes and InkBook system properties, which these devices do not expose.Change
QUIRK_UNSUPPORTED_LIGHTSinDeviceInfo.ktfor devices that have lights no available driver can control. This is deliberately separate fromQUIRK_NO_LIGHTS, whose entries all lack frontlight hardware, so the existing list keeps its literal meaning.Device.hasLightsis now false when either quirk is set. KOReader reads this throughandroid.hasLights()and hides its frontlight UI.Why hide rather than add a driver
On these devices the system already offers a good frontlight experience. Brightness and warmth are one swipe away in the system quick settings, and the firmware has an auto brightness option that adjusts to ambient light.
A KOReader driver would compete with that: it would have to write through a private vendor API, and any level it sets would be overridden as soon as the system's auto brightness or cached settings kick in. Leaving the light to the system is the simpler and more reliable behaviour, and hiding the non-functional controls makes that explicit.
Notes
This change is