Skip to content

Commit

Permalink
fix simulation result reply
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed May 2, 2020
1 parent 024bab9 commit 7379691
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion DuetRRFOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,24 @@ def onStatusReceived(self):
if self._use_rrf_http_api:
self._send('rr_gcode',
query=[("gcode", gcode)],
next_stage=self.onReported,
next_stage=self.onM37Reported,
)
else:
self._send('machine/code',
data=gcode.encode(),
next_stage=self.onReported,
)
def onM37Reported(self):
if self._stage != OutputStage.writing:
return

Logger.log("d", self._name_id + " | M37 finished - let's get it's reply...")
reply_body = bytes(self._reply.readAll()).decode().strip()
Logger.log("d", self._name_id + " | M37 gcode reply | " + reply_body)

self._send('rr_reply',
next_stage=self.onReported,
)

def onReported(self):
if self._stage != OutputStage.writing:
Expand Down

0 comments on commit 7379691

Please sign in to comment.