mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge pull request #580 from Lord-Grey/master
Allow to switch on LED device, if currently disabled
This commit is contained in:
commit
af2646ea48
@ -20,7 +20,7 @@ make_release()
|
|||||||
make -j $(nproc) || exit 1
|
make -j $(nproc) || exit 1
|
||||||
#strip bin/*
|
#strip bin/*
|
||||||
make package -j $(nproc)
|
make package -j $(nproc)
|
||||||
mv Hyperion-*.* ../deploy/${RELEASE}
|
mv Hyperion.NG-* ../deploy/${RELEASE}
|
||||||
cd ..
|
cd ..
|
||||||
bin/create_release.sh . ${RELEASE}
|
bin/create_release.sh . ${RELEASE}
|
||||||
}
|
}
|
||||||
|
@ -9,22 +9,22 @@ repodir="$1"
|
|||||||
buildid="$2"
|
buildid="$2"
|
||||||
builddir=$repodir/build-$buildid
|
builddir=$repodir/build-$buildid
|
||||||
echo build directory = $builddir
|
echo build directory = $builddir
|
||||||
echo repository root dirrectory = $repodir
|
echo repository root directory = $repodir
|
||||||
if ! [ -d "$builddir" ]; then
|
if ! [ -d "$builddir" ]; then
|
||||||
echo "Could not find build director"
|
echo "Could not find build director"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
outfile="$repodir/deploy/hyperion_$buildid.tar.gz"
|
outfile="$repodir/deploy/hyperion.ng_$buildid.tar.gz"
|
||||||
echo create $outfile
|
echo create $outfile
|
||||||
|
|
||||||
tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-read\
|
tar --create --gzip --absolute-names --show-transformed-names --ignore-failed-read\
|
||||||
--file "$outfile" \
|
--file "$outfile" \
|
||||||
--transform "s:$builddir/bin/:hyperion/bin/:" \
|
--transform "s:$builddir/bin/:hyperion/bin/:" \
|
||||||
--transform "s:$repodir/config/:hyperion/config/:" \
|
--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.init:hyperion/services/hyperion.init:" \
|
||||||
--transform "s:$repodir/bin/service/hyperion.systemd.sh:hyperion/services/hyperion.systemd.sh:" \
|
--transform "s:$repodir/bin/service/hyperion.systemd:hyperion/services/hyperion.systemd:" \
|
||||||
--transform "s:$repodir/bin/service/hyperion.initctl.sh:hyperion/services/hyperion.initctl.sh:" \
|
--transform "s:$repodir/bin/service/hyperion.initctl:hyperion/services/hyperion.initctl:" \
|
||||||
--transform "s://:/:g" \
|
--transform "s://:/:g" \
|
||||||
"$builddir/bin/hyperion"* \
|
"$builddir/bin/hyperion"* \
|
||||||
"$repodir/bin/service/hyperion.init" \
|
"$repodir/bin/service/hyperion.init" \
|
||||||
|
@ -45,12 +45,22 @@ void LedDevice::setEnable(bool enable)
|
|||||||
{
|
{
|
||||||
// emit signal when state changed
|
// emit signal when state changed
|
||||||
if (_enabled != enable)
|
if (_enabled != enable)
|
||||||
|
{
|
||||||
emit enableStateChanged(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)
|
if ( _enabled && !enable)
|
||||||
|
{
|
||||||
switchOff();
|
switchOff();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// switch on device when enabled
|
||||||
|
if ( !_enabled && enable)
|
||||||
|
{
|
||||||
|
switchOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
_enabled = enable;
|
_enabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user