diff --git a/octoprint_enclosure/old_stuff/templates/enclosure_settings.jinja2 b/octoprint_enclosure/old_stuff/templates/enclosure_settings.jinja2 index 7ec0d7a..02341b1 100644 --- a/octoprint_enclosure/old_stuff/templates/enclosure_settings.jinja2 +++ b/octoprint_enclosure/old_stuff/templates/enclosure_settings.jinja2 @@ -92,22 +92,22 @@ --> - - - - +
+ +
+ - + GPIO number that will be controlled. + /ko + ko if: ($data.output_type() == "neopixel_indirect") + + Attention Neopixel requires a microcontroller (ex: arduino) + connected to I2C bus. This is the pin on the + microcontroller that is connected to the Neopixel. + - - - - - - - - - +
+
@@ -152,7 +152,7 @@ - + - + @@ -184,7 +184,7 @@ - + - + - + - + @@ -457,14 +457,14 @@ --> - +
diff --git a/octoprint_enclosure/static/js/enclosure.js b/octoprint_enclosure/static/js/enclosure.js index d34d400..df9580c 100644 --- a/octoprint_enclosure/static/js/enclosure.js +++ b/octoprint_enclosure/static/js/enclosure.js @@ -4,7 +4,7 @@ $(function () { return { index_id: index_id, label: "", - output_type: "Regular", + output_type: "regular", gpio: { pin_name: "" } @@ -15,10 +15,63 @@ $(function () { var self = this; self.isNew = ko.observable(false); + // general info self.index_id = ko.observable(); self.label = ko.observable(); self.output_type = ko.observable(); + // gpio output self.gpio_pin = ko.observable(); + self.active_low = ko.observable(); + // gcode output + self.gcode = ko.observable(); + // neopixel output + self.neopixel_count = ko.observable(); + self.neopixel_brightness = ko.observable(); + self.default_neopixel_color = ko.observable(); + // other output configurations + self.hide_btn_ui = ko.observable(); + self.show_on_navbar = ko.observable(); + // pwm output + self.pwm_temperature_linked = ko.observable(); + self.duty_a = ko.observable(); + self.temperature_a = ko.observable(); + self.duty_b = ko.observable(); + self.temperature_b = ko.observable(); + self.pwm_frequency = ko.observable(); + self.default_duty_cycle = ko.observable(); + // led strip output + self.led_trip_gpio_clk = ko.observable() + self.led_strip_gpio_data = ko.observable() + self.default_led_strip_color = ko.observable() + // schedule config + self.toggle_timer = ko.observable() + self.toggle_timer_on = ko.observable() + self.toggle_timer_off = ko.observable() + self.startup_with_server = ko.observable() + self.auto_startup = ko.observable() + self.startup_time_delay = ko.observable() + self.auto_shutdown = ko.observable() + self.shutdown_on_failed = ko.observable() + self.shutdown_time_delay = ko.observable() + // shell script output + self.shell_script = ko.observable() + // temp alarm output + self.alarm_linked_temp_sensor = ko.observable() + self.alarm_set_temp = ko.observable() + self.controlled_io = ko.observable() + self.controlled_io_set_value = ko.observable() + // temp control output + self.temp_ctr_linked_sensor = ko.observable() + self.temp_ctr_type = ko.observable() + self.temp_ctr_type = ko.observable() + self.temp_ctr_type = ko.observable() + self.temp_ctr_default_value = ko.observable() + self.temp_ctr_deadband = ko.observable() + self.temp_ctr_max_temp = ko.observable() + + + + self.enclosureOutputs = undefined; self.fromOutputData = function (data) { diff --git a/octoprint_enclosure/templates/output_editor/gcode_output.jinja2 b/octoprint_enclosure/templates/output_editor/gcode_output.jinja2 index e4852a9..0363a5d 100644 --- a/octoprint_enclosure/templates/output_editor/gcode_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/gcode_output.jinja2 @@ -3,7 +3,7 @@
- + GCODE that will be sent to the printer. You should add ENTER on the end of every line sent to the printer
diff --git a/octoprint_enclosure/templates/output_editor/io_output.jinja2 b/octoprint_enclosure/templates/output_editor/io_output.jinja2 index 1fa4a78..1f8a3d0 100644 --- a/octoprint_enclosure/templates/output_editor/io_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/io_output.jinja2 @@ -11,7 +11,7 @@
Active low means that the GPIO will turn on when receive a low signal (ground) from Raspberry PI
diff --git a/octoprint_enclosure/templates/output_editor/rgb_strip_output.jinja2 b/octoprint_enclosure/templates/output_editor/led_strip_output.jinja2 similarity index 85% rename from octoprint_enclosure/templates/output_editor/rgb_strip_output.jinja2 rename to octoprint_enclosure/templates/output_editor/led_strip_output.jinja2 index 8049f62..30735eb 100644 --- a/octoprint_enclosure/templates/output_editor/rgb_strip_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/led_strip_output.jinja2 @@ -3,19 +3,19 @@
- + Choose any GPIO pin to provide the Clock signal
- + Choose any GPIO pin to provide the Data
- + Value needs to follow the format rgb(value_red,value_green,value_blue) where values should be between 0 and 255
diff --git a/octoprint_enclosure/templates/output_editor/main_screen.jinja2 b/octoprint_enclosure/templates/output_editor/main_screen.jinja2 index a42746f..12864a3 100644 --- a/octoprint_enclosure/templates/output_editor/main_screen.jinja2 +++ b/octoprint_enclosure/templates/output_editor/main_screen.jinja2 @@ -9,10 +9,42 @@
@@ -24,6 +56,41 @@ {% include "output_editor/io_output.jinja2" %}
+
+ {% include "output_editor/gcode_output.jinja2" %} +
+ +
+ {% include "output_editor/led_strip_output.jinja2" %} +
+ +
+ {% include "output_editor/neopixel_output.jinja2" %} +
+ +
+ {% include "output_editor/pwm_output.jinja2" %} +
+ +
+ {% include "output_editor/temp_control_output.jinja2" %} +
+ +
+ {% include "output_editor/temp_alarm_output.jinja2" %} +
+ +
+ {% include "output_editor/shell_script_output.jinja2" %} +
+ +
+ {% include "output_editor/shell_script_output.jinja2" %} +
+ +
+ {% include "output_editor/shell_script_output.jinja2" %} +
diff --git a/octoprint_enclosure/templates/output_editor/neopixel_output.jinja2 b/octoprint_enclosure/templates/output_editor/neopixel_output.jinja2 index 05e6187..4c9f0e9 100644 --- a/octoprint_enclosure/templates/output_editor/neopixel_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/neopixel_output.jinja2 @@ -3,21 +3,21 @@
- + Number of led's on strip
- + Value between 0 and 255
- + Value needs to follow the format rgb(value_red,value_green,value_blue) where values should be between 0 and 255
diff --git a/octoprint_enclosure/templates/output_editor/other_config.jinja2 b/octoprint_enclosure/templates/output_editor/other_config.jinja2 index 2bcefb1..2ae3bf9 100644 --- a/octoprint_enclosure/templates/output_editor/other_config.jinja2 +++ b/octoprint_enclosure/templates/output_editor/other_config.jinja2 @@ -3,7 +3,7 @@
If you plan to use a physical button (INPUT) and want to hide the button from enclosure tab check this.
@@ -12,7 +12,7 @@
Add shortcut on navbar to toggle output
diff --git a/octoprint_enclosure/templates/output_editor/pwm_output.jinja2 b/octoprint_enclosure/templates/output_editor/pwm_output.jinja2 index aa1731e..df6547f 100644 --- a/octoprint_enclosure/templates/output_editor/pwm_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/pwm_output.jinja2 @@ -2,7 +2,7 @@
Link PWM ouput to temperature. PWM output will be interpolated between the point from duty A, temperature A -> duty B, temperature B. This output will automatically start when a print starts and will default to the default @@ -13,25 +13,25 @@
- +
- +
- +
- +
@@ -39,14 +39,14 @@
- + Value is in Hz
- + Value is in percentage, between 0 and 100
diff --git a/octoprint_enclosure/templates/output_editor/schedule_config.jinja2 b/octoprint_enclosure/templates/output_editor/schedule_config.jinja2 index 683171a..317b4a6 100644 --- a/octoprint_enclosure/templates/output_editor/schedule_config.jinja2 +++ b/octoprint_enclosure/templates/output_editor/schedule_config.jinja2 @@ -1,9 +1,9 @@
- +
Toggle output every amount of seconds. It will start when the print starts and stop when print is complete. For @@ -11,26 +11,31 @@
- +
- + Time in seconds that the GPIO will remain ON
- + Time in seconds that the GPIO will remain when OFF
+ + + + +
Choose if output should turn on automatically when OctoPrint starts
@@ -38,49 +43,58 @@
Choose if output should turn on automatically when print starts
- -
+ + +
- + Time delay in seconds to turn on GPIO when print starts
- -
-
- - Choose if output should turn off automatically when print finishes -
-
- -
-
- - Choose if output should turn off automatically when print is canceled or fails -
-
- -
+ + +
-
- - Time delay in seconds to turn on GPIO when print finishes. - Attention + + Choose if output should turn off automatically when print finishes
-
+ + + +
+
+ + Choose if output should turn off automatically when print is canceled or fails +
+
+ +
+
+ +
+ + Time delay in seconds to turn on GPIO when print finishes. + Attention +
+
+
+ + + \ No newline at end of file diff --git a/octoprint_enclosure/templates/output_editor/shell_script_output.jinja2 b/octoprint_enclosure/templates/output_editor/shell_script_output.jinja2 index baf2a4e..b570789 100644 --- a/octoprint_enclosure/templates/output_editor/shell_script_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/shell_script_output.jinja2 @@ -3,7 +3,7 @@
- + Shell script to be executed
diff --git a/octoprint_enclosure/templates/output_editor/temp_alarm_output.jinja2 b/octoprint_enclosure/templates/output_editor/temp_alarm_output.jinja2 index 987a201..cd841e0 100644 --- a/octoprint_enclosure/templates/output_editor/temp_alarm_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/temp_alarm_output.jinja2 @@ -1,10 +1,20 @@
+
+ +
+ + Temperature sensor responsible for getting the value to be used. Configured on the input side of the plugin. +
+
+
- + Set temperature that will trigger the event
@@ -12,7 +22,7 @@
When the event happen, you want control which IO?
@@ -20,7 +30,7 @@
- diff --git a/octoprint_enclosure/templates/output_editor/temp_sensor_output.jinja2 b/octoprint_enclosure/templates/output_editor/temp_control_output.jinja2 similarity index 70% rename from octoprint_enclosure/templates/output_editor/temp_sensor_output.jinja2 rename to octoprint_enclosure/templates/output_editor/temp_control_output.jinja2 index f83de96..c9d8646 100644 --- a/octoprint_enclosure/templates/output_editor/temp_sensor_output.jinja2 +++ b/octoprint_enclosure/templates/output_editor/temp_control_output.jinja2 @@ -1,20 +1,11 @@ -
- -
- - Temperature sensor responsible for geting the value to be used. Configured on the input side of the plugin. -
-
Temperature sensor responsible for getting the value to be used. Configured on the input side of the plugin.
@@ -24,22 +15,22 @@
+ {{ _('Heater') }}
+ {{ _('Cooler') }}
+ {{ _('Dehumidifier') }}
- + Default temperature / humidity that temperature control will be set when the print starts or the server starts.
@@ -47,7 +38,7 @@
- + Allowable drift on temperature / humidity control. Set it to zero to disable.
@@ -55,7 +46,7 @@
- + Maximum temperature that the enclosure should reach, if this temperature is hit, the heater will be disabled until it's set temperature is set again.