This commit is contained in:
brbjr1
2017-12-04 17:42:30 -06:00
parent 295fdcb89f
commit 63152facd2

View File

@@ -105,8 +105,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))
getOutputStatusresult = getOutputStatusresult + str(pin) + ':' + str(val) + ','
return getOutputStatusresult
getOutputStatusresult = getOutputStatusresult + str(pin) + ':' + str(val) + ', '
getOutputStatusresultDict[str(pin)] = str(val)
return flask.jsonify(getOutputStatusresultDict)
@octoprint.plugin.BlueprintPlugin.route("/getTest", methods=["GET"])