CoverImage plugin: enable on Remarkable and PocketBook (#6906)

This commit is contained in:
zwim
2020-11-28 13:58:44 +01:00
committed by GitHub
parent 3137f5a158
commit 52f66a89d2
2 changed files with 9 additions and 1 deletions

View File

@@ -95,7 +95,13 @@ function Remarkable:setDateTime(year, month, day, hour, min, sec)
return os.execute(command) == 0
end
function Remarkable:_clearScreen()
self.screen:clear()
self.screen:refreshFull()
end
function Remarkable:suspend()
self:_clearScreen()
os.execute("systemctl suspend")
end
@@ -103,10 +109,12 @@ function Remarkable:resume()
end
function Remarkable:powerOff()
self:_clearScreen()
os.execute("systemctl poweroff")
end
function Remarkable:reboot()
self:_clearScreen()
os.execute("systemctl reboot")
end

View File

@@ -2,7 +2,7 @@
local Device = require("device")
if not Device.isAndroid() and not Device.isEmulator() then
if not (Device.isAndroid() or Device.isEmulator() or Device.isRemarkable() or Device.isPocketBook()) then
return { disabled = true }
end