Commit Graph

928 Commits (master)

Author SHA1 Message Date
Zijie He 0b59d501a6 Merge remote-tracking branch 'upstream/master' into screen-saver 8 years ago
Zijie He 7d4bd076f7 Resolve review comments 8 years ago
NiLuJe d4e5746eb3 Unbreak toggling the fL on Kindles
Fix #1960
8 years ago
NiLuJe f43cbc74e6 Always forcibly wake the H2O IR grid on wakeup
Fix #1862
Fix #1943
8 years ago
Qingping Hou eb37d9b8b6 kobo: fix screen probe for touch 8 years ago
Zijie He b86aa5a02b Implement auto-suspend function for Kobo. Add test case for UIManager:_checkTasks, which should not clear _task_queue_dirty bit before looping. 8 years ago
Qingping Hou 26f5c8861b chore: minor style cleanup 8 years ago
Qingping Hou c35aad3ae1 fix(kobo): return 0 frontlight level config to signal frontlight off state 8 years ago
Qingping Hou 824bdb4463 comment for kobo sleep 8 years ago
Zijie He 767e6e2b71 Add a sleep after kobo resume to resolve partial blank screen issue (#1874) 8 years ago
Zijie He 61ec784f91 Add eink_optimization_spec 8 years ago
zijiehe f0c675d722 E-ink optimization setting should be correctly set after restart. 8 years ago
Qingping Hou ada373e247 kobo: refresh screen after close screensaver on resume 8 years ago
Qingping Hou e812f7d0d6 kobo: fix typo during refactoring, luacheck is the best check 8 years ago
Qingping Hou cf70e86552 kobo: move reader setting outside of nicke_conf module 8 years ago
NiLuJe e60de3044c Keep intensity in sync at the config level too
Make sure frontlight_intensity in reader.lua settings matches what we
write into Nikcel's config
8 years ago
Qingping Hou 4751aba46c kobo: rewording, turns out has_toggle_btn != has_state_cfg :( 8 years ago
Qingping Hou 8190093f83 kobo: don't create FrontLightState config if it didn't exist to begin with 8 years ago
Qingping Hou 8b7658b8cd kobo: always keep intensity value and is_fl_on in sync 8 years ago
Qingping Hou cf3b97537b kobo: build fl_state based on fl_intensity if model does not support toggle 8 years ago
Qingping Hou 9afae91b13 chore: rename frontlight related variables to keep style consistent
flIntensity -> fl_intensity
flState -> is_fl_on
fallback_FrontLightLevel -> fallback_fl_level
8 years ago
NiLuJe f213fb6405 Bypass flState on suspend/wakeup
We pretty much always want to turn it off on suspend, and turn it on to
some measure on wakeup.

That, and nickel's FrontLightState is completely nonsensical on my device anyway...
8 years ago
NiLuJe 770625d756 Tweak the 'IR down on resume' workaround...
Only apply it when started from nickel, because I'm guessing we'd have
seen a number of reports of this if it happened more widely...
8 years ago
NiLuJe 85737e2b9d Forcibly re-activate IR grid on resume...
re #1862
8 years ago
NiLuJe 6c8bbfd470 Unbreak Kobo frontlight -> off when suspending.
If no-one touches anything, flState stays false...
And anyway, we should unconditionally disable the fl on sleep.
8 years ago
NiLuJe 7d0c354ffb Unbreak battery status refresh on resume on Kindle
Went kaput w/ #1854
8 years ago
NiLuJe aa0450ab5d Fix volumd's USBMS splash screen on FW 5.7.x
That clears up my previous queries abour the dual checks ;p.
8 years ago
NiLuJe 4510625d37 Unbreak native screensavers on Kindle >= 5.7.2
Which I broke the last time I touched this.
NOTE: I'm not quire sure why the bbsave/bbrestore on stop/resume did a
double check (screensaver & charging), because that effectiely disabled
it when charging, which I don't quite understand...

Also makes sure the needsScreenRefreshAfterResume flag is honored on
Kindles, because we need it on FW >= 5.7.2

Note that this *breaks* the behavior with passcode enabled, which was
unwittingly fixed in said previous changes...

re #1811
8 years ago
zijiehe a183c1c64b Slightly refector device & powerd component, remove some magic code 8 years ago
zijiehe e84093c414 Add a flState in Kobo, and KoboPowerD:toggleFrontlight uses flState to control the light instead of intensity. 8 years ago
Qingping Hou 1f082d7f5c build: fix travis build 8 years ago
chrox 1cef9278f1 do full screen refresh on KV after waked up
from screensaver
this should fix #1800
8 years ago
Qingping Hou e422842256 minor: a lot of luacheck fixes 8 years ago
Qingping Hou 59c17ef420 minor: more luacheck fixes 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
Qingping Hou 71ef994318 test: add nickle conf spec 8 years ago
Qingping Hou 1609becd61 Merge pull request #1772 from dset0x/frontlight-sync
WIP Synchronise frontlight level with nickel config
8 years ago
Qingping Hou 5a3b9c6856 style: make staick-check happier 8 years ago
Qingping Hou 59e791db82 feat: support numeric input for keyboard only devices 8 years ago
Dimitrios Semitsoglou-Tsiapos 699781de68 nickel_conf: handle missing file/key/section 8 years ago
Dimitrios Semitsoglou-Tsiapos eb47c5a39f Synchronise frontlight level with nickel config
* Drops support for mocking the frontlight setting internally which may
  cause incorrect in-memory values.

* Adds new supported value for `KOBO_LIGHT_ON_START` (-2), which sets
  'Kobo eReader.conf' as the source to update `settings.reader.lua`'s
  brightness setting on startup, thus using the value from it
  indirectly.

* Adds the `KOBO_SYNC_BRIGHTNESS_WITH_NICKEL` configuration variable
  which updates 'Kobo eReader.conf' every time the brightness setting is
  changed within koreader.

* Fixes missing call to save brightness when modifying via two-finger
  swipe.

Closes #1523.
8 years ago
NiLuJe bfb2ee703a Force poll the battery when showing the menu.
Making sure to always show up to date info.

Also fix the battery polling cache invalidation logic to actually
work?
Should make it behave properly on devices where we handle resuming
ourselves.
9 years ago
chrox a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
9 years ago
Qingping Hou f2fa1c36ba Merge pull request #1647 from chrox/fix_kv_refresh
fix some minor issues on Kindle Voyage
9 years ago
chrox d198f1c7ab don't set focus button for Android 9 years ago
chrox 4920426148 no need to do full screen refresh when outof screensaver
since there is already one by the native system
9 years ago
chrox e91b7bd266 set foucus of button table only if the device has a dpad
so that Kindle Voyage won't show a highlighted button in
confirm dialog.
9 years ago
NiLuJe d17ca951d3 Fix battery status on K3.
Will probably be more complex on older devices, where, AFAICT,
gasgauge-info is bitbanging over i2c...
9 years ago
NiLuJe 5fa5fabf02 Fix battery status on the K4
And also probably prevent a crash when trying to enable WiFi there.
We really shouldn't even show the WiFi stuff on some of these old
devices, but at least now it doesn't crash ;).
9 years ago
NiLuJe dc7b854196 Fix input devices on K2 9 years ago
NiLuJe ffd3f5c1cc Fix input devices on K4 9 years ago
NiLuJe df4bbc8191 Only read Kindle S/N once 9 years ago
NiLuJe 928404a6b6 Fix K4 key mappings 9 years ago
NiLuJe 53e5366e39 Fix input devices on K3.
re #1623
9 years ago
NiLuJe e56d30ff46 Oops. Fix my previous commit.
That basically broke startup on Kindles, which is, err, bad.
9 years ago
NiLuJe a4ebfee83b Handle the PW3
(Dry-coded, assume it's basically a PW2 w/ the KV screen ;p)
9 years ago
Guangda Hu 7491cd7b9d fix spaces 9 years ago
Guangda Hu 69db627136 Glo HD support 9 years ago
NiLuJe 8a8697c382 Future-proof the frontlight handling on Kindle.
Guard against trying to get any kind of frontlight info on devices
without one.

So far the flIntensity prop has always been there, even on devices
without one, but better not assume that'll always be the case ;).

That, and be consistent with the other lipc_handle tests.
9 years ago
NiLuJe a6a2b3d6a3 Try to get the Kobo codename from the env first
My batch of startup script tweaks should ensure PRODUCT is always
exported.
Leave the fallback in place, to avoid blowing up in weird corner-cases I
haven't thought about.
9 years ago
NiLuJe c6a3f9002c Tweak the H2O viewport to make it pixel-perfect.
As confirmed by checking a fb dump via fbgrab, and nickel's
broken cropping of screenshots ;).
9 years ago
chrox cfffb44c9d Fix no hardware key bindings on Android 9 years ago
chrox ae9f99744d flush setting before showing screensaver 9 years ago
Cosmin Gorgovan 41045dab99 Fix charging detection for Kobo devices
I've tested this on a N905C. I assume this implementation never
worked (since charge_now is supposed to show state of charge), but
it would be useful to get a confirmation.
9 years ago
chrox 906c91f0ad add page-button support for Kindle Voyage 9 years ago
chrox d0b450efde refresh battery capacity when going out of suspend
This should fix #1383.
9 years ago
NiLuJe 06bf4a2199 Fix input on KT2 devices (re #1403) 9 years ago
chrox 375070867b fix crash when checking ota on some devices 9 years ago
chrox 29c15518b0 fix wrong PgBack/PgFwd key binding 9 years ago
chrox 291f088d94 update koreader-base for multi-touch support on PocketBook 9 years ago
chrox 6a06cfaea5 refactor out flush settings when device goes into screensaver 9 years ago
chrox a5b90588ae add powerd for PocketBook device 9 years ago
chrox 96e9bb0701 partial refresh screen when koreader goes to forground 9 years ago
chrox 5c4651a3d9 auto launch koreader when opening PDF/DJVU/EPUB/FB2 files in pocketbook 9 years ago
chrox 7ac36a460c handle keyboard events in pocketbook 9 years ago
chrox 6894c11640 fix typo 9 years ago
chrox 1cba495fe0 add PocketBook port of Koreader 9 years ago
Hans-Werner Hilse d016858d75 only device event0 and event1 do exist, remove others. 9 years ago
Hans-Werner Hilse c28d973941 fix: load input driver before configuring it 9 years ago
Hans-Werner Hilse 0b5545f125 rump implementation for PocketBook devices, to be extended. 9 years ago
Michael Hall 9a66805b5a Handle Kobo Touch Key 10 years ago
Hans-Werner Hilse 3d73ff5ae7 only open frontlight device on Kobo devices that actually have light 10 years ago
Hans-Werner Hilse 173de615db Revert "smaller viewport for Kobo H2O (bezel overlaps bottom)"
This reverts commit fc36d6db37.
10 years ago
Hans-Werner Hilse fc36d6db37 smaller viewport for Kobo H2O (bezel overlaps bottom) 10 years ago
Hans-Werner Hilse dacb59f6b2 move debug function handover, set viewport for Kobo Mini
in order to have debugging facilities in framebuffer:init(), we hand
over the debug function as soon as we can.

Also, set a viewport for Kobo Mini. Hopefully, it fits most people -
I can only test on my unit.
10 years ago
Hans-Werner Hilse 4a497cfcfb fix initialization order on Kobos
notably, this will set up input offsets for viewport stuff after the
input rotation has been set up.
10 years ago
chrox ac6a34ee3d fix crash on special offered Kindle 10 years ago
Hans-Werner Hilse 895b98d5be add debugging output for device initialisation 10 years ago
Hans-Werner Hilse 677871cbf7 allow emulator to specify a viewport
This allows for Viewport debugging. It is configured via an environment
variable, EMULATE_READER_VIEWPORT. It works with Lua table syntax, e.g.:
EMULATE_READER_VIEWPORT="{x=10,w=550,y=5,h=790}"
10 years ago
Hans-Werner Hilse bf7ea7af6d add device names as comments
we use mostly code names internally, but it is probably a good idea
to annotate the actual device names.
10 years ago
Hans-Werner Hilse c6d342f305 fix usage of old refresh API
standby/screensaver/USB was affected.
10 years ago
Hans-Werner Hilse 7da6dd28a5 handle Android app events in frontend/device code
Events have been passed to the frontend/device (or /input) code before.
Some of them have been handled in the FFI/input code, however. That
seems to be highly critical with regard to timing, though, so we just
let it enqueue the event for our code to process later. That way, a
mutex that locks the input event queue can be freed faster.
10 years ago
Hans-Werner Hilse 2775ade5d6 fix device:init() bug on Android platform 10 years ago
Hans-Werner Hilse 39d061fd3a pass device object to input FFI module
this is needed (for now) on Android, since the FFI module triggers
screen updates.
10 years ago
Hans-Werner Hilse 57a27f8f24 provide debug function to framebuffer ffi implementation 10 years ago
Hans-Werner Hilse 63af71188a refactor refresh
Lots of the device-related distinction wandered into
base/ffi/framebuffer_<driver>. This eases the refresh logic in
UI manager, which basically only decides what kind of refresh
to trigger. The device specific configuration in the framebuffer
driver decides how to realize that whish.

screen.lua is gone, in its place is now the framebuffer driver.
The device abstraction decides what framebuffer driver to load.
10 years ago
chrox 8384eba810 consider also the screen size when scaling by DPI 10 years ago
NiLuJe f6753085ef Detect another KT2 model 10 years ago
Hans-Werner Hilse bcf0a9923c (really?) fix refresh viewport calculations
This adds more documentation about the viewport offset calculations
for refreshing rotated viewports.

The old behaviour also was (still) buggy, even after the latest round
of fixes. Now, the offsets when rotated are hopefully calculated correct.
10 years ago
Andrey Golovizin f785b29f34 Fix the viewport on Kobo Aura (phoenix). 10 years ago
Hans-Werner Hilse e8d576f99f fix bug in viewport offset calculation for refreshes
The calculation did not correctly calculate the offset in rotated
modes when the rotation was 90 or 270 degrees. Under these circumstances,
getWidth() and getHeight() did return rotated values for the framebuffer,
while Device.viewport did return not rotated values.
10 years ago
Hans-Werner Hilse 50cdbf133f fix refresh with rotation and viewport 10 years ago
Hans-Werner Hilse c5afa17399 make fake_events device a private feature of the Kindle device initialization
This is highly Kindle-specific, so we keep it there for now
10 years ago
Hans-Werner Hilse 6e40d5a9ad Fix refresh in rotated (landscape) mode when using viewport
Rotation wasn't applied to the underlying framebuffer's blitbuffer,
so refresh coordinates were cut off the wrong way.
10 years ago
Hans-Werner Hilse 5e5b2bd18d calculate proper refresh coordinates when using viewport
The viewport offset used by refresh() was not properly adapted when
the screen was rotated.
10 years ago
chrox b6432c0305 fix missing fake events for Kindle devices
This should fix #1120.
10 years ago
NiLuJe 6b21057c35 Do FULL updates when going in/out of ScreenSaver.
Sounds a good idea in general, and helps in particular on REAGL-aware
devices.
10 years ago
WS64 67c4bb365d Center screen for Kobo Aura
Why was it 
viewport = Geom:new{x=6, y=12, w=752, h=1012},?
viewport = Geom:new{x=0, y=0, w=752, h=1012}, looks way better!
10 years ago
Qingping Hou b32f42d6eb Merge pull request #1111 from Frenzie/master
Remove KOBO_LIGHT_OFF_ON_SUSPEND option and move workaround to kobolight.lua
10 years ago
Hans-Werner Hilse d91dccae80 fix night mode setting
implement bezel cleaning with proper background color
10 years ago
Hans-Werner Hilse 7c9d7e64b3 fix rotation: viewport, not framebuffer
Rotation was always referring to the framebuffer's blitbuffer,
which in the case of devices with a viewport was not identical.
10 years ago
Frans de Jonge c4f1687c22 Remove KOBO_LIGHT_OFF_ON_SUSPEND option and move workaround to ffi/kobolight.ua 10 years ago
NiLuJe 5dd9e917b7 Kill a FIXME :) 10 years ago
NiLuJe 52e21416e6 Detect more KV variants 10 years ago
NiLuJe 3e9f2b06a3 Fix Wario battery/charger detection
Not sure how we didn't catch that one sooner... ;p
10 years ago
NiLuJe cd7e9c3257 First stab at revamping the wait for marker stuff
WIP, untested, can probably simplified some more.
Good news is, it should be smarter, and thus provide a smoother user
experience :).
Relies on the relevant changes in base.
10 years ago
NiLuJe d488ca43fa Some potentially fun stuff TODO :) 10 years ago
NiLuJe a9d1c860fd Sigh. 10 years ago
NiLuJe df965eb534 Dry-coded skeleton detection of the KT2 & KV
FIXME!
Needs actual confirmation from people with the HW!!
Once that's done, some device checks will probably need to be
udated in the codebase to take those new devices into account ;).
10 years ago
Frans de Jonge 8cd80288a0 Implement UIManager:unschedule(action). Fixes #1007. 10 years ago
Frans de Jonge 011c5b6544 Fix Kobo resume in new hardware abstraction. 10 years ago
chrox a5cff2c42b add user defined event map
This should fix #1016.

Usage for #1016:
Create a file named "custom.event.map.lua" in the koreader directory
with the following content:

return {
    [102] = "LPgFwd",
}
10 years ago
HW f0fba63f67 Merge pull request #1082 from chrox/cover_50
screenshot to PNG files by default
10 years ago
chrox ae1dd3b380 screenshot to PNG files by default 10 years ago
Qingping Hou 8927f901da fix(input): use elseif conditional logic in adjustTouchSwitchXY 10 years ago
Hans-Werner Hilse 64601ffe3b add wrapper for FFI input.open() 10 years ago
Hans-Werner Hilse 3eae0cdcb7 Bugfixes: test leftovers, wrong paths 10 years ago
Hans-Werner Hilse 3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
10 years ago