Commit Graph

46 Commits

Author SHA1 Message Date
le-Bark 317402d5ba
hd44780_spi: added lcd support to the mightyboard (#4121)
Signed-off-by: Marc-André Denis <marcadenis@msn.com>
2021-04-07 21:07:23 -04:00
teeminus bc2096f543
st7920: Better support for emulated ST7920 displays (#3979)
Added new ST7920E display driver which is better suited for displays with emulated ST7920

Signed-off-by: Christian Kehe <teeminus@posteo.net>
2021-03-01 18:23:06 -05:00
Janar Sööt 5a7fbe671e
menu: redesigned name scroller & menu rendering (#3837)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2021-02-20 11:31:03 -05:00
Kevin O'Connor cd23c95760 display: Remove circular references from intermediate context object
Explicilty clear the local context object so that it does not require
a gc sweep to free it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-09-16 23:53:45 -04:00
Kevin O'Connor ff6e879349 display: Allow redrawing the screen up to 10 times per second
Increase the maximum redraw rate from 4 times per second to 10 times
per second.  Some users have reported slower rendering times as a
result of 8fa1c977.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-24 19:02:30 -04:00
Kevin O'Connor b2c78d71b0 gcode: Remove "action_" commands from get_status() calls
Rename printer.gcode.action_emergency_stop() to
action_emergency_stop(), printer.gcode.action_respond_info() to
action_respond_info(), and printer.gcode.action_respond_error() to
action_raise_error() in command templates.

This simplifies the get_status() interface, as returning callable
functions from that interface was confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 21:03:22 -04:00
Kevin O'Connor 8fa1c97767 display: Support requesting a screen redraw on a menu key press
Add a request_redraw() method and call it when a key menu event
occurs.  Limit these proactive screen redraws to no more than 4 per
second.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-20 09:04:56 -04:00
Janar Sööt d991b4c83b
menu: Replace menu with new Jinja2 template system (#2344)
menu.cfg:
- jinja2 template scripting
- new Setup menu
- new Calibration menu
menu:
- redesigned menu code
- jinja2 support
- option to reverse menu up and down directions
- functionality set to support menu injection from other modules
- a new way of defining menu hierarchy
- other adjustments

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2020-08-09 09:29:55 -04:00
Kevin O'Connor f931da1b87 extras: Use "from . import module" for relative imports
Use alternate import syntax to improve Python3 compatibility.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor 9465618adb display: Rework write_graphics() to take one character cell at a time
Change write_graphics() from taking one pixel row of n characters to
taking all the rows and columns for one character cell.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-11 00:18:23 -04:00
Kevin O'Connor 467e8e6f40 display: Default DISPLAY=display in SET_DISPLAY_GROUP command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 12:19:53 -04:00
Florian Heilmann 68fcbe2a62
display: add SET_DISPLAY_GROUP command (#2969)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-06-09 12:07:25 -04:00
Kevin O'Connor 7713986ae1 display: Make hd44780 glyphs configurable
Allow the 20x4 hd44780 screen glyphs to be customizable from the
config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-09 08:09:59 -04:00
Kevin O'Connor 1a7e4e51b3 display: Use '.' and '*' in display_glyph description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-08 21:40:42 -04:00
Florian Heilmann 3dcac1308e display: Move glyph definition to printer config
This commit allows to modify the icons (or glyphs) in the displays that
support it. Existing icons can be modified and new icons can be added via
a [display_glyph] section in the config.

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2020-06-08 16:40:45 -04:00
Kevin O'Connor 787ed452c2 klippy: Rename try_load_module() to load_object()
Rename try_load_module() so that it uses consistent naming for
"printer objects".  Change the function to raise an error by default
if the specified module does not exist.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-08 11:05:14 -04:00
Kevin O'Connor d3a7d992aa display: Remove unused self.lcd_type variable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-21 12:12:29 -04:00
Arksine aa7d24b0af display: add support for multiple displays
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-03-08 17:38:24 -04:00
Kevin O'Connor 2cf03ffa23 display: Replace hard-coded display with new config based display
Introduce a new config based system for specifying the on-screen
contents of an lcd screen.  The default screen configuration (found in
klippy/extras/display/display.cfg) is the same as the previous
hard-coded display, so this should not change behavior for existing
users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:21 -04:00
Kevin O'Connor 5acc181624 display_status: Separate out M73 and M117 handling to new module
Move M73 and M117 handling from display.py to a new display_status.py
module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:36:14 -04:00
Kevin O'Connor 0a86190bae display: Revert "display: Add ST7567 display support (#1540)"
This reverts commit 1b92af6078.

The standard "uc1701" lcd_type can now be used in place of the custom
"st7567" lcd_type.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-18 12:30:20 -05:00
Matt Baker 8d93d1a8ef uc1701: add config option for sh1106 type with up to 132 columns.
Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
2019-11-26 19:40:39 -05:00
Kevin O'Connor ed610a6600 extruder: Consistently use "extruder" for the primary extruder
No longer allow the primary extruder to be named "extruder0".  This
avoids internal and external confusion between the printer objects and
config section names.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-07 16:28:47 -05:00
Janar Sööt df765b33dc display: add get_status method
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-04 11:51:46 -04:00
Dmitry 1b92af6078 display: Add ST7567 display support (#1540)
Signed-off-by: Dmitry Budaev <condemil@gmail.com>
2019-04-15 21:07:29 -04:00
Kevin O'Connor b260eb9168 gcode: Raise a config error on invalid register_command()
Raise a printer.config_error() on an invalid register_command() call.
This error is easier to handle for the vast majority of callers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-02-18 18:04:42 -05:00
Kevin O'Connor 797367b9f5 klippy: Convert printer_state("ready") to an event handler
Convert all users of the printer_state("ready") handler to register a
"klippy:ready" event handler instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-08 10:59:43 -05:00
Janar Sööt 0cbe851777 menu: enhancements
- changes that make easier to use menu as module UI
- new helper method for delayed callbacks
- method for getting the menu instance from display
- new action for sending menu:action events
- allow_without_selection option for cards

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2019-01-07 21:39:50 -05:00
Kevin O'Connor 68ebde0d86 display: Fix handling of M117 command if lowercase 'm' is used
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-01-02 17:34:56 -05:00
Kevin O'Connor e231ac7422 uc1701: Add support for SSD1306 displays
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-11-21 20:45:53 -05:00
Kevin O'Connor 29e0996858 display: Check for M117 inside of draw_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-18 20:43:43 -04:00
Kevin O'Connor 820dd0b5e3 display: Don't error if M73 is missing a P parameter
Try to avoid raising an error on an M73 command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 12:31:31 -04:00
Kevin O'Connor 170b9678fb display: Don't error on an out of range M73 request
No need to report an error if the M73 is not between 0 and 100 - just
display the nearest valid value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 20:51:51 -04:00
Kevin O'Connor 30a49d3186 display: Use write_glyph() when writing special characters
Always use the write_glyph() method when writing special characters
during status screen updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor c8d9d575a1 display: Support writing single character glyphs using write_glyph()
Add write_glyph() support to hd44780.py.  Update uc1701.py and
st7920.py to support writing single character glyphs via
write_glyph().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2a5778be3a display: Move icon drawing from display.py to lcd_chip code
Move the st7920 icon rendering optimizations from display.py to
st7920.py.  This simplifies the code for other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2857255ef1 icons: Add the bed to the bed heating animations
It isn't necessary to use the st7920's xor capabilities when drawing
the bed heating animations.  This makes it easier to use the icons for
other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Janar Sööt 65f0fd6238 display menu module for klipper
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-08-20 22:33:05 -04:00
Kevin O'Connor b4f03e8363 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>
2018-07-08 10:12:23 -04:00
Arksine 640169310f display: fix for 128 x 64 pixel displays
Right justify fan speed and feed rate, keep progress centered.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-06-28 13:11:44 -04:00
Kevin O'Connor efb27f095c build: Cleanup whitespace errors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-28 13:00:20 -04:00
Arksine 593b4d2656 display: add UC1701 graphics controller support
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-06-27 19:46:38 -04:00
Kevin O'Connor 483c51e864 display: Move icons to their own module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-27 13:18:03 -04:00
Kevin O'Connor e907253dba display: Move st7920 code to its own module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-27 13:18:03 -04:00
Kevin O'Connor f85b43a789 display: Move hd44780 code to its own module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-27 13:18:03 -04:00
Kevin O'Connor 373c7ff301 display: Move klippy/extras/display.py to klippy/extras/display/display.py
Move the display code into its own directory.  This is in preparation
for splitting it up into its own modules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-06-27 13:18:03 -04:00