Skip to content

Commit

Permalink
Merge pull request #8 from xunleii/142-invert-xy-axis
Browse files Browse the repository at this point in the history
Add X & Y invert axis options
  • Loading branch information
JeffB42 authored Sep 17, 2020
2 parents 688f7c3 + c680a4d commit 56eca75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions octoprint_zbolt_octoscreen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def get_update_information(self):


__plugin_name__ = "Z-Bolt OctoScreen"
__plugin_pythoncompat__ = ">=2.7,<4"

def __plugin_load__():
global __plugin_implementation__
Expand Down
4 changes: 4 additions & 0 deletions octoprint_zbolt_octoscreen/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def get_all(self):
"filament_out_length": float(self._settings.get(["filament_out_length"])),
"gcodes": self._settings.get(["gcodes"]),
"toolchanger": bool(self._settings.get(["toolchanger"])),
"x_axis_inverted": bool(self._settings.get(["x_axis_inverted"])),
"y_axis_inverted": bool(self._settings.get(["y_axis_inverted"])),
"z_axis_inverted": bool(self._settings.get(["z_axis_inverted"])),
"menu_structure": json.loads(self._settings.get(["menu_structure"])),
}
Expand All @@ -102,6 +104,8 @@ def default_settings():
filament_in_length=750,
filament_out_length=800,
toolchanger=False,
x_axis_inverted=False,
y_axis_inverted=False,
z_axis_inverted=True,
gcodes=dict(auto_bed_level="G29"),
menu_structure=default_menu_structure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@

<h4>{{ _('Other:') }}</h4>

<div class="control-group">
<label class="control-label">{{ _('Invert X axis buttons on move screen:') }}</label>
<div class="controls">
<input type="checkbox" data-bind="checked: settings.plugins.zbolt_octoscreen.x_axis_inverted" />
</div>
</div>

<div class="control-group">
<label class="control-label">{{ _('Invert Y axis buttons on move screen:') }}</label>
<div class="controls">
<input type="checkbox" data-bind="checked: settings.plugins.zbolt_octoscreen.y_axis_inverted" />
</div>
</div>

<div class="control-group">
<label class="control-label">{{ _('Invert Z axis buttons on move screen:') }}</label>
<div class="controls">
Expand Down

0 comments on commit 56eca75

Please sign in to comment.