Bladeren bron

Change: registerIr.py SW2->SW1

satoshi yoneda 6 jaren geleden
bovenliggende
commit
e691a00e90
2 gewijzigde bestanden met toevoegingen van 16 en 4 verwijderingen
  1. 15 3
      tree/usr/local/bin/registerIr.py
  2. 1 1
      tree/usr/local/bin/superdac.py

+ 15 - 3
tree/usr/local/bin/registerIr.py

@@ -76,7 +76,16 @@ STR_ERR = ['タイムアウト',\
            'リモコンの信号が',\
            '受信できません',\
           ]
-
+          
+STR_END = ['登録完了です',\
+           '自動的に再起動',\
+           'します。',\
+           '再起動後リモコン',\
+           'が使えるかテスト',\
+           'してください。'\
+           'SW1でいつでも',\
+           '再登録できます',\
+          ]
 
 LCD = None
 
@@ -139,8 +148,8 @@ if __name__ == "__main__":
 
 	# switch
 	GPIO.setmode(GPIO.BCM)
-	GPIO.setup(SW2, GPIO.IN, pull_up_down=GPIO.PUD_UP)
-	sw = GPIO.input(SW2)
+	GPIO.setup(SW1, GPIO.IN, pull_up_down=GPIO.PUD_UP)
+	sw = GPIO.input(SW1)
 	GPIO.cleanup()
 	if sw != GPIO.LOW:
 		sys.exit(0)
@@ -193,5 +202,8 @@ if __name__ == "__main__":
 				f.write('\n')
 		print('    end raw_codes'              , file=f)
 		print('end remote'                     , file=f)
+	LCD.clear()
+	LCD.message(STR_END)
+	time.sleep(30)
 	os.system('/sbin/reboot')
 	sys.exit(0)

+ 1 - 1
tree/usr/local/bin/superdac.py

@@ -89,7 +89,7 @@ LIRCRC = ['/etc/lirc/superdac.lircrc', '/usr/local/etc/superdac.lircrc', './supe
 VOLUME_FILE='/var/tmp/.superdac.volume'
 
 # Openning Logo Image
-LOGO_FILE = '/home/settings/scripts/logo.jpg'
+LOGO_FILE = '/home/mpd/scripts/logo.jpg'
 
 class SDTimer(threading.Thread):