mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-24 07:04:01 -06:00
gcode: Raise an error if a duplicate command is registered
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
2ab47cd20c
commit
33c2c8f1bd
3 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,7 @@ class VirtualSD:
|
|||
self.work_timer = None
|
||||
# Register commands
|
||||
self.gcode = printer.lookup_object('gcode')
|
||||
self.gcode.register_command('M21', None)
|
||||
for cmd in ['M20', 'M21', 'M23', 'M24', 'M25', 'M26', 'M27']:
|
||||
self.gcode.register_command(cmd, getattr(self, 'cmd_' + cmd))
|
||||
for cmd in ['M28', 'M29', 'M30']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue