Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support M218 'HOTENDS_OFFSETS' backup (Need Help) #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
"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"},
},
"switches": ["T"],
"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