Add support for Kobo Elipsa

Adding device ids, strings and cover details for the new Elipsa device. Firmware version is still to come, but, this will allow the device to be recognised.
This commit is contained in:
David 2021-06-06 20:06:19 +10:00
parent b7ac7806e5
commit 5af30bd3ce

View File

@ -1386,6 +1386,7 @@ class KOBOTOUCH(KOBO):
min_fwversion_dropbox = (4, 18, 13737) # The Forma only at this point. min_fwversion_dropbox = (4, 18, 13737) # The Forma only at this point.
min_fwversion_serieslist = (4, 20, 14601) # Series list needs the SeriesID to be set. min_fwversion_serieslist = (4, 20, 14601) # Series list needs the SeriesID to be set.
min_nia_fwversion = (4, 22, 15202) min_nia_fwversion = (4, 22, 15202)
min_elipsa_fwversion = (4, 27, 16704) # TODO: Get the correct version.
has_kepubs = True has_kepubs = True
@ -1412,6 +1413,7 @@ class KOBOTOUCH(KOBO):
AURA_H2O_EDITION2_PRODUCT_ID = [0x4227] AURA_H2O_EDITION2_PRODUCT_ID = [0x4227]
AURA_ONE_PRODUCT_ID = [0x4225] AURA_ONE_PRODUCT_ID = [0x4225]
CLARA_HD_PRODUCT_ID = [0x4228] CLARA_HD_PRODUCT_ID = [0x4228]
ELIPSA_PRODUCT_ID = [0x4233]
FORMA_PRODUCT_ID = [0x4229] FORMA_PRODUCT_ID = [0x4229]
GLO_PRODUCT_ID = [0x4173] GLO_PRODUCT_ID = [0x4173]
GLO_HD_PRODUCT_ID = [0x4223] GLO_HD_PRODUCT_ID = [0x4223]
@ -1425,9 +1427,9 @@ class KOBOTOUCH(KOBO):
GLO_PRODUCT_ID + GLO_HD_PRODUCT_ID + \ GLO_PRODUCT_ID + GLO_HD_PRODUCT_ID + \
MINI_PRODUCT_ID + TOUCH_PRODUCT_ID + TOUCH2_PRODUCT_ID + \ MINI_PRODUCT_ID + TOUCH_PRODUCT_ID + TOUCH2_PRODUCT_ID + \
AURA_ONE_PRODUCT_ID + CLARA_HD_PRODUCT_ID + FORMA_PRODUCT_ID + LIBRA_H2O_PRODUCT_ID + \ AURA_ONE_PRODUCT_ID + CLARA_HD_PRODUCT_ID + FORMA_PRODUCT_ID + LIBRA_H2O_PRODUCT_ID + \
NIA_PRODUCT_ID NIA_PRODUCT_ID + ELIPSA_PRODUCT_ID
BCD = [0x0110, 0x0326, 0x401] BCD = [0x0110, 0x0326, 0x401, 0x409]
# Image file name endings. Made up of: image size, min_dbversion, max_dbversion, isFullSize, # Image file name endings. Made up of: image size, min_dbversion, max_dbversion, isFullSize,
# Note: "200" has been used just as a much larger number than the current versions. It is just a lazy # Note: "200" has been used just as a much larger number than the current versions. It is just a lazy
@ -1481,6 +1483,7 @@ class KOBOTOUCH(KOBO):
# c.f., https://github.com/shermp/Kobo-UNCaGED/pull/17#discussion_r286209827 # c.f., https://github.com/shermp/Kobo-UNCaGED/pull/17#discussion_r286209827
' - N3_FULL.parsed': [(1080,1429), 0, 200,True,], ' - N3_FULL.parsed': [(1080,1429), 0, 200,True,],
} }
# Aura ONE and Elipsa have the same resolution.
AURA_ONE_COVER_FILE_ENDINGS = { AURA_ONE_COVER_FILE_ENDINGS = {
# Used for screensaver, home screen # Used for screensaver, home screen
' - N3_FULL.parsed': [(1404,1872), 0, 200,True,], ' - N3_FULL.parsed': [(1404,1872), 0, 200,True,],
@ -3386,6 +3389,9 @@ class KOBOTOUCH(KOBO):
def isClaraHD(self): def isClaraHD(self):
return self.detected_device.idProduct in self.CLARA_HD_PRODUCT_ID return self.detected_device.idProduct in self.CLARA_HD_PRODUCT_ID
def isElipsa(self):
return self.detected_device.idProduct in self.ELIPSA_PRODUCT_ID
def isForma(self): def isForma(self):
return self.detected_device.idProduct in self.FORMA_PRODUCT_ID return self.detected_device.idProduct in self.FORMA_PRODUCT_ID
@ -3425,6 +3431,8 @@ class KOBOTOUCH(KOBO):
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS _cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
elif self.isClaraHD(): elif self.isClaraHD():
_cover_file_endings = self.GLO_HD_COVER_FILE_ENDINGS _cover_file_endings = self.GLO_HD_COVER_FILE_ENDINGS
elif self.isElipsa():
_cover_file_endings = self.AURA_ONE_COVER_FILE_ENDINGS
elif self.isForma(): elif self.isForma():
_cover_file_endings = self.FORMA_COVER_FILE_ENDINGS _cover_file_endings = self.FORMA_COVER_FILE_ENDINGS
elif self.isGlo(): elif self.isGlo():
@ -3465,6 +3473,8 @@ class KOBOTOUCH(KOBO):
device_name = 'Kobo Aura ONE' device_name = 'Kobo Aura ONE'
elif self.isClaraHD(): elif self.isClaraHD():
device_name = 'Kobo Clara HD' device_name = 'Kobo Clara HD'
elif self.isElipsa():
device_name = 'Kobo Elipsa'
elif self.isForma(): elif self.isForma():
device_name = 'Kobo Forma' device_name = 'Kobo Forma'
elif self.isGlo(): elif self.isGlo():
@ -3663,7 +3673,15 @@ class KOBOTOUCH(KOBO):
' selecting "Configure this device" and then the' ' selecting "Configure this device" and then the'
' "Attempt to support newer firmware" option.' ' "Attempt to support newer firmware" option.'
' Doing so may require you to perform a factory reset of' ' Doing so may require you to perform a factory reset of'
' your Kobo.') + ( ' your Kobo.'
) +
'\n\n' +
_('Discussion of any new Kobo firmware can be found in the'
' Kobo forum at MobileRead. This is at %s.'
) % 'https://www.mobileread.com/forums/forumdisplay.php?f=223'
+
'\n' +
(
'\nDevice database version: %s.' '\nDevice database version: %s.'
'\nDevice firmware version: %s' '\nDevice firmware version: %s'
) % (self.dbversion, self.fwversion), ) % (self.dbversion, self.fwversion),