aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display
Commit message (Collapse)AuthorAgeFilesLines
* menu: fix crash when opening SDCard menu while printingKamil Trzcinski2021-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This fixes the bug introduced by https://github.com/KevinOConnor/klipper/commit/f1091a484bfbf2cc5676e3a6fcd595172f123f67. The problem is that condition was returning string which could not be converted to boolean. We solve that by showing `Start Printing` when `is_active`. ``` ERROR:root:Unhandled exception during run Traceback (most recent call last): ... File "/opt/klipper/klippy/extras/display/menu.py", line 117, in eval_enable return bool(ast.literal_eval(self._enable_tpl.render(context))) File "/usr/lib/python2.7/ast.py", line 49, in literal_eval node_or_string = parse(node_or_string, mode='eval') File "/usr/lib/python2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) File "<unknown>", line 1 /opt/octoprint/uploads/wait_print.gcode ``` Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
* virtual_sdcard: add `file_path` and `file_size` to `status`Kamil Trzcinski2021-06-221-1/+1
| | | | | | | This provides a comprehensive information if currently we have a file loaded. Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
* menu: Fixed typo when reading `print_stats.state` (#4261)Dany Yanev2021-05-061-2/+2
| | | | | Fixed typo when reading `print_stats.state` causing some of the menus to now show up. Signed-off-by: Dany Yanev <yanev89@gmail.com>
* hd44780_spi: added lcd support to the mightyboard (#4121)le-Bark2021-04-072-1/+127
| | | Signed-off-by: Marc-André Denis <marcadenis@msn.com>
* menu: changes in tune menu according to #4023 (#4086)Janar Sööt2021-03-231-3/+3
| | | | | | - set 1% as input minimum for speed and flow - set speed maximum from 200% to 500% Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* st7920: Better support for emulated ST7920 displays (#3979)teeminus2021-03-012-44/+126
| | | | | Added new ST7920E display driver which is better suited for displays with emulated ST7920 Signed-off-by: Christian Kehe <teeminus@posteo.net>
* menu: Default menu should check extruders have heaters (#3969)Janar Sööt2021-02-201-2/+2
| | | | | | For the hotend targets check also available heaters. It'll solve crash when using shared heaters. Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: redesigned name scroller & menu rendering (#3837)Janar Sööt2021-02-202-93/+95
| | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* hd44780: Add hd44780 protocol init configThomas Kroll2021-01-311-1/+6
| | | | | | | LDO OLED needs a different init string. Fixes: #3722 Signed-off-by: Thomas Kroll <t.kroll@outlook.com>
* menu: Update menu.cfg sd_card menu enable condition (#3826)Chip2021-01-241-5/+35
| | | | | Change SD card enable condition and add Cancel printing option. Signed-off-by: John Smith <login721@gmail.com>
* menu: Update menu.cfg (#3778)Alex Zellner2021-01-171-21/+21
| | | | | Update min/max in move menu to printer variables. Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
* hd44780: Make the 4-bit init sequence more robustKevin O'Connor2020-12-121-1/+1
| | | | | | | | | | | | The previous init sequence relied on the display ignoring commands if they are sent faster than 40us. Some displays may not have this limit. Rework the init to make it more robust to command transmission times. The new init should still transition the display into 4-bit mode even if the display processes commands faster than 40us. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Add links to default display.cfg and menu.cfg in Config_Reference.mdKevin O'Connor2020-12-032-2/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: modifications (#3262)Janar Sööt2020-12-031-209/+161
| | | | | | | | | - remove lot of helper methods - differentiate class instantiate from config or directly - don't use 'enable' template rendering when static value is used. - new element 'disabled' - other internal adjustments Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* hd44780: allow to configure line length (#3543)Martin Hierholzer2020-11-201-8/+15
| | | | | This allows to use 16x4 displays rather than only 20x4. Signed-off-by: Martin Hierholzer <hier@beta-centauri.de>
* display: Remove circular references from intermediate context objectKevin O'Connor2020-09-161-0/+1
| | | | | | | 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>
* uc1701: Add x_offset (Used to add horizontal offset on SSD1306/SH1106 ↵rjpatawaran2020-09-091-4/+9
| | | | | displays) (#3284) Signed-off-by: RJ Patawaran <rjpatawaran@me.com>
* uc1701: Improve Python3 compatibilityKevin O'Connor2020-09-041-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* hd44780: Improve Python3 compatibilityKevin O'Connor2020-09-041-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: only render visible list itemsJanar Sööt2020-08-261-35/+34
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: fixing input gcode run issue on edit startJanar Sööt2020-08-261-0/+4
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* 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: Split G0/G1 command handling to new gcode_move classKevin O'Connor2020-08-202-15/+15
| | | | | | | | Split up the main GCodeParser class into GCodeDispatch and GCodeMove classes. The GCodeMove class is now available using the "gcode_move" printer object name. This split simplifies the gcode.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Convert get_status() homing_xpos to use a namedtupleKevin O'Connor2020-08-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove "action_" commands from get_status() callsKevin O'Connor2020-08-203-16/+13
| | | | | | | | | | | | 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>
* menu: reduce timeout timer period to 1sJanar Sööt2020-08-201-7/+2
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* display: Support requesting a screen redraw on a menu key pressKevin O'Connor2020-08-202-12/+23
| | | | | | | | 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: remove surplus self.running=FalseJanar Sööt2020-08-181-2/+0
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: optimize container populateJanar Sööt2020-08-181-13/+8
| | | | | | | | | - don't populate all items at once - populate items when container is pushed to stack - precreate List back item, don't create it during populate. - don't update items during populate Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* display: Remove reference to printer.gcode.busy from display.cfgKevin O'Connor2020-08-151-1/+1
| | | | | | The "busy" variable was removed and using it isn't necessary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: fix for overwriting existing menu item (#3189)Janar Sööt2020-08-141-1/+3
| | | | | | In case of an overwriting existing menu item, the new item was added additionally to the end of the items list. Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: Replace menu with new Jinja2 template system (#2344)Janar Sööt2020-08-093-1425/+1143
| | | | | | | | | | | | | | | 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>
* display: Add configuration options for OLED displays (#3084)Iakabos2020-07-191-3/+6
| | | | | Add user-configurable contrast, vcomh (affects "smearing"), and invert options for SSD1306/SH1106 type OLED displays. Signed-off-by: James Esau <james_esau@hotmail.com>
* menu_keys: Add a register_button() helper methodKevin O'Connor2020-06-151-128/+62
| | | | | | Use a helper method to register each button handler. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu_keys: Reschedule long-click timer on each clickKevin O'Connor2020-06-151-20/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu_keys: Move button handling from menu.py to new file menu_keys.pyKevin O'Connor2020-06-152-155/+196
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* uc1701: Update bus import to "from .. import bus"Kevin O'Connor2020-06-151-9/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-154-4/+5
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* uc1701: Optimize swizzle_bits() codeKevin O'Connor2020-06-121-7/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Rework write_graphics() to take one character cell at a timeKevin O'Connor2020-06-114-56/+46
| | | | | | | 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>
* uc1701: Fix for glyph rendering on uc1701 display (#2966)Florian Heilmann2020-06-091-2/+2
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* display: Use animated heated bed icons on default hd44780 displayKevin O'Connor2020-06-091-8/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Make hd44780 glyphs configurableKevin O'Connor2020-06-095-114/+170
| | | | | | | 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-082-122/+122
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Note changes to glyph namesKevin O'Connor2020-06-082-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move glyph definition to printer configFlorian Heilmann2020-06-086-173/+185
| | | | | | | | 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>
* display: Do not show time remaining in default 16x4 displayKevin O'Connor2020-06-041-13/+4
| | | | | | | The time remaining estimation is wildy inaccurate. Only show the time elapsed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-082-4/+4
| | | | | | | | 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>