mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Merge pull request #580 from Lord-Grey/master
Allow to switch on LED device, if currently disabled
This commit is contained in:
		| @@ -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} | ||||
| } | ||||
|   | ||||
| @@ -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" \ | ||||
|   | ||||
| @@ -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; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user