-
Notifications
You must be signed in to change notification settings - Fork 3
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
Supporting the PinePhone's hardware and also supporting hardware for other devices. #33
Comments
Comment posted on the above-linked discussionOriginally posted by DrewNaylor July 6, 2021 |
Comment posted on the above-linked discussionOriginally posted by DrewNaylor August 12, 2021 |
Comment posted on the above-linked discussionOriginally posted by DrewNaylor August 12, 2021 |
Actually, perhaps I could develop my own library by using various documentation from Megi, since there's a lot of good stuff there. I can also use ofonocli from Martijn Braam to get modem info for apps in UIs that use it as well as mmcli for ModemManager (this'll eventually be the default for Plasma Mobile, so I should probably focus on it). Here's a page on ofonocli commands: https://sr.ht/~martijnbraam/ofonoctl/ A bit more research on this shows that Decided to run |
Even if I do write my own library (which I will, since I can fine-tune it to what I need while avoiding licensing issues), I'll still have to ensure people can install libraries to support other devices. Perhaps a "dummy library" that acts as a bridge interface would work, so that other libraries can just be connected to and provide data back and forth using that bridge. (Not sure how that would be implemented to switch libraries at runtime, though). If I don't do that, then more work will have to be done, resulting in duplicated code. I may have to have general hardware sensors and stuff separate from code that interacts with |
As I mentioned above regarding plugins, I'm going to have to have an easy way to support multiple devices. I thought of a name for the ones that only involve running different commands such as when toggling the flashlight: Generic Driver Configuration Architecture, or GDCA (it could also be named "Generic Driver Engine for Retiled (Configuration Architecture)", or "GDER(CA)", with the "CA" possibly being added when describing the file format for the "Generic Driver Engine for Retiled", which would be the software and libraries themselves that read the configuration files). I probably described the idea for these somewhere, but they're just INI config files that specify what command should be run when something wants to for example do Not sure if I described this anywhere yet, but I think the file tree can be for example, As likely mentioned before, we need to also offer a way for the user to pick their configuration file directly in case we decide incorrectly, such as on a modified device that hasn't called themselves something different from something we support yet, or if a device is close enough to something else to mostly work, like with OnePlus and the other company I forgot (but I don't know how similar the devices are from those two companies, so changes may be necessary). |
Adding to this, rotation axis can be determined via sysfs iio, and what the PinePhone uses is described on the page for it on the postmarketOS Wiki under Components, Sensors: https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone) Not sure if it's possible or even a good idea to constantly read it, so maybe polling every 60-300 ms will be necessary. This number is subject to change, and it would be a good idea to allow it to be customized by the user in an advanced settings page somewhere. Rotation Lock will turn off polling for rotation, and apps need to have a way to say that they don't want to rotate, or that they want to stay in a specific orientation. Not sure how to handle apps that want to get rotation info with Rotation Lock off. Edit: This page has degree values for when a rotation occurs, that being at 60 degrees when going from portrait to landscape left or right or back to portrait (depending on the tilt direction), and 30 degrees up when flat on a table in landscape left or right going to portrait. Also, the status bar goes from 32 pixels in portrait to 72 in landscape. Finally, physical horizontal keyboards would rotate the display horizontally for that keyboard, so there needs to be support to automatically do that, for example with the F(x)tec Pro1 and the Astro Slide; the PinePhone Keyboard Case is always open when using the phone's touch screen, so that wouldn't work. Source and screenshots for archival: https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh202911(v=vs.105) |
Qt has window orientation flags apparently, where they're defined here (this is my copy of the repo) : https://github.com/drewnaylor/qtwayland/blob/dev/src/extensions/surface-extension.xml Learned about that file from this issue: libsdl-org/SDL#1826 Obviously, Also in that file are window flags, such as |
(This will be edited to be more concise; just copying over things for now.)
(note Oct. 3, 2023: I'm relicensing to the GPL, so I'll just use the idea with the Generic Driver thing I have to support multiple devices)
Discussed in #16
Originally posted by DrewNaylor June 3, 2021
I really don't want to do this because I don't like the GPL as it's so restrictive and is involved with the same organization as RMS, but there's this .NET 5 library for getting PinePhone hardware stuff that would be really useful and it's GPLv2 licensed: https://github.com/Alumniminium/PinePhoneCore
As a result of changing this to the GPLv2 (would prefer v3+ as it allows Apache Licensed stuff, but the license isn't v2+ as far as I can tell), I'd have to change some of my other projects I'm planning on using to use the Expat License (some call it the "MIT License", but that's inaccurate).
Just trying to see if there's any feedback about this.
The text was updated successfully, but these errors were encountered: