Merge pull request #580 from Lord-Grey/master

Allow to switch on LED device, if currently disabled
This commit is contained in:
Paulchen Panther 2019-08-11 19:02:22 +02:00 committed by GitHub
commit af2646ea48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 9 deletions

View File

@ -20,7 +20,7 @@ make_release()
make -j $(nproc) || exit 1
#strip bin/*
make package -j $(nproc)
mv Hyperion-*.* ../deploy/${RELEASE}
mv Hyperion.NG-* ../deploy/${RELEASE}
cd ..
bin/create_release.sh . ${RELEASE}
}

View File

@ -9,22 +9,22 @@ repodir="$1"
buildid="$2"
builddir=$repodir/build-$buildid
echo build directory = $builddir
echo repository root dirrectory = $repodir
echo repository root directory = $repodir
if ! [ -d "$builddir" ]; then
echo "Could not find build director"
exit 1
fi
outfile="$repodir/deploy/hyperion_$buildid.tar.gz"
outfile="$repodir/deploy/hyperion.ng_$buildid.tar.gz"
echo create $outfile
tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-read\
--file "$outfile" \
--transform "s:$builddir/bin/:hyperion/bin/:" \
--transform "s:$repodir/config/:hyperion/config/:" \
--transform "s:$repodir/bin/service/hyperion.init.sh:hyperion/services/hyperion.init.sh:" \
--transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/services/hyperion.systemd.sh:" \
--transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/services/hyperion.initctl.sh:" \
--transform "s:$repodir/bin/service/hyperion.init:hyperion/services/hyperion.init:" \
--transform "s:$repodir/bin/service/hyperion.systemd:hyperion/services/hyperion.systemd:" \
--transform "s:$repodir/bin/service/hyperion.initctl:hyperion/services/hyperion.initctl:" \
--transform "s://:/:g" \
"$builddir/bin/hyperion"* \
"$repodir/bin/service/hyperion.init" \

View File

@ -45,12 +45,22 @@ void LedDevice::setEnable(bool enable)
{
// emit signal when state changed
if (_enabled != enable)
{
emit enableStateChanged(enable);
// set black to leds when they should go off
}
// switch off device when disabled, default: set black to leds when they should go off
if ( _enabled && !enable)
{
switchOff();
}
else
{
// switch on device when enabled
if ( !_enabled && enable)
{
switchOn();
}
}
_enabled = enable;
}