This commit is contained in:
brbjr1
2017-12-04 18:18:42 -06:00
parent 651b49306b
commit 6b62213b3c

View File

@@ -106,9 +106,9 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin,
pin = self.toInt(rpi_output['gpioPin'])
if rpi_output['outputType']=='regular':
val = GPIO.input(pin) if not rpi_output['activeLow'] else (not GPIO.input(pin))
# if (getOutputStatusresult != '')
# getOutputStatusresult = getOutputStatusresult + ', '
getOutputStatusresult = getOutputStatusresult + '"' + str(pin) + '":"' + str(val) + '"'
if (len(getOutputStatusresult) > 0)
getOutputStatusresult = getOutputStatusresult + ', '
getOutputStatusresult = getOutputStatusresult + '"' + str(pin) + '":' + str(val)
return '{' + getOutputStatusresult + '}'