slitaz-arm rev 165

Add a clean command to pileds
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 04 06:00:37 2014 +0200 (2014-05-04)
parents 30194ae0cd16
children 0eb0f35e2f0d
files rpi/pileds
line diff
     1.1 --- a/rpi/pileds	Sun May 04 05:35:01 2014 +0200
     1.2 +++ b/rpi/pileds	Sun May 04 06:00:37 2014 +0200
     1.3 @@ -14,9 +14,12 @@
     1.4  $(boldify "Types:")
     1.5    act          Turn on/off the on board ACT green led
     1.6    7-clock      Adafruit 7-segment LED Backpack clock example
     1.7 -  #8x8          Adafruit 8x8 LED Matrix Backpack example
     1.8 -  
     1.9 +  ada-clean    Clean: Adafruit 7-segment or 8x8 Matrix
    1.10 +
    1.11 +$(boldify "Types:")    
    1.12 +
    1.13  EOT
    1.14 +#8x8          Adafruit 8x8 LED Matrix Backpack example
    1.15  }
    1.16  
    1.17  load_modules() {
    1.18 @@ -31,6 +34,10 @@
    1.19  	done
    1.20  }
    1.21  
    1.22 +adafruit_clean() {
    1.23 +	python /usr/lib/python2.7/Adafruit_LEDBackpack.py
    1.24 +}
    1.25 +
    1.26  case "$1" in
    1.27  
    1.28  	act) ;;
    1.29 @@ -41,7 +48,6 @@
    1.30  		check_packages "python-rpi-adafruit"
    1.31  		if [ -f "${scripts}/ex_7segment_clock.py" ]; then
    1.32  			python ${scripts}/ex_7segment_clock.py
    1.33 -			python /usr/lib/python2.7/Adafruit_LEDBackpack.py
    1.34  		else
    1.35  			echo "Missing: ${scripts}/ex_7segment_clock.py"
    1.36  		fi ;;
    1.37 @@ -51,6 +57,9 @@
    1.38  		#load_modules
    1.39  		#check_packages "python-rpi-adafruit"
    1.40  		echo "TODO: $scripts" ;;
    1.41 +		
    1.42 +	ada-clean)
    1.43 +		ada_clean ;;
    1.44  	
    1.45  	*) usage ;;
    1.46