From 6b62213b3c0d5300a4c796f524d4a668d0656256 Mon Sep 17 00:00:00 2001 From: brbjr1 Date: Mon, 4 Dec 2017 18:18:42 -0600 Subject: [PATCH] t8 --- octoprint_enclosure/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/octoprint_enclosure/__init__.py b/octoprint_enclosure/__init__.py index 96a666e..270130e 100644 --- a/octoprint_enclosure/__init__.py +++ b/octoprint_enclosure/__init__.py @@ -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 + '}'