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

Add support for Tinkerboard 2 #29

Merged
merged 12 commits into from
Jun 9, 2021
Merged

Add support for Tinkerboard 2 #29

merged 12 commits into from
Jun 9, 2021

Conversation

p1r473
Copy link
Contributor

@p1r473 p1r473 commented Jun 9, 2021

Hi Linus, been a while. Hope all is well.
I have recently purchased a Tinkerboard 2 and am adding support for it.
I'd like you to check over the changes and make sure its implemented how youd like. If not, I am happy to make any changes.

Copy link
Owner

@linusg linusg left a comment

Choose a reason for hiding this comment

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

Looks great! Let's rename TINKER_BOARD2 to TINKER_BOARD_2 and tinker-board2 to tinker-board-2, and give the README sections that mention Tinker Board an update, e.g. by adding a sentence below the Tinker Board code example: "For Tinker Board 2, use BoardType.TINKER_BOARD_2."

@p1r473
Copy link
Contributor Author

p1r473 commented Jun 9, 2021

Thanks Linus, I have made the changes. Let me know what you think.

README.md Outdated Show resolved Hide resolved
@linusg
Copy link
Owner

linusg commented Jun 9, 2021

🚀

@linusg linusg merged commit 58e1f01 into linusg:master Jun 9, 2021
@p1r473
Copy link
Contributor Author

p1r473 commented Jun 9, 2021

Thanks Linus!

@linusg
Copy link
Owner

linusg commented Jun 9, 2021

I'll release this in a new version later today, will let you know. :)

@p1r473
Copy link
Contributor Author

p1r473 commented Jun 9, 2021

By the way,
Is there any modifications we can make to initiate the board type as either a Pi, Tinker 1 or 2, and not have to initiate it in both CLI and also init files?
So we can initialize the board type in just 1 location?

@linusg
Copy link
Owner

linusg commented Jun 9, 2021

Done! https://pypi.org/project/rpi-backlight/2.3.0

Is there any modifications we can make to initiate the board type as either a Pi, Tinker 1 or 2, and not have to initiate it in both CLI and also init files?

I suppose if there's a reliable way to detect the board type, we could have automatic detection if no board type is explicitly provided - perhaps by checking the existence of each path in _BACKLIGHT_SYSFS_PATHS?

@p1r473
Copy link
Contributor Author

p1r473 commented Jun 9, 2021

Done! https://pypi.org/project/rpi-backlight/2.3.0

Is there any modifications we can make to initiate the board type as either a Pi, Tinker 1 or 2, and not have to initiate it in both CLI and also init files?

I suppose if there's a reliable way to detect the board type, we could have automatic detection if no board type is explicitly provided - perhaps by checking the existence of each path in _BACKLIGHT_SYSFS_PATHS?

I was thinking of using /proc/device-tree/model

root@Harbormaster:~# cat /proc/device-tree/model
ASUS Tinker Board 2 (Linux Opensource)

What is the output on the Pi?

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.

2 participants