E-Steps is working

This commit is contained in:
sergiuToporjinschi
2022-01-30 20:07:23 +02:00
parent e2a0710442
commit f045c5d1dd
8 changed files with 67 additions and 37 deletions
+3 -1
View File
@@ -34,8 +34,9 @@ class API(octoprint.plugin.SimpleApiPlugin):
)
def on_api_command(self, command, data):
self._logger.debug("api command [%s] received", command)
self._logger.debug("api command [%s] received payload [%s]", command, data)
if command == CMD_LOAD_STEPS:
self._logger.debug("Load steps from EEPROM")
if not self._printer.is_ready():
self._logger.warning("Printer not ready, operation canceled")
return flask.abort(503, {
@@ -64,6 +65,7 @@ class API(octoprint.plugin.SimpleApiPlugin):
return
if command == CMD_SAVE_E_STEPS:
self._printer.commands(["M92 E%(newESteps)s" % data, "M500"])
return
if command == CMD_TEST: