Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework DeviceInfo.kt #526

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

benoit-pierre
Copy link
Contributor

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

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
Contributor 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
Copy link
Member

@Frenzie Frenzie left a comment

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
Copy link
Contributor

hugleo commented Nov 4, 2024

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
@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch from bc2e5a9 to 51f357e Compare November 8, 2024 15:53
@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
@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).
@benoit-pierre benoit-pierre force-pushed the pr/DeviceInfo.kt_rework branch from 15233ac to f8c12ad Compare November 10, 2024 16:17
@pazos pazos merged commit d1380ec into koreader:master Nov 13, 2024
2 of 3 checks passed
@benoit-pierre benoit-pierre deleted the pr/DeviceInfo.kt_rework branch November 13, 2024 12:04
benoit-pierre added a commit to benoit-pierre/android-luajit-launcher that referenced this pull request Nov 21, 2024
Frenzie pushed a commit that referenced this pull request Nov 22, 2024
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