- Settings split on heater index

-General impl of hookRegistered functions
-registerRegexMsg recevies a compiled regex
-single regex for all pid types of respond
This commit is contained in:
sergiuToporjinschi
2022-02-04 10:14:46 +02:00
parent c3f86acc7d
commit 8b6cc8c444
9 changed files with 168 additions and 61 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class API(octoprint.plugin.SimpleApiPlugin):
self._printer.extrude(amount=int(extrudeLength), speed=int(extrudeSpeed))
@staticmethod
def m92GCodeResponse(self, line, event):
def m92GCodeResponse(self, line, regex, event):
reg = re.compile("echo:\s*(?P<command>(?P<gCode>M\d{1,3}) X(?P<xVal>\d{1,3}.\d{1,3}) Y(?P<yVal>\d{1,3}.\d{1,3}) Z(?P<zVal>\d{1,3}.\d{1,3}) E(?P<eVal>\d{1,3}.\d{1,3}))")
isM92command = reg.match(line)
if isM92command: