Commit Graph

8 Commits (master)

Author SHA1 Message Date
NiLuJe 788ccac561
Input/Device: Refactor Gyro events handling (#9935)
* Get rid of the `canToggleGSensor` Device cap, it's now mandatory for `hasGSensor` devices. (This means Kindles can now toggle the gyro, fix #9136).
* This also means that `Device:toggleGSensor` is now implemented by `Generic`.
* Update the Screen & Gyro rotation constants to be clearer (c.f., https://github.com/koreader/koreader-base/pull/1568) (/!\ This might conceivably break some `rotation_map` user-patches).
* Input: Move the platform-specific gyro handling to Device implementations, and let Input only handle a single, custom protocol (`EV_MSC:MSC_GYRO`).
* Input: Refine the `rotation_map` disable method implemented in 43b021d37c. Instead of directly poking at the internal field, use a new method, `disableRotationMap` (/!\ Again, this might break some `rotation_map` user-patches).
* Input: Minor tweaks to event adjust hooks to make them more modular, allowing the Kobo implementation to build and use a single composite hook. API compatibility maintained with wrappers.
1 year ago
NiLuJe d56a944b79 Tests: Handle FM/ReaderUI instances slightly more sanely
* Tear down FM instances properly
* Don't manhandle ReaderUI too much, and document when the tests do
  actively broken shit, like bypassing safeties to open two // ReaderUI
  instances.
3 years ago
NiLuJe 9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
3 years ago
yparitcher f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
4 years ago
Frans de Jonge e3c17aa6d0 Travis: run luacheck on unit tests (#3059)
* Travis: run luacheck on unit tests
7 years ago
chrox 7ea12c0198 fix broken unit tests on Travis CI
1. It turns out that `device_id` is not defined in unit test environment
which makes the `assert(self.kosync_device_id)` fail and somehow makes `luajit` segmentation fault.
2. In the device spec, stubbing `io.open` will make subsquent `require`
all return boolean value and segmentation fault `luajit`.

This patch is a minimum viable change that makes CI work on both my
local box and Travis.
8 years ago
Qingping Hou 8268d8d32c test(fix): clean up after screenshot test 8 years ago
Qingping Hou 3b92bdc084 feat: support screenshot in filemanager 8 years ago