Merge ~lorn-potter/snappy-hwe-snaps/+git/sensehat-snap:leds into ~snappy-hwe-team/snappy-hwe-snaps/+git/sensehat:master

Proposed by Lorn Potter
Status: Merged
Approved by: Jim Hodapp
Approved revision: 3a51421a967d3f4642322e73b4f82b2ac2091831
Merged at revision: 3a51421a967d3f4642322e73b4f82b2ac2091831
Proposed branch: ~lorn-potter/snappy-hwe-snaps/+git/sensehat-snap:leds
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/sensehat:master
Diff against target: 75 lines (+26/-2)
3 files modified
README (+8/-0)
report.sh (+8/-0)
snapcraft.yaml (+10/-2)
Reviewer Review Type Date Requested Status
Jim Hodapp (community) code Approve
Review via email: mp+302965@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jim Hodapp (jhodapp) wrote :

See comments inline. Over all looks good though.

review: Needs Fixing
Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README b/README
2index 0c35eeb..012cffc 100644
3--- a/README
4+++ b/README
5@@ -27,3 +27,11 @@ https://github.com/lpotter/sensors-examples.git
6
7 to see sensor data, run the report.sh script, such as:
8 sudo /snap/bin/sensehat.report compass
9+
10+To run the compass demo, first run
11+sensehat.RTIMULibCal
12+and calibrate the magnetometer and accelerometer.
13+Then you can run sensehat.report example
14+
15+Hold the rpi with the power adapter side pointing down.
16+
17diff --git a/report.sh b/report.sh
18index 268f2a8..75d41c4 100755
19--- a/report.sh
20+++ b/report.sh
21@@ -25,6 +25,10 @@ export QT_PLUGIN_PATH=$SNAP/usr/lib/$ARCH/qt5/plugins
22 export XDG_CONFIG_DIRS=$SNAP/etc/xdg
23 export SENSEHAT_CONFIG_DIR=$SNAP_USER_DATA
24
25+if [ ! -e "$HOME/RTIMULib.ini" ]
26+then
27+ cp $SNAP/etc/RTIMULib.ini $HOME/RTIMULib.ini
28+fi
29
30 while [[ $# -gt 0 ]]
31 do
32@@ -62,6 +66,10 @@ case $app in
33 echo "pressure"
34 exec "$SNAP/usr/bin/show_pressure"
35 ;;
36+ -e | example)
37+ echo "example"
38+ exec "$SNAP/usr/bin/sensehat-compass"
39+ ;;
40 --default)
41 ;;
42 *)
43diff --git a/snapcraft.yaml b/snapcraft.yaml
44index eaa1064..cde3ea5 100644
45--- a/snapcraft.yaml
46+++ b/snapcraft.yaml
47@@ -7,14 +7,15 @@ description: |
48 Source is available at:
49 https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/sensehat
50
51-
52 apps:
53 RTIMULibDrive11:
54 command: bin/RTIMULibDrive11
55 RTIMULibCal:
56- command: bin/RTIMULibCal
57+ command: bin/RTIMULibCal $HOME/snap/sensehat/current/RTIMULib
58 report:
59 command: bin/report.sh
60+ sensehat-compass:
61+ command: usr/bin/sensehat-compass
62
63 parts:
64 rtimulib:
65@@ -44,3 +45,10 @@ parts:
66 plugin: qmake
67 qt-version: qt5
68 source: https://github.com/lpotter/sensors-examples.git
69+ sensehat-compass:
70+ plugin: qmake
71+ qt-version: qt5
72+ source: https://github.com/lpotter/sensehat-compass.git
73+ stage-packages:
74+ - libpng12-0
75+ - libfreetype6

Subscribers

People subscribed via source and target branches

to all changes: