Skip to content
This repository has been archived by the owner. It is now read-only.

Package unicsy_demo (basic hardware demo) #643

Merged
merged 8 commits into from Sep 29, 2017

Conversation

@pavelmachek
Copy link
Member

@pavelmachek pavelmachek commented Sep 28, 2017

Create simple demo, that nevertheless demonstrates basic hardware functionality, including battery status, light sensor status, accelerometer status, LED control, control of backlight on keyboard and screen.

@ollieparanoid ollieparanoid changed the title Hacks2 Package unicsy_demo (basic hardware demo) Sep 28, 2017
Copy link
Member

@ollieparanoid ollieparanoid left a comment

Thanks for packaging this!

Follow up questions:

  • How about adding a /usr/bin/unicsy_demo program, that launches the demo?
  • What does unicsy stand for?
  • How N900 specific is this package?
pkgname=unicsy_demo
pkgver=0.2
pkgrel=0
pkgdesc="Demo of phone functionality"

This comment has been minimized.

@ollieparanoid

ollieparanoid Sep 28, 2017
Member

How about being a bit more specific about what it demonstrates? E.g.:
"Phone hardware demo (battery, light sensors, accelerometer, LEDs, backlight)"

@@ -0,0 +1,24 @@
pkgname=unicsy_demo

This comment has been minimized.

@ollieparanoid

ollieparanoid Sep 28, 2017
Member

From our package naming convention:

Please use dashes (-) only, no underscores (_).

pkgver=0.2
pkgrel=0
pkgdesc="Demo of phone functionality"
url="https://github.com/postmarketOS/osk-sdl"

This comment has been minimized.

@ollieparanoid

ollieparanoid Sep 28, 2017
Member

Please change the URL.


options="!strip"

build() {

This comment has been minimized.

@ollieparanoid

ollieparanoid Sep 28, 2017
Member

You can just remove the build() function if it does nothing :)

@pavelmachek
Copy link
Member Author

@pavelmachek pavelmachek commented Sep 28, 2017

@ollieparanoid
Copy link
Member

@ollieparanoid ollieparanoid commented Sep 28, 2017

Thanks for the explanation and the fixes! I'm afraid the code isn't pushed yet though, because it does not show up here.

@pavelmachek
Copy link
Member Author

@pavelmachek pavelmachek commented Sep 28, 2017

Copy link
Member

@ollieparanoid ollieparanoid left a comment

One small thing I've noticed. Also it might be good if someone tested this on a real device or in Qemu (I can't right now).

makedepends=""
subpackages=""

source="${pkgname}-${pkgver}-${pkgrel}.tar.gz::https://github.com/pavelmachek/unicsy_demo/archive/${pkgver}.tar.gz"

This comment has been minimized.

@ollieparanoid

ollieparanoid Sep 28, 2017
Member

Please remove the pkgrel from the source variable.
The pkgrel gets increased when something in the package gets changed, that is not related to the source, so the source should not get downloaded again.

@pavelmachek
Copy link
Member Author

@pavelmachek pavelmachek commented Sep 28, 2017

@drebrez
Copy link
Member

@drebrez drebrez commented Sep 29, 2017

@ollieparanoid @pavelmachek I would like to test it on my devices, but I noticed some hardcoded paths in the hardware.py file (battery, leds,backlight,...).
We should consider adding those paths in some variables in the deviceinfo file of the device.

@pavelmachek
Copy link
Member Author

@pavelmachek pavelmachek commented Sep 29, 2017

@pavelmachek
Copy link
Member Author

@pavelmachek pavelmachek commented Sep 29, 2017

@drebrez
Copy link
Member

@drebrez drebrez commented Sep 29, 2017

@pavelmachek I agree that we don't need all the paths in variables, it's better if the tool tries to find it by itself.
I will try it on the various device I have (https://wiki.postmarketos.org/wiki/The-big-list-of-who-has-what-device#drebrez) and try to identify the paths that are different for each device.

@ollieparanoid ollieparanoid merged commit ae1e527 into postmarketOS:master Sep 29, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ollieparanoid
Copy link
Member

@ollieparanoid ollieparanoid commented Sep 29, 2017

Autodetection where possible, and using the deviceinfo otherwise sounds good to me! I've merged this PR so we have an initial version, that works on the N900 and recommend that we discuss how to implement support for different devices in the program's own issue tracker:

https://github.com/pavelmachek/unicsy_demo/issues

Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.