Skip to content

Commit

Permalink
Kindle Scribe: find accelerometer based on hardware (#11642)
Browse files Browse the repository at this point in the history
Closes #11392 (temporarily).
  • Loading branch information
mergen3107 committed Apr 18, 2024
1 parent b872191 commit d301157
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion frontend/device/kindle/device.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,15 @@ function KindleScribe:init()
end
end
-- Get accelerometer device
self.input.open("/dev/input/by-path/platform-11007000.i2c-event-joystick")
local std_out = io.popen("grep -A4 'accel' /proc/bus/input/devices | grep -o 'event[0-9]'", "r")
if std_out then
local gyro_dev = std_out:read("*line")
std_out:close()
logger.dbg("gyro_dev", gyro_dev)
if gyro_dev then
self.input.open("/dev/input/"..gyro_dev)
end
end

self.input.open(self.touch_dev)
self.input.open("fake_events")
Expand Down

0 comments on commit d301157

Please sign in to comment.