docs: Add display g-code commands to docs/G-Codes.md

Add M117 and M73 to the list of supported G-Codes.

Also, remove M117 from the list of commands reported by the HELP
command as that command is typically only used to list "extended
g-code" commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-08 10:12:23 -04:00
parent 649d7c54f0
commit b4f03e8363
2 changed files with 8 additions and 2 deletions

View File

@ -48,6 +48,13 @@ Klipper also supports the following standard G-Code commands if the
- Set SD position: `M26 S<offset>` - Set SD position: `M26 S<offset>`
- Report SD print status: `M27` - Report SD print status: `M27`
## G-Code display commands
The following standard G-Code commands are available if a "display"
config section is enabled:
- Display Message: `M117 <message>`
- Set build percentage: `M73 P<percent>`
# Extended G-Code Commands # Extended G-Code Commands
Klipper uses "extended" G-Code commands for general configuration and Klipper uses "extended" G-Code commands for general configuration and

View File

@ -41,7 +41,7 @@ class PrinterLCD:
self.msg_time = None self.msg_time = None
self.message = None self.message = None
self.gcode.register_command('M73', self.cmd_M73) self.gcode.register_command('M73', self.cmd_M73)
self.gcode.register_command('M117', self.cmd_M117, desc=self.cmd_M117_help) self.gcode.register_command('M117', self.cmd_M117)
# Load glyphs # Load glyphs
self.load_glyph(self.BED1_GLYPH, icons.heat1_icon) self.load_glyph(self.BED1_GLYPH, icons.heat1_icon)
self.load_glyph(self.BED2_GLYPH, icons.heat2_icon) self.load_glyph(self.BED2_GLYPH, icons.heat2_icon)
@ -253,7 +253,6 @@ class PrinterLCD:
def cmd_M73(self, params): def cmd_M73(self, params):
self.progress = self.gcode.get_int('P', params, minval=0, maxval=100) self.progress = self.gcode.get_int('P', params, minval=0, maxval=100)
self.prg_time = M73_TIMEOUT self.prg_time = M73_TIMEOUT
cmd_M117_help = "Show Message on Display"
def cmd_M117(self, params): def cmd_M117(self, params):
if '#original' in params: if '#original' in params:
msg = params['#original'] msg = params['#original']