aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display/menu.py
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* gcode: Remove "action_" commands from get_status() callsKevin O'Connor2020-08-201-8/+5
| | | | | | | | | | | | 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-201-10/+7
| | | | | | | | 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>
* 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-091-1088/+700
| | | | | | | | | | | | | | | 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>
* menu_keys: Move button handling from menu.py to new file menu_keys.pyKevin O'Connor2020-06-151-155/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-1/+1
| | | | | | | | 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>
* menu: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Disable support for "deck" and "card" menu itemsKevin O'Connor2020-03-081-2/+2
| | | | | | | | Disable support for customizing the main lcd display content via the menu system. Advise users to use the new display_data config sections as a replacement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: Remove MCU_ADC_buttons debug capabilityKevin O'Connor2019-11-071-6/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Remove customized get_status overridesKevin O'Connor2019-06-041-17/+0
| | | | | | | | Now that the extruder, display, heater_fan, output_pin, and servo classes have get_status() methods, it is no longer necessary to override them in the menu code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: initial support for analog buttons (#977)Janar Sööt2019-04-141-10/+80
| | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* gcode: Change respond_info() to log by defaultKevin O'Connor2019-03-041-3/+2
| | | | | | | It makes sense to log most respond_info() content, so do that by default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Don't peek into printer.objects member variableKevin O'Connor2019-01-081-7/+5
| | | | | | | Use the printer.lookup_objects() method to get the list of available printer objects. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Convert printer_state("ready") to an event handlerKevin O'Connor2019-01-081-15/+15
| | | | | | | 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: allow empty command gcode if action is presentJanar Sööt2019-01-071-1/+3
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: enhancementsJanar Sööt2019-01-071-26/+111
| | | | | | | | | | - 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>
* menu: allow names in card content and simplify define single card decksJanar Sööt2019-01-071-3/+41
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: support for click button long pressJanar Sööt2019-01-071-28/+49
| | | | | | | - long press with timer (button release is not needed anymore) - initial support for edit mode long press gcode Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* display: Add a get_dimensions() method to lcd chip classesKevin O'Connor2018-11-211-5/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: vsdcard - scroll long filenames (#694)Janar Sööt2018-09-251-1/+4
| | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* configfile: Move config file code from klippy.py to new fileKevin O'Connor2018-09-251-6/+3
| | | | | | | Add a klippy/configfile.py file with the code needed to read the main printer config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: new fast step rate featureJanar Sööt2018-09-211-19/+35
| | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: Queue g-code commands to avoid command reorderingKevin O'Connor2018-09-021-11/+21
| | | | | | | | The gcode.run_script() code can pause which can result in the menu code being called reentrant - avoid that by queuing the gcode commands within the menu code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display menu module for klipperJanar Sööt2018-08-201-0/+1437
Signed-off-by: Janar Sööt <janar.soot@gmail.com>