Skip to content

Commit

Permalink
Added hidden flag to enable mesh after homing Z axis.
Browse files Browse the repository at this point in the history
  • Loading branch information
scmanjarrez committed Jul 5, 2024
1 parent c2d19a5 commit e24f9ad
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Default: disabled.
> You have to enable and configure <code>Trigger custom gcode(s)</code> and
> <code>ABL custom gcode(s)</code>. If you don't configure these two settings,
> SmartABL assumes marlin firmware by default (i.e. G29 read from file and
> G29 send to printer when ABL is needed)
> G29 sent to printer when ABL is needed)
<div align="center">
<img alt="Screenshot of SmartABL settings panel" src="plugins.octoprint.org/assets/img/plugins/SmartABL/settings.png" width="80%">
Expand Down
18 changes: 18 additions & 0 deletions octoprint_SmartABL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ def gcode_queuing(
return [None]
elif gcode == "G28":
self.cache = set()
# If prusa, we need to send the PRUSA MBL V1 hidden command to re-enable the mesh and be able to query it
# also, we convert G28 W to skip ABL now and decide later if ABL is required, sending M80
if self.firmware == "prusa":
orig = cmd
if cmd == "G28":
cmd = "G28 W"
self._smartabl_logger.debug(
f"@gcode_queuing:cache ([{cmd}, PRUSA MBL V1]) > "
f"Trigger(cmd={orig}, gcode={gcode}) || "
f"{self._dbg()}"
)
return [cmd, "PRUSA MBL V1"]
else:
self._smartabl_logger.debug(
f"@gcode_queuing:cache > "
f"Trigger(cmd={cmd}, gcode={gcode}) || "
f"{self._dbg()}"
)
elif (
gcode in self._gcodes_abl() or cmd in self._gcodes_abl()
) and "SMARTABLQUERY" not in self.cache:
Expand Down
8 changes: 4 additions & 4 deletions octoprint_SmartABL/templates/SmartABL_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<input type="checkbox" style="margin-top: 7px;" data-bind="checked: settings.plugins.SmartABL.force_days"/>
After
<div class="input-append">
<input class="input-mini text-right" type="number" data-bind="value: settings.plugins.SmartABL.days, enable: settings.plugins.SmartABL.force_days"/>
<input class="input-mini text-right" type="number" min="0" step="1" data-bind="value: settings.plugins.SmartABL.days, enable: settings.plugins.SmartABL.force_days"/>
<span class="add-on smartabl-addon">day(s)</span>
</div>
</label>
Expand All @@ -63,7 +63,7 @@
<input type="checkbox" style="margin-top: 7px;" data-bind="checked: settings.plugins.SmartABL.force_prints"/>
After
<div class="input-append">
<input class="input-mini text-right" type="number" data-bind="value: settings.plugins.SmartABL.prints, enable: settings.plugins.SmartABL.force_prints"/>
<input class="input-mini text-right" type="number" min="0" step="1" data-bind="value: settings.plugins.SmartABL.prints, enable: settings.plugins.SmartABL.force_prints"/>
<span class="add-on smartabl-addon">print(s)</span>
</div>
</label>
Expand Down Expand Up @@ -93,7 +93,7 @@
<div class="controls">
<label class="checkbox">
<input type="checkbox" style="margin-top: 3px;" data-bind="checked: settings.plugins.SmartABL.failed"/>
Take into account failed/stopped jobs in prints counter
Take into account failed/stopped jobs in <code>prints counter</code>
</label>
</div>

Expand All @@ -104,7 +104,7 @@
Enable SmartABL on unknown firmwares
<br>
<small>You have to enable and configure <code>Trigger custom gcode(s)</code> and <code>ABL custom gcode(s)</code>. If you don't configure these two settings,
SmartABL assumes marlin firmware by default (i.e. G29 read from file and G29 send to printer when ABL is needed)</small>
SmartABL assumes marlin firmware by default (i.e. G29 read from file and G29 sent to printer when ABL is needed)</small>
</label>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-SmartABL"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.2.2"
plugin_version = "1.3"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand All @@ -24,7 +24,7 @@
plugin_author = "scmanjarrez"

# The plugin's author's mail address.
plugin_author_email = "serchiman@gmail.com"
plugin_author_email = "serchiman+octoprint@gmail.com"

# The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module
plugin_url = "https://github.com/scmanjarrez/OctoPrint-SmartABL"
Expand Down

0 comments on commit e24f9ad

Please sign in to comment.