feat(device.lua): add custom options for tolino#9503
Conversation
|
I'd possibly reduce and clarify the mapping by just loading the android table in... a table; and just overriding the few fields you need in there, and return that. It'll make the file smaller, and the intent much clearer ;). |
i am still quite new to lua (and java for that matter), so i dont quite know to consolidate what to where |
|
I simply meant that your new event map should essentially be something to the effect of local keymap = require("blah/blah/android/event_map")
keymap.ChangedKeyCode = "New_Event"
return keymap(Obviously, fix the path first, I don't remember 'em by rote ;p). |
fixed with b7df2ee |
this is because there is not actual indication of full name, only hardwaretype
|
in cf207b2 i changed the name from |
|
with c7bf69c i added property for context that is what the following values are at $ cat /sys/class/backlight/lm3630a_led/brightness
15
$ cat /sys/class/backlight/lm3630a_leda/brightness
133
$ cat /sys/class/backlight/lm3630a_ledb/brightness
87also assuming it is RGB because of $ cat /sys/class/backlight/lm3630a_led/max_brightness
255and that the color in a color picker looks similar enough to the color displayed on device (for quick reference |
|
The lights stuff is indeed going to be useless without root, but, for curiosity's sake, take a look at how this is handled on Kobo, because that's the same controller (although I'm pretty sure we use the kernel's tables for those instead of setting each led individually). |
from what i can tell in |
|
Update to my previous search for setting the warmth on Tolino, ref: koreader/android-luajit-launcher#351 (comment) TL;DR: it is possible with |
pazos
left a comment
There was a problem hiding this comment.
Please:
- Do not touch
frontend/device.lua - Do not add
frontend/device/tolinofiles
The only change I see is in a couple of key remaps. If you want to do that just do it in frontend/android/device.lua.
Something along the lines of:
-- generic android event map
local android_event_map = require("device/android/event_map")
-- my tolino does that
if condition then
android_event_map[21] = "LPgBack"
android_event_map[22] = "LPgFwd"
end
self.input.event_map = android.event_mapplease use android.product to check your condition.
| -- Tolino Vision 5, hardware model "E70K00" | ||
| local TolinoE70K00 = TolinoDevice:new{ | ||
| model = "Tolino_E70K00", | ||
| hasEinkScreen = yes, |
There was a problem hiding this comment.
I'm afraid this doesn't work that way.
Here you're saying: hey I'm a eink screen. Let me refresh myself, but you didn't specify the driver kind, the type of waveforms you support....
With that option alone you won't get proper refreshes. Only a handful of messages on the log buffer saying that FakeEPDController issued some updates.
| local TolinoE70K00 = TolinoDevice:new{ | ||
| model = "Tolino_E70K00", | ||
| hasEinkScreen = yes, | ||
| frontlight_settings = { |
There was a problem hiding this comment.
even if that works, the proper abstraction is in android-luajit-launcher, for both epd and lights driver. Please do that there so you won't break other widgets (ie: the native frontlight widget doesn't understand your code here)
There was a problem hiding this comment.
even if that works, the proper abstraction is in android-luajit-launcher
i basically copied it from device/kobo/device for future reference
i dont know if this would be correct, because that would report |
They're using the same mapping. IMHO this PR can be replaced with a simple user keymapping, as already covered in the wiki. If you want to workaround this without the need for user specific keymappings then please add an |
from what i can tell all tolinos have also thanks for linking me to the wiki, i kinda forgot github has this because other projects either dont have it or are just template or are way too outdated |
|
closing in favor of #9509 and koreader/android-luajit-launcher#382 |

This PR adds a
device/tolinodirectory withdevice.luaandevent_map.luaand for now only detects and uses custom event_map configuration for modelE70K00, uses android as base and fallback if model is not detectedfixes #9175
requires koreader/android-luajit-launcher#381 (this is why this PR is a DRAFT)
This change is