aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display/display.py
Commit message (Collapse)AuthorAgeFilesLines
* display: Allow redrawing the screen up to 10 times per secondKevin O'Connor2020-08-241-3/+8
| | | | | | | | 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>
* gcode: Remove "action_" commands from get_status() callsKevin O'Connor2020-08-201-3/+2
| | | | | | | | | | | | 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>
* display: Support requesting a screen redraw on a menu key pressKevin O'Connor2020-08-201-2/+16
| | | | | | | | 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>
* menu: Replace menu with new Jinja2 template system (#2344)Janar Sööt2020-08-091-1/+1
| | | | | | | | | | | | | | | 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>
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-151-1/+1
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Rework write_graphics() to take one character cell at a timeKevin O'Connor2020-06-111-16/+7
| | | | | | | 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>
* display: Default DISPLAY=display in SET_DISPLAY_GROUP commandKevin O'Connor2020-06-091-3/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: add SET_DISPLAY_GROUP command (#2969)Florian Heilmann2020-06-091-0/+11
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* display: Make hd44780 glyphs configurableKevin O'Connor2020-06-091-12/+21
| | | | | | | Allow the 20x4 hd44780 screen glyphs to be customizable from the config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Use '.' and '*' in display_glyph descriptionKevin O'Connor2020-06-081-10/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move glyph definition to printer configFlorian Heilmann2020-06-081-12/+22
| | | | | | | | 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>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-3/+3
| | | | | | | | 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>
* display: Remove unused self.lcd_type variableKevin O'Connor2020-03-211-3/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: add support for multiple displaysArksine2020-03-081-4/+9
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* display: Replace hard-coded display with new config based displayKevin O'Connor2020-03-081-166/+153
| | | | | | | | | | 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>
* display_status: Separate out M73 and M117 handling to new moduleKevin O'Connor2020-03-081-75/+19
| | | | | | | Move M73 and M117 handling from display.py to a new display_status.py module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Revert "display: Add ST7567 display support (#1540)"Kevin O'Connor2019-12-181-2/+1
| | | | | | | | | This reverts commit 1b92af60784ea811a7ca04dfbce75224874cf84a. 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>
* uc1701: add config option for sh1106 type with up to 132 columns.Matt Baker2019-11-261-1/+1
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* extruder: Consistently use "extruder" for the primary extruderKevin O'Connor2019-11-071-6/+6
| | | | | | | | 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>
* display: add get_status methodJanar Sööt2019-06-041-0/+5
| | | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Add ST7567 display support (#1540)Dmitry2019-04-151-1/+2
| | | Signed-off-by: Dmitry Budaev <condemil@gmail.com>
* gcode: Raise a config error on invalid register_command()Kevin O'Connor2019-02-181-4/+5
| | | | | | | 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>
* klippy: Convert printer_state("ready") to an event handlerKevin O'Connor2019-01-081-19/+19
| | | | | | | 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>
* menu: enhancementsJanar Sööt2019-01-071-0/+3
| | | | | | | | | | - 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>
* display: Fix handling of M117 command if lowercase 'm' is usedKevin O'Connor2019-01-021-2/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* uc1701: Add support for SSD1306 displaysKevin O'Connor2018-11-211-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Check for M117 inside of draw_status()Kevin O'Connor2018-10-181-22/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Don't error if M73 is missing a P parameterKevin O'Connor2018-10-011-1/+2
| | | | | | Try to avoid raising an error on an M73 command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Don't error on an out of range M73 requestKevin O'Connor2018-09-251-1/+1
| | | | | | | 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>
* display: Use write_glyph() when writing special charactersKevin O'Connor2018-09-211-13/+20
| | | | | | | Always use the write_glyph() method when writing special characters during status screen updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Support writing single character glyphs using write_glyph()Kevin O'Connor2018-09-211-2/+2
| | | | | | | | 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>
* display: Move icon drawing from display.py to lcd_chip codeKevin O'Connor2018-09-211-34/+10
| | | | | | | 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>
* icons: Add the bed to the bed heating animationsKevin O'Connor2018-09-211-4/+8
| | | | | | | | 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>
* display menu module for klipperJanar Sööt2018-08-201-0/+8
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* docs: Add display g-code commands to docs/G-Codes.mdKevin O'Connor2018-07-081-2/+1
| | | | | | | | | | 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>
* display: fix for 128 x 64 pixel displaysArksine2018-06-281-5/+3
| | | | | | Right justify fan speed and feed rate, keep progress centered. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* build: Cleanup whitespace errorsKevin O'Connor2018-06-281-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: add UC1701 graphics controller supportArksine2018-06-271-17/+23
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* display: Move icons to their own moduleKevin O'Connor2018-06-271-152/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move st7920 code to its own moduleKevin O'Connor2018-06-271-128/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move hd44780 code to its own moduleKevin O'Connor2018-06-271-169/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move klippy/extras/display.py to klippy/extras/display/display.pyKevin O'Connor2018-06-271-0/+704
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>