Merge pull request #559 from Markismus/master

Return to Home screen for Kobo devices Mini, Touch and Aura
pull/573/head
Huang Xin 10 years ago
commit 4156b2edd0

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -101,7 +101,7 @@ koboupdate: all
zip -9 -r \
../koreader-kobo-$(MACHINE)-$(VERSION).zip \
KoboRoot.tgz koreader koreader.png README_kobo.txt \
-x "koreader/resources/fonts/*" "koreader/resources/icons/src/*" "koreader/spec/*"
-x "koreader/resources/fonts/*" "koreader/resources/icons/src/*" "koreader/spec/*" "koreader/Kobo/*"
pot:
$(XGETTEXT_BIN) reader.lua `find frontend -iname "*.lua"` \

@ -20,6 +20,7 @@ end
function BasePowerD:init() end
function BasePowerD:toggleFrontlight() end
function BasePowerD:setIntensityHW() end
function BasePowerD:setIntensitySW() end
function BasePowerD:getCapacityHW() end
function BasePowerD:isChargingHW() end
function BasePowerD:suspendHW() end
@ -39,6 +40,14 @@ function BasePowerD:setIntensity(intensity)
self:setIntensityHW()
end
function BasePowerD:setIntensityWithoutHW(intensity)
intensity = intensity < self.fl_min and self.fl_min or intensity
intensity = intensity > self.fl_max and self.fl_max or intensity
self.flIntensity = intensity
self:setIntensitySW()
end
function BasePowerD:getCapacity()
if capacity_pulled_count == capacity_cached_count then
capacity_pulled_count = 0

@ -28,6 +28,13 @@ function KoboPowerD:setIntensityHW()
end
end
function KoboPowerD:setIntensitySW()
if self.fl ~= nil then
self.fl:restoreBrightness(self.flIntensity)
end
end
function KoboPowerD:getCapacityHW()
self.battCapacity = self:read_int_file(self.batt_capacity_file)
return self.battCapacity

@ -20,6 +20,26 @@ killall -STOP nickel
./reader.lua /mnt/onboard 2> crash.log
# continue with nickel
#cat .last_screen_content | /usr/local/Kobo/pickel showpic
#rm .last_screen_content
killall -CONT nickel
# return to home screen
cd /mnt/onboard/.kobo/koreader/Kobo
case `/bin/kobo_config.sh * 2>/dev/null` in
dragon) #DEVICE=AURAHD
#no binary file available
;;
phoenix) #DEVICE=AURA
cat ./KoboAuraTapHomeIcon.bin > /dev/input/event1
cat ./KoboAuraTapHomeIcon.bin > /dev/input/event1
;;
kraken) #DEVICE=GLO
#no binary file available
;;
pixie) #DEVICE=MINI
cat ./KoboMiniTapHomeIcon.bin > /dev/input/event1
cat ./KoboMiniTapHomeIcon.bin > /dev/input/event1
;;
trilogy|*) #DEVICE=TOUCH
cat ./KoboTouchHomeButton.bin > /dev/input/event0
;;
esac

@ -174,7 +174,8 @@ do
if powerd and powerd.restore_settings then
local intensity = G_reader_settings:readSetting("frontlight_intensity")
intensity = intensity or powerd.flIntensity
powerd:setIntensity(intensity)
powerd:setIntensityWithoutHW(intensity)
-- powerd:setIntensity(intensity)
end
end

Loading…
Cancel
Save