gcode: Generate M115 output even if command not sent from gcode pseudo-terminal

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-04-28 21:07:48 -04:00
parent 25389027de
commit 0990a3da6f
1 changed files with 4 additions and 1 deletions

View File

@ -295,7 +295,10 @@ class GCodeDispatch:
# Get Firmware Version and Capabilities # Get Firmware Version and Capabilities
software_version = self.printer.get_start_args().get('software_version') software_version = self.printer.get_start_args().get('software_version')
kw = {"FIRMWARE_NAME": "Klipper", "FIRMWARE_VERSION": software_version} kw = {"FIRMWARE_NAME": "Klipper", "FIRMWARE_VERSION": software_version}
gcmd.ack(" ".join(["%s:%s" % (k, v) for k, v in kw.items()])) msg = " ".join(["%s:%s" % (k, v) for k, v in kw.items()])
did_ack = gcmd.ack(msg)
if not did_ack:
gcmd.respond_info(msg)
def request_restart(self, result): def request_restart(self, result):
if self.is_printer_ready: if self.is_printer_ready:
toolhead = self.printer.lookup_object('toolhead') toolhead = self.printer.lookup_object('toolhead')