Skip to content

Commit

Permalink
Add new eink devices (#534)
Browse files Browse the repository at this point in the history
* Add new eink devices

noteair3c
poke2
obook p78d
meebook m6c
  • Loading branch information
hugleo authored Jan 9, 2025
1 parent 6bba3f4 commit 70c71d7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
19 changes: 18 additions & 1 deletion app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ object DeviceInfo {
JDREAD,
LINFINY_ENOTE,
MEEBOOK_M6,
MEEBOOK_M6C,
MEEBOOK_M7,
MEEBOOK_P6,
MOAAN_MIX7,
MOOINKPLUS2C,
NABUK,
NOOK,
NOOK_GL4,
OBOOK_P78D,
ONYX_C67,
ONYX_DARWIN7,
ONYX_DARWIN9,
Expand All @@ -91,6 +93,7 @@ object DeviceInfo {
ONYX_NOTE5,
ONYX_NOTE_AIR,
ONYX_NOTE_AIR2,
ONYX_NOTE_AIR_3C,
ONYX_NOTE_PRO,
ONYX_NOTE_X2,
ONYX_NOVA,
Expand Down Expand Up @@ -276,6 +279,10 @@ object DeviceInfo {
MANUFACTURER == "haoqing" && MODEL == "m6"
-> Id.MEEBOOK_M6

// Meebook M6C
MANUFACTURER == "haoqing" && MODEL == "m6c"
-> Id.MEEBOOK_M6C

// Meebook M7
MANUFACTURER == "haoqing" && MODEL == "m7"
-> Id.MEEBOOK_M7
Expand Down Expand Up @@ -307,6 +314,10 @@ object DeviceInfo {
|| MODEL == "evk_mx6sl" || MODEL.startsWith("ereader"))
-> Id.NOOK

// OBOOK P78D
MANUFACTURER == STR_ROCKCHIP && PRODUCT == "rk3566_78d" && MODEL == "p78d"
-> Id.OBOOK_P78D

// Onyx C67
MANUFACTURER == "onyx"
&& (PRODUCT.startsWith("c67") || MODEL == "rk30sdk")
Expand Down Expand Up @@ -399,6 +410,10 @@ object DeviceInfo {
BRAND == "onyx" && (MODEL == "noteair2" || MODEL == "noteair2p")
-> Id.ONYX_NOTE_AIR2

// Onyx Note Air 3C
BRAND == "onyx" && MODEL == "noteair3c"
-> Id.ONYX_NOTE_AIR_3C

// Onyx Note Pro
MANUFACTURER == "onyx" && PRODUCT == "notepro" && DEVICE == "notepro"
-> Id.ONYX_NOTE_PRO
Expand Down Expand Up @@ -567,12 +582,14 @@ object DeviceInfo {
}

HAS_COLOR_SCREEN = when (ID) {
Id.MEEBOOK_M6C,
Id.MOOINKPLUS2C,
Id.NONE,
Id.ONYX_GO_COLOR7,
Id.ONYX_NOVA3_COLOR,
Id.ONYX_TAB_ULTRA_C,
Id.ONYX_NOVA_AIR_C,
Id.ONYX_NOTE_AIR_3C,
Id.ONYX_TAB_ULTRA_C,
-> true else -> false
}
}
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/org/koreader/launcher/device/EPDFactory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ object EPDFactory {
DeviceInfo.Id.ONYX_NOTE5,
DeviceInfo.Id.ONYX_NOTE_AIR,
DeviceInfo.Id.ONYX_NOTE_AIR2,
DeviceInfo.Id.ONYX_NOTE_AIR_3C,
DeviceInfo.Id.ONYX_NOTE_PRO,
DeviceInfo.Id.ONYX_NOTE_X2,
DeviceInfo.Id.ONYX_NOVA,
Expand All @@ -116,6 +117,7 @@ object EPDFactory {
DeviceInfo.Id.ONYX_NOVA_PRO,
DeviceInfo.Id.ONYX_PAGE,
DeviceInfo.Id.ONYX_PALMA,
DeviceInfo.Id.ONYX_POKE2,
DeviceInfo.Id.ONYX_POKE3,
DeviceInfo.Id.ONYX_POKE4,
DeviceInfo.Id.ONYX_POKE5,
Expand All @@ -140,8 +142,10 @@ object EPDFactory {
DeviceInfo.Id.HYREAD_MINI6,
DeviceInfo.Id.INKPALM_PLUS,
DeviceInfo.Id.MEEBOOK_M6,
DeviceInfo.Id.MEEBOOK_M6C,
DeviceInfo.Id.MEEBOOK_M7,
DeviceInfo.Id.MOAAN_MIX7,
DeviceInfo.Id.OBOOK_P78D,
DeviceInfo.Id.PUBU_PUBOOK,
DeviceInfo.Id.XIAOMI_READER,
-> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ object LightsFactory {
BoyueS62RootController()
}
DeviceInfo.Id.ONYX_GO_COLOR7,
DeviceInfo.Id.ONYX_NOTE_AIR_3C,
DeviceInfo.Id.ONYX_NOVA_AIR,
DeviceInfo.Id.ONYX_PAGE,
DeviceInfo.Id.ONYX_POKE5,
Expand Down Expand Up @@ -48,6 +49,7 @@ object LightsFactory {
DeviceInfo.Id.ONYX_NOTE_PRO,
DeviceInfo.Id.ONYX_NOVA3,
DeviceInfo.Id.ONYX_NOVA_PRO,
DeviceInfo.Id.ONYX_POKE2,
DeviceInfo.Id.ONYX_POKE3,
DeviceInfo.Id.ONYX_POKE_PRO,
-> {
Expand Down

0 comments on commit 70c71d7

Please sign in to comment.