This commit is contained in:
brbjr1
2017-12-04 18:55:05 -06:00
parent 7ab6d0a270
commit 0aff1d65ce

View File

@@ -101,7 +101,7 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin,
@octoprint.plugin.BlueprintPlugin.route("/getOutputStatus", methods=["GET"])
def getOutputStatus(self):
getOutputStatusresult = ''
getOutputStatusresult2 = {}
getOutputStatusresult2 = []
for rpi_output in self.rpi_outputs:
pin = self.toInt(rpi_output['gpioPin'])
if rpi_output['outputType']=='regular':
@@ -112,7 +112,7 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin,
getOutputStatusresult2[str(pin)] = str(val).lower()
#return flask.jsonify('{' + getOutputStatusresult + '}')
return flask.jsonify({count: len(getOutputStatusresult2), results: getOutputStatusresult2})
return flask.jsonify({results: getOutputStatusresult2})
@octoprint.plugin.BlueprintPlugin.route("/getEnclosureTemperature", methods=["GET"])
def getEnclosureTemperature(self):