PocketBook: Add new device definitions (#6481)

reviewable/pr6486/r1
roshavagarga 4 years ago committed by GitHub
parent 55a5f0c1a3
commit ec87d36e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -206,156 +206,206 @@ function PocketBook:getDeviceModel()
return ffi.string(inkview.GetDeviceModel()) return ffi.string(inkview.GetDeviceModel())
end end
-- PocketBook InkPad -- PocketBook Mini (515)
local PocketBook840 = PocketBook:new{
model = "PBInkPad",
display_dpi = 250,
}
-- PocketBook 515
local PocketBook515 = PocketBook:new{ local PocketBook515 = PocketBook:new{
model = "PB515", model = "PB515",
display_dpi = 200, display_dpi = 200,
isTouchDevice = no, isTouchDevice = no,
hasWifiToggle = no,
hasDPad = yes, hasDPad = yes,
hasFewKeys = yes, hasFewKeys = yes,
} }
-- PocketBoot 613 Basic -- PocketBook Basic (611)
local PocketBook611 = PocketBook:new{
model = "PB611",
display_dpi = 167,
isTouchDevice = no,
hasFrontlight = no,
hasDPad = yes,
hasFewKeys = yes,
}
-- PocketBook Basic (613)
local PocketBook613 = PocketBook:new{ local PocketBook613 = PocketBook:new{
model = "PB613B", model = "PB613B",
display_dpi = 167, display_dpi = 167,
isTouchDevice = no, isTouchDevice = no,
hasWifiToggle = no, hasWifiToggle = no,
hasFrontlight = no,
hasDPad = yes, hasDPad = yes,
hasFewKeys = yes, hasFewKeys = yes,
} }
-- PocketBook 614W Basic -- PocketBook Basic 2 / Basic 3 (614/614W)
local PocketBook614W = PocketBook:new{ local PocketBook614W = PocketBook:new{
model = "PB614W", model = "PB614W",
display_dpi = 167, display_dpi = 167,
isTouchDevice = no, isTouchDevice = no,
hasWifiToggle = no,
hasFrontlight = no, hasFrontlight = no,
hasDPad = yes, hasDPad = yes,
hasFewKeys = yes, hasFewKeys = yes,
} }
-- PocketBook Basic Lux 2 -- PocketBook Basic Lux (615)
local PocketBook616 = PocketBook:new{ local PocketBook615 = PocketBook:new{
model = "PBBLux2", model = "PBBLux",
display_dpi = 212, display_dpi = 212,
isTouchDevice = no, isTouchDevice = no,
hasWifiToggle = no,
hasDPad = yes, hasDPad = yes,
hasFewKeys = yes, hasFewKeys = yes,
} }
-- PocketBook Lux 4 -- PocketBook Basic Lux 2 (616)
local PocketBook627 = PocketBook:new{ local PocketBook616 = PocketBook:new{
model = "PBLux4", model = "PBBLux2",
display_dpi = 212, display_dpi = 212,
isTouchDevice = no,
hasDPad = yes,
hasFewKeys = yes,
} }
-- PocketBook Touch HD -- PocketBook Touch (622)
local PocketBook631 = PocketBook:new{ local PocketBook622 = PocketBook:new{
model = "PBTouchHD", model = "PBTouch",
display_dpi = 300, display_dpi = 167,
} hasFrontlight = no,
-- PocketBook Touch HD Plus
local PocketBook632 = PocketBook:new{
model = "PBTouchHDPlus",
display_dpi = 300,
isAlwaysPortrait = yes,
} }
-- PocketBook Lux 3 -- PocketBook Touch Lux (623)
local PocketBook626 = PocketBook:new{ local PocketBook623 = PocketBook:new{
model = "PBLux3", model = "PBTouchLux",
display_dpi = 212, display_dpi = 212,
} }
-- PocketBook Basic Touch -- PocketBook Basic Touch (624)
local PocketBook624 = PocketBook:new{ local PocketBook624 = PocketBook:new{
model = "PBBasicTouch", model = "PBBasicTouch",
display_dpi = 167,
hasFrontlight = no, hasFrontlight = no,
display_dpi = 166,
} }
-- PocketBook Basic Touch 2 -- PocketBook Basic Touch 2 (625)
local PocketBook625 = PocketBook:new{ local PocketBook625 = PocketBook:new{
model = "PBBasicTouch2", model = "PBBasicTouch2",
display_dpi = 167,
hasFrontlight = no, hasFrontlight = no,
display_dpi = 166,
} }
-- PocketBook Touch -- PocketBook Touch Lux 2 / Touch Lux 3 (626)
local PocketBook622 = PocketBook:new{ local PocketBook626 = PocketBook:new{
model = "PBTouch", model = "PBLux3",
hasFrontlight = no, display_dpi = 212,
display_dpi = 166,
} }
-- PocketBook Touch Lux -- PocketBook Touch Lux 4 (627)
local PocketBook623 = PocketBook:new{ local PocketBook627 = PocketBook:new{
model = "PBTouchLux", model = "PBLux4",
display_dpi = 212, display_dpi = 212,
} }
-- PocketBook InkPad 3 -- PocketBook Touch Lux 5 (628)
local PocketBook740 = PocketBook:new{ local PocketBook628 = PocketBook:new{
model = "PBInkPad3", model = "PBTouchLux5",
display_dpi = 212,
isAlwaysPortrait = yes, isAlwaysPortrait = yes,
display_dpi = 300,
} }
-- PocketBook InkPad 3 Pro -- PocketBook Sense / Sense 2 (630)
local PocketBook740_2 = PocketBook:new{ local PocketBook630 = PocketBook:new{
model = "PBInkPad3Pro", model = "PBSense",
isAlwaysPortrait = yes, display_dpi = 212,
}
-- PocketBook Touch HD / Touch HD 2 (631)
local PocketBook631 = PocketBook:new{
model = "PBTouchHD",
display_dpi = 300, display_dpi = 300,
} }
-- PocketBook InkPad X -- PocketBook Touch HD Plus / Touch HD 3 (632)
local PocketBook1040 = PocketBook:new{ local PocketBook632 = PocketBook:new{
model = "PB1040", model = "PBTouchHDPlus",
display_dpi = 300,
isAlwaysPortrait = yes, isAlwaysPortrait = yes,
display_dpi = 227,
} }
-- PocketBook Sense -- PocketBook Color (633)
local PocketBook630 = PocketBook:new{ local PocketBook633 = PocketBook:new{
model = "PBSense", model = "PBColor",
display_dpi = 212, display_dpi = 300,
hasColorScreen = yes,
has3BytesWideFrameBuffer = yes,
canUseCBB = no, -- 24bpp
} }
-- PocketBook Aqua 2 -- PocketBook Aqua (640)
local PocketBook640 = PocketBook:new{
model = "PBAqua",
display_dpi = 167,
}
-- PocketBook Aqua 2 (641)
local PocketBook641 = PocketBook:new{ local PocketBook641 = PocketBook:new{
model = "PBAqua2", model = "PBAqua2",
display_dpi = 212, display_dpi = 212,
} }
-- PocketBook Color Lux -- PocketBook Ultra (650)
local PocketBook650 = PocketBook:new{
model = "PBUltra",
display_dpi = 212,
}
-- PocketBook InkPad 3 (740)
local PocketBook740 = PocketBook:new{
model = "PBInkPad3",
display_dpi = 300,
isAlwaysPortrait = yes,
}
-- PocketBook InkPad 3 Pro (740_2)
local PocketBook740_2 = PocketBook:new{
model = "PBInkPad3Pro",
display_dpi = 300,
isAlwaysPortrait = yes,
}
-- PocketBook Color Lux (801)
local PocketBookColorLux = PocketBook:new{ local PocketBookColorLux = PocketBook:new{
model = "PBColorLux", model = "PBColorLux",
display_dpi = 125,
hasColorScreen = yes, hasColorScreen = yes,
has3BytesWideFrameBuffer = yes, has3BytesWideFrameBuffer = yes,
canUseCBB = no, -- 24bpp canUseCBB = no, -- 24bpp
} }
-- PocketBook InkPad / InkPad 2 (840)
local PocketBook840 = PocketBook:new{
model = "PBInkPad",
display_dpi = 250,
}
-- PocketBook InkPad X (1040)
local PocketBook1040 = PocketBook:new{
model = "PB1040",
display_dpi = 227,
isAlwaysPortrait = yes,
}
logger.info('SoftwareVersion: ', PocketBook:getSoftwareVersion()) logger.info('SoftwareVersion: ', PocketBook:getSoftwareVersion())
local codename = PocketBook:getDeviceModel() local codename = PocketBook:getDeviceModel()
if codename == "PocketBook 515" then if codename == "PocketBook 515" then
return PocketBook515 return PocketBook515
elseif codename == "PocketBook 611" then
return PocketBook611
elseif codename == "PocketBook 613" then elseif codename == "PocketBook 613" then
return PocketBook613 return PocketBook613
elseif codename == "PocketBook 614W" then elseif codename == "PocketBook 614W" or codename == "PocketBook 614" then
return PocketBook614W return PocketBook614W
elseif codename == "PocketBook 615" or codename == "PB615" then
return PocketBook615
elseif codename == "PB616W" or elseif codename == "PB616W" or
codename == "PocketBook 616" then codename == "PocketBook 616" then
return PocketBook616 return PocketBook616
@ -372,22 +422,30 @@ elseif codename == "PB626" or codename == "PB626(2)-TL3" or
return PocketBook626 return PocketBook626
elseif codename == "PB627" then elseif codename == "PB627" then
return PocketBook627 return PocketBook627
elseif codename == "PB628" then
return PocketBook628
elseif codename == "PocketBook 630" then elseif codename == "PocketBook 630" then
return PocketBook630 return PocketBook630
elseif codename == "PB631" then elseif codename == "PB631" or codename == "PocketBook 631" then
return PocketBook631 return PocketBook631
elseif codename == "PB632" then elseif codename == "PB632" then
return PocketBook632 return PocketBook632
elseif codename == "PB633" then
return PocketBook633
elseif codename == "PB640" then
return PocketBook640
elseif codename == "PB641" then elseif codename == "PB641" then
return PocketBook641 return PocketBook641
elseif codename == "PB650" then
return PocketBook650
elseif codename == "PB740" then elseif codename == "PB740" then
return PocketBook740 return PocketBook740
elseif codename == "PB740-2" then elseif codename == "PB740-2" then
return PocketBook740_2 return PocketBook740_2
elseif codename == "PB1040" then
return PocketBook1040
elseif codename == "PocketBook 840" then elseif codename == "PocketBook 840" then
return PocketBook840 return PocketBook840
elseif codename == "PB1040" then
return PocketBook1040
elseif codename == "PocketBook Color Lux" then elseif codename == "PocketBook Color Lux" then
return PocketBookColorLux return PocketBookColorLux
else else

Loading…
Cancel
Save