Skip to content

Commit

Permalink
Merge pull request #155 from Markismus/master
Browse files Browse the repository at this point in the history
Kobo Frontlight tweak
  • Loading branch information
houqp committed May 2, 2014
2 parents e76729b + 7ea3b54 commit ac9eea0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ffi/kobolight.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
local ffi = require("ffi")

-- for closing on garbage collection, we need a pointer or aggregate
-- cdata object (not a plain "int"). So we encapsulate in a struct.
ffi.cdef[[
Expand Down Expand Up @@ -59,6 +58,11 @@ function kobolight_mt.__index:setBrightness(brightness)
end
end

function kobolight_mt.__index:restoreBrightness(brightness)
self.brightness = brightness
self.savedBrightness = brightness
end

function kobolight.open(device)
local light = {
light_fd = nil,
Expand Down

0 comments on commit ac9eea0

Please sign in to comment.