This repository has been archived by the owner on Jan 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from foglamp/1.5.0RC
1.5.0 Release
- Loading branch information
Showing
9 changed files
with
507 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,8 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
# vi | ||
*.swp | ||
|
||
# C extensions | ||
*.so | ||
# IDE | ||
*.idea | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
# Package Build | ||
packages/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
foglamp-south-sensehat | ||
======================== | ||
|
||
South Plugin for Raspberry PI Sense HAT | ||
|
||
This directory contains a plugin that pulls readings from Sensor HAT. | ||
The Sense HAT features an 8x8 RGB LED matrix, a mini joystick and the following sensors: | ||
|
||
- Gyroscope | ||
- Accelerometer | ||
- Magnetometer | ||
- Temperature | ||
- Humidity | ||
- Barometric pressure | ||
|
||
The polling is done at fixed intervals which is configurable via "pollInterval" configuration item. | ||
|
||
All sensors can be enabled/disabled separately vide setting suitable configuration parameters. All sensors can also be named as desired vide setting suitable configuration parameters. | ||
|
||
Installing the software: | ||
======================== | ||
|
||
It is always recommended using the most up-to-date version of Raspbian, and it often helps to start with a completely fresh install of Raspbian, although this isn't necessary. | ||
|
||
Please use below commands to get your Sense HAT set up. | ||
|
||
:: | ||
|
||
sudo apt-get install sense-hat | ||
|
||
Once that's done, it's probably a good idea to reboot your Pi to let the changes propagate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
foglamp_south_sensehat_version=1.5.0 | ||
foglamp_version>=1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
#!/bin/bash | ||
|
||
##-------------------------------------------------------------------- | ||
## Copyright (c) 2018 Dianomic Systems | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
##-------------------------------------------------------------------- | ||
## | ||
## Author: Ashish Jabble | ||
## | ||
|
||
|
||
set -e | ||
|
||
GIT_ROOT=`pwd` # The script must be executed from the root git directory | ||
|
||
usage="$(basename "$0") [clean|cleanall] | ||
This script is used to create the Debian package of FogLAMP | ||
Arguments: | ||
clean - Remove all the old versions saved in format .XXXX | ||
cleanall - Remove all the versions, including the last one" | ||
|
||
for i in "$@" | ||
do | ||
case "$i" in | ||
clean) | ||
echo -n "Cleaning the build folder from older versions..." | ||
find "${GIT_ROOT}/packages/build" -maxdepth 1 | grep '.*\.[0-9][0-9][0-9][0-9]' | xargs rm -rf | ||
echo "Done." | ||
exit 0 | ||
;; | ||
cleanall) | ||
if [ -d "${GIT_ROOT}/packages/build" ]; then | ||
echo -n "Cleaning the build folder..." | ||
rm -rf ${GIT_ROOT}/packages/build/* | ||
echo "Done." | ||
else | ||
echo "No build folder, skipping cleanall" | ||
fi | ||
exit 0 | ||
;; | ||
*) | ||
echo "${usage}" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ "$(dpkg --print-architecture)" != "armhf" ]; then | ||
echo "Package building is only supported on armhf architecture!!" | ||
exit 0 | ||
fi | ||
|
||
architecture="armhf" | ||
version=`cat ${GIT_ROOT}/VERSION.south.sensehat | tr -d ' ' | grep 'foglamp_south_sensehat_version=' | head -1 | sed -e 's/\(.*\)=\(.*\)/\2/g'` | ||
foglamp_version=`cat ${GIT_ROOT}/VERSION.south.sensehat | tr -d ' ' | grep 'foglamp_version' | head -1 | sed -e 's/\(.*\)version\(.*\)/\2/g'` | ||
BUILD_ROOT="${GIT_ROOT}/packages/build" | ||
|
||
# Final package name | ||
package_name="foglamp-south-sensehat-${version}-${architecture}" | ||
|
||
# Print the summary of findings | ||
echo "The package root directory is : ${GIT_ROOT}" | ||
echo "The FogLAMP version is : ${version}" | ||
echo "The package will be built in : ${BUILD_ROOT}" | ||
echo "The architecture is set as : ${architecture}" | ||
echo "The package name is : ${package_name}" | ||
echo | ||
|
||
# Create the package directory. If a directory with the same name exists, | ||
# it is copied with a version number. | ||
|
||
# First, create the BUILD_ROOT folder, if necessary | ||
if [ ! -L "${BUILD_ROOT}" -a ! -d "${BUILD_ROOT}" ]; then | ||
mkdir -p "${BUILD_ROOT}" | ||
fi | ||
|
||
cd "${BUILD_ROOT}" | ||
existing_pkgs=`find . -maxdepth 1 -name "${package_name}.????" | wc -l` | ||
existing_pkgs=$((existing_pkgs+1)) | ||
new_stored_pkg=$(printf "${package_name}.%04d" "${existing_pkgs}") | ||
if [ -d "${package_name}" ]; then | ||
echo "Saving the old working environment as ${new_stored_pkg}" | ||
mv "${package_name}" "${new_stored_pkg}" | ||
fi | ||
mkdir "${package_name}" | ||
|
||
# Populate the package directory with Debian files | ||
# First with files common to all pla | ||
echo -n "Populating the package and updating version file..." | ||
cd "${package_name}" | ||
cp -R ${GIT_ROOT}/packages/Debian/${architecture}/* . | ||
sed -i "s/Version: 0.0/Version: ${version}/g" DEBIAN/control | ||
sed -i "s/Depends: foglamp/Depends: foglamp (${foglamp_version})/g" DEBIAN/control | ||
|
||
mkdir -p usr/local/foglamp | ||
cd usr/local/foglamp | ||
cp -R ${GIT_ROOT}/python . | ||
cp -R ${GIT_ROOT}/VERSION.south.sensehat . | ||
echo "Done." | ||
|
||
# Build the package | ||
cd "${BUILD_ROOT}" | ||
|
||
# Save the old versions | ||
existing_pkgs=`find . -maxdepth 1 -name "${package_name}.deb.????" | wc -l` | ||
existing_pkgs=$((existing_pkgs+1)) | ||
new_stored_pkg=$(printf "${package_name}.deb.%04d" "${existing_pkgs}") | ||
|
||
if [ -e "${package_name}.deb" ]; then | ||
echo "Saving the old package as ${new_stored_pkg}" | ||
mv "${package_name}.deb" "${new_stored_pkg}" | ||
fi | ||
|
||
echo "Building the new package..." | ||
dpkg-deb --build ${package_name} | ||
echo "Building Complete." | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Package: foglamp-south-sensehat | ||
Version: 0.0 | ||
Section: devel | ||
Priority: optional | ||
Architecture: armhf | ||
Depends: foglamp,sense-hat | ||
Conflicts: | ||
Maintainer: Dianomic Systems, Inc. <[email protected]> | ||
Homepage: http://www.dianomic.com | ||
Description: South plugin for the Sense HAT board on a Raspberry PI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
##-------------------------------------------------------------------- | ||
## Copyright (c) 2018 Dianomic Systems | ||
## | ||
## Licensed under the Apache License, Version 2.0 (the "License"); | ||
## you may not use this file except in compliance with the License. | ||
## You may obtain a copy of the License at | ||
## | ||
## http://www.apache.org/licenses/LICENSE-2.0 | ||
## | ||
## Unless required by applicable law or agreed to in writing, software | ||
## distributed under the License is distributed on an "AS IS" BASIS, | ||
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
## See the License for the specific language governing permissions and | ||
## limitations under the License. | ||
##-------------------------------------------------------------------- | ||
|
||
##-------------------------------------------------------------------- | ||
## | ||
## @postinst DEBIAN/postinst | ||
## This script is used to execute post installation tasks. | ||
## | ||
## Author: Ashish Jabble | ||
## | ||
##-------------------------------------------------------------------- | ||
|
||
set -e | ||
|
||
set_files_ownership () { | ||
chown -R root:root /usr/local/foglamp/python/foglamp/plugins/south/sensehat | ||
} | ||
|
||
set_files_ownership | ||
echo "Sense HAT plugin is installed." |
Empty file.
Oops, something went wrong.