display: Default DISPLAY=display in SET_DISPLAY_GROUP command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
68fcbe2a62
commit
467e8e6f40
|
@ -202,11 +202,12 @@ The following standard commands are supported:
|
||||||
adjustment will only be made every BAND millimeters of z height - in
|
adjustment will only be made every BAND millimeters of z height - in
|
||||||
that case the formula used is `value = start + factor *
|
that case the formula used is `value = start + factor *
|
||||||
((floor(z_height / band) + .5) * band)`.
|
((floor(z_height / band) + .5) * band)`.
|
||||||
- `SET_DISPLAY_GROUP DISPLAY=<display> GROUP=<group>`: Set the active
|
- `SET_DISPLAY_GROUP [DISPLAY=<display>] GROUP=<group>`: Set the
|
||||||
display group of the display. This allows to define multiple display
|
active display group of an lcd display. This allows to define
|
||||||
data groups in the config, e.g.`[display_data <group> <elementname>]`
|
multiple display data groups in the config,
|
||||||
and switch between them using this extended gcode command. use
|
e.g. `[display_data <group> <elementname>]` and switch between them
|
||||||
`DISPLAY=display` to change the display group of the default display.
|
using this extended gcode command. If DISPLAY is not specified it
|
||||||
|
defaults to "display" (the primary display).
|
||||||
- `SET_IDLE_TIMEOUT [TIMEOUT=<timeout>]`: Allows the user to set the
|
- `SET_IDLE_TIMEOUT [TIMEOUT=<timeout>]`: Allows the user to set the
|
||||||
idle timeout (in seconds).
|
idle timeout (in seconds).
|
||||||
- `RESTART`: This will cause the host software to reload its config
|
- `RESTART`: This will cause the host software to reload its config
|
||||||
|
|
|
@ -103,10 +103,14 @@ class PrinterLCD:
|
||||||
self.printer.register_event_handler("klippy:ready", self.handle_ready)
|
self.printer.register_event_handler("klippy:ready", self.handle_ready)
|
||||||
self.screen_update_timer = self.reactor.register_timer(
|
self.screen_update_timer = self.reactor.register_timer(
|
||||||
self.screen_update_event)
|
self.screen_update_event)
|
||||||
|
# Register g-code commands
|
||||||
gcode = self.printer.lookup_object("gcode")
|
gcode = self.printer.lookup_object("gcode")
|
||||||
gcode.register_mux_command(
|
gcode.register_mux_command('SET_DISPLAY_GROUP', 'DISPLAY', name,
|
||||||
'SET_DISPLAY_GROUP', 'DISPLAY', name, self.cmd_SET_DISPLAY_GROUP,
|
self.cmd_SET_DISPLAY_GROUP,
|
||||||
desc=self.cmd_SET_DISPLAY_GROUP_help)
|
desc=self.cmd_SET_DISPLAY_GROUP_help)
|
||||||
|
if name == 'display':
|
||||||
|
gcode.register_mux_command('SET_DISPLAY_GROUP', 'DISPLAY', None,
|
||||||
|
self.cmd_SET_DISPLAY_GROUP)
|
||||||
# Configurable display
|
# Configurable display
|
||||||
def _parse_glyph(self, config, glyph_name, data, width, height):
|
def _parse_glyph(self, config, glyph_name, data, width, height):
|
||||||
glyph_data = []
|
glyph_data = []
|
||||||
|
|
Loading…
Reference in New Issue