Allow ingoring the B288 feature bans, for debugging purposes.

pull/7700/head
NiLuJe 3 years ago committed by Frans de Jonge
parent f413cd15e8
commit 4b265bcd7a

@ -549,6 +549,26 @@ To:
end,
})
end
--- @note: Intended to debug/investigate B288 quirks on PocketBook devices
if Device:hasEinkScreen() and Device:isPocketBook() then
table.insert(self.menu_items.developer_options.sub_item_table, {
-- @translators B288 is the codename of the CPU/chipset (SoC stands for 'System on Chip').
text = _("Ignore feature bans on B288 SoCs"),
enabled_func = function()
return Device:isB288SoC()
end,
checked_func = function()
return G_reader_settings:isTrue("pb_ignore_b288_quirks")
end,
callback = function()
G_reader_settings:flipNilOrFalse("pb_ignore_b288_quirks")
local InfoMessage = require("ui/widget/infomessage")
UIManager:show(InfoMessage:new{
text = _("This will take effect on next restart."),
})
end,
})
end
if Device:isAndroid() then
table.insert(self.menu_items.developer_options.sub_item_table, {
text = _("Start E-ink test"),

@ -54,8 +54,12 @@ local PocketBook = Generic:new{
keymap = { [scan] = event },
}]]
-- Runtime state: whether raw input is actually used
--- @fixme: Never actually set anywhere?
is_using_raw_input = nil,
-- Will be set appropriately at init
isB288SoC = no,
-- Private per-model kludges
_fb_init = function() end,
_model_init = function() end,
@ -108,11 +112,16 @@ function PocketBook:init()
fb.forced_rotation = self.usingForcedRotation()
-- Tweak combination of alwaysPortrait/hwRot/hwInvert flags depending on probed HW and wf settings.
if fb:isB288() then
logger.dbg("mxcfb: Disabling hwinvert on B288 chipset")
self.canHWInvert = no
-- GL16 glitches with hwrot. And apparently with more stuff on newer FW (#7663)
logger.dbg("mxcfb: Disabling hwrot on B288 chipset")
fb.forced_rotation = nil
self.isB288SoC = yes
-- Allow bypassing the bans for debugging purposes...
if G_reader_settings:nilOrFalse("pb_ignore_b288_quirks") then
logger.dbg("mxcfb: Disabling hwinvert on B288 chipset")
self.canHWInvert = no
-- GL16 glitches with hwrot. And apparently with more stuff on newer FW (#7663)
logger.dbg("mxcfb: Disabling hwrot on B288 chipset")
fb.forced_rotation = nil
end
end
-- If hwrot is still on, nuke swrot
if fb.forced_rotation then

Loading…
Cancel
Save