Skip to content

Commit

Permalink
M218 support
Browse files Browse the repository at this point in the history
  • Loading branch information
studiodyne committed Jul 24, 2024
1 parent 2da5ed6 commit 0664e39
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions octoprint_eeprom_marlin/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@
"name": "Home Offset",
"link": "https://marlinfw.org/docs/gcode/M206.html",
},
"hotends_offset": {
"command": "M218",
"switches": ["T"],
"params": {
"X": {"type": "float2", "label": "X hotends offset", "units": "mm"},
"Y": {"type": "float2", "label": "Y hotends offset", "units": "mm"},
"Z": {"type": "float2", "label": "Z hotends offset", "units": "mm"},
},
"name": "Hotends Offset",
"link": "https://marlinfw.org/docs/gcode/M218.html",
},
"endstop": {
"command": "M666",
"params": {
Expand Down
2 changes: 2 additions & 0 deletions octoprint_eeprom_marlin/static/js/eeprom_marlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ $(function () {

eeprom.home_offset = create_eeprom_observables(["X", "Y", "Z"]);

eeprom.hotends_offset = create_eeprom_observables(["X", "Y", "Z"],["T"]);

eeprom.hotend_pid = create_eeprom_observables(["P", "I", "D"], ["E"]);

eeprom.hotend_mpc = create_eeprom_observables(
Expand Down
1 change: 1 addition & 0 deletions octoprint_eeprom_marlin/templates/sub/tab-content.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
</div>
<div id="eeprom_offset" class="tab-pane">
{{ section("Home Offset", "home_offset") }}
{{ section("Hotends Offset", "hotends_offset") }}
{{ section("Probe Offset", "probe_offset") }}
</div>
<div id="eeprom_pid" class="tab-pane">
Expand Down
2 changes: 1 addition & 1 deletion octoprint_eeprom_marlin/templates/sub/tab-sidebar.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<li data-bind="visible: eeprom.max_acceleration.visible() || eeprom.print_acceleration.visible()">
<a data-toggle="tab" href="#eeprom_acceleration">Acceleration</a>
</li>
<li data-bind="visible: eeprom.home_offset.visible() || eeprom.probe_offset.visible()">
<li data-bind="visible: eeprom.home_offset.visible() || eeprom.hotends_offset.visible() || eeprom.probe_offset.visible()">
<a data-toggle="tab" href="#eeprom_offset">Offsets</a>
</li>
<li data-bind="visible: eeprom.bed_pid.visible() || eeprom.hotend_pid.visible()">
Expand Down

0 comments on commit 0664e39

Please sign in to comment.