Skip to content

rework DeviceInfo.kt#526

Merged
pazos merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/DeviceInfo.kt_rework
Nov 13, 2024
Merged

rework DeviceInfo.kt#526
pazos merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/DeviceInfo.kt_rework

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented Nov 4, 2024

Copy link
Copy Markdown
Member

Reduce duplication to make it easier to maintain.

Fix the following issues:

  • possible problem with EINK value on TOLINO_EPOS3 devices (since both TOLINO and TOLINO_EPOS3 booleans would be set)
  • EINK was never set to EinkDevice.TOLINO_VISION6, but checked in device/EPDFactory.kt
  • same with HANVON_960 & HYREAD_MINI6
  • LIGHTS was never set to LightsDevice.ONYX_NOTE_PRO, but checked in device/LightsFactory.kt

Still not fixed:

- LIGTS could be set to LightsDevice.ONYX_PALMA, but was never checked in device/LightsFactory.kt

Also address #483 (comment), will conflict with #525.


This change is Reviewable

@benoit-pierre

Copy link
Copy Markdown
Member Author

Still not fixed:

* `LIGTS` could be set to `LightsDevice.ONYX_PALMA`, but was never checked in `device/LightsFactory.kt`

According to #432, the generic controller is the right choice for the Onyx Palma.

@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch from e788cd9 to ba80e04 Compare November 4, 2024 19:34

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me

(but note, I didn't check everything in detail ;-) )

@hugleo

hugleo commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

Still not fixed:

* `LIGTS` could be set to `LightsDevice.ONYX_PALMA`, but was never checked in `device/LightsFactory.kt`

According to #432, the generic controller is the right choice for the Onyx Palma.

Yes, lightsMap[LightsDevice.ONYX_PALMA] = ONYX_PALMA was added by mistake

@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch from ba80e04 to bc2e5a9 Compare November 8, 2024 15:27
@benoit-pierre benoit-pierre marked this pull request as ready for review November 8, 2024 15:27
Comment thread app/src/main/java/org/koreader/launcher/device/Device.kt Outdated
@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch from bc2e5a9 to 51f357e Compare November 8, 2024 15:53
Comment thread app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt Outdated
@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch 3 times, most recently from 99e005f to e828a12 Compare November 9, 2024 12:20
Comment thread app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt
@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch 2 times, most recently from d96d77e to 15233ac Compare November 10, 2024 14:45
Reduce duplication to make it easier to maintain.

Fix the following issues:

- possible problem with `EINK` value on `TOLINO_EPOS3` devices
  (since both `TOLINO` and `TOLINO_EPOS3` booleans would be set)
- `EINK` was never set to `EinkDevice.TOLINO_VISION6`,
  but checked in `device/EPDFactory.kt`
- same with `HANVON_960` & `HYREAD_MINI6`
- `LIGHTS` was never set to `LightsDevice.ONYX_NOTE_PRO`,
  but checked in `device/LightsFactory.kt`
- `LIGHTS` could be set to `LightsDevice.ONYX_PALMA`,
  but was never checked in `device/LightsFactory.kt`

Note: also drop device properties: `is_boyue` (unused) & `is_tolino`
(only used to add direction pad mappings, details were added to the
relevant wiki page instead), and no hardware rotation quirk (which
was an incomplete emulator only workaround).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants