Used wrong variable name for reset pin.

This commit is contained in:
jpmeijers 2017-03-09 17:58:16 +01:00
parent 3ce5344647
commit d665de8269

2
run.py
View File

@ -269,7 +269,7 @@ while True:
if (os.environ.get("GW_RESET_PIN")!=None): if (os.environ.get("GW_RESET_PIN")!=None):
try: try:
pin_number = int(os.environ.get("GW_RESET_PIN")) pin_number = int(os.environ.get("GW_RESET_PIN"))
print ("[TTN Gateway]: Resetting concentrator on pin "+os.environ.get("GW_RESET")) print ("[TTN Gateway]: Resetting concentrator on pin "+str(os.environ.get("GW_RESET_PIN")))
GPIO.setup(pin_number, GPIO.OUT, initial=GPIO.LOW) GPIO.setup(pin_number, GPIO.OUT, initial=GPIO.LOW)
GPIO.output(pin_number, 0) GPIO.output(pin_number, 0)
time.sleep(0.1) time.sleep(0.1)