aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
Commit message (Collapse)AuthorAgeFilesLines
* adc_temperature: Calculate PT1000 temperature/resistance pairs from formulaKevin O'Connor2020-08-221-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_move: Move GCodeMove class from gcode.py to new extras moduleKevin O'Connor2020-08-208-5/+287
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Split G0/G1 command handling to new gcode_move classKevin O'Connor2020-08-2010-36/+42
| | | | | | | | 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() last_xpos to use a namedtupleKevin O'Connor2020-08-201-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove unneeded base_xpos variables from get_status()Kevin O'Connor2020-08-201-4/+6
| | | | | | Convert the only user of base_zpos to use gcode_position. 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-205-23/+35
| | | | | | | | | | | | 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>
* toolhead: Add a manual_move() helper functionKevin O'Connor2020-08-204-55/+25
| | | | | | | | Add a helper function for submitting relative movements. This function will also automatically ensure gcode.reset_last_position() is called. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* skew_correction: Make sure to call reset_last_position() on a skew updateKevin O'Connor2020-08-201-7/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Automatically call reset_last_position() on a toolhead set_position()Kevin O'Connor2020-08-205-6/+0
| | | | | | | | Generate a "toolhead:set_position" event on a call to toolhead.set_position() and use that event to automatically call gcode.reset_last_position(). 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>
* hall_filament_width_sensor: Fix Flow update before next pending_position ↵alocin732020-08-191-7/+14
| | | | | | | | | #3184 (#3198) After reading the first item of self.filament_array, filament_width is updated back to self.nominal_filament_dia or self.diameter instead of retaining the value until next pending_position. Updated Filament Menu Template. Signed-off-by: Nicola Falciani <nicola.fal@gmail.com>
* 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>
* webhooks: Remove "method" parameter from webhook requestsKevin O'Connor2020-08-162-21/+12
| | | | | | | Don't require or use the "method" parameter of requests. This simplifies the interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Remove register_static_path()Kevin O'Connor2020-08-161-3/+0
| | | | | | | | Use the "info" webhook to pass critical process information back to the caller. The remaining users of register_static_path() can get the required information via get_status() calls. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* hall_filament_width_sensor: fix errorJanar Sööt2020-08-131-0/+1
| | | | | | Fix no attribute error in in get_status Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* virtual_sdcard: register sd static pathArksine2020-08-111-0/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* adc_temperature: add support for AD597 (#3164)Bryan Boettcher2020-08-091-0/+9
| | | | | | The AD597 thermocouple amplifier is used in the Raise3D N2+ (and possibly others). Signed-off-by: Bryan Boettcher <bryan.boettcher@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>
* tmc5160: diag0 support (#3159)Trevor Jones2020-08-094-10/+16
| | | | | Allow for diag0 only hardware to use sensorless homing. Signed-off-by: Trevor Jones <trevorjones141@gmail.com>
* gcode_arcs: increment absolute e coord for each arc segment (#3162)Toby Harper2020-08-071-0/+2
| | | | | | | Arc travel was working but extrusion in absolute mode seemed not to be happening at all. This was because the E coord being sent with each G1 segment of the arc was not incrementing, effectively the same value was being sent over and over so the total extrusion for the whole arc was the amount for just one segment which is an extremely tiny amount. My change increments e_base by e_per_move for each subsequent coord when in absolute extrude mode which results in the correct absolute E value being sent for each segment. Signed-off-by: Toby Harper <toby@fuith.org>
* fan_generic: Add support for named fans and gcode to control them (#3054)bondus2020-08-071-0/+28
| | | Signed-off-by: Pontus Borg <liquidpontus@yahoo.se>
* print_stats: Add virtual_sdcard state trackingArksine2020-08-052-8/+23
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* print_stats: stat tracking for virtual sdcard prints in progressArksine2020-08-052-0/+73
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* virtual_sdcard: update get_status methodArksine2020-08-051-2/+4
| | | | | | Do not reset progress to zero while paused. Report 'is_active' and 'file_position'. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* virtual_sdcard: add SDCARD_PRINT_FILE gcodeArksine2020-08-051-16/+45
| | | | | | | SDCARD_PRINT_FILE allows Klipper to load and start the print for any gcode file within the virtual_sdcard path, including subdirectories. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* virtual_sdcard: add SDCARD_RESET_FILE gcodeArksine2020-08-051-0/+16
| | | | | | This allows the user to close a currently loaded file and reset the virtual_sdcard's state. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* safe_z_home: Make sure X and Y are homed before homing Z (#3153)Florian Heilmann2020-08-051-3/+12
| | | | | In it's current behavior, safe_z_home will attempt to home Z if it thinks the toolhead is above the z endstop even if the motors have since been disabled and the toolhead was moved to another position Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* temperature_sensor: report min/max measured temp via get_statusArksine2020-08-011-1/+10
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* filament_switch_sensor: report "enabled" state via get_statusArksine2020-08-011-1/+3
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* gcode: Report the final print_time in debuginput modeKevin O'Connor2020-07-301-2/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_mesh: Move profile management to its own classArksine2020-07-251-136/+149
| | | | | | This streamlines the BedMeshCalibrate class, making it only resposible for configuring and executing the calibration procedure. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: track the probed_matrix and mesh_params exclusively in the ZMesh ↵Arksine2020-07-251-42/+51
| | | | | | | | class Rather than have multiple classes keep a reference to these items, keep them in the z_mesh. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: differentiate between "mesh_config" and "mesh_params"Arksine2020-07-251-15/+15
| | | | | | This fixes an issue where a new profile is not properly saved after a restart. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: round x and y positions received via the finalize callbackArksine2020-07-251-0/+2
| | | | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com> Update bed_mesh.py
* bed_mesh: add get_status() methodArksine2020-07-251-3/+33
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* servo: Set initial value via mcu_servo.setup_start_value()Kevin O'Connor2020-07-251-30/+21
| | | | | | | | Using the setup_start_value() method avoids the PWM output line transitioning to an intermediate state prior to setting the initial value. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* servo: Remove servo ENABLE parameterKevin O'Connor2020-07-251-16/+6
| | | | | | | Allow one to disable servos via `SET_SERVO WIDTH=0` instead of using an explicit ENABLE parameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lm75: Added support for LM75/LM75A I2C connected temperature sensors (#3101)combolek2020-07-192-1/+108
| | | Signed-off-by: Boleslaw Ciesielski <combolek@users.noreply.github.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>
* thermistor: Add in definition for "SliceEngineering 450" thermistorKevin O'Connor2020-07-111-0/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Separate out the part cooling fan code from the generic fan codeKevin O'Connor2020-07-054-38/+46
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* input_shaper: Initial support of input shaping (#3032)Dmitry Butyugin2020-07-051-0/+132
| | | | | | Input shaping can help to reduce printer vibrations due to resonances and eliminate or reduce ghosting in prints. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* stepper: Make sure to reload trapq in set_stepper_kinematics()Kevin O'Connor2020-06-301-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pause_resume: Add CANCEL_PRINT gcodeArksine2020-06-241-0/+26
| | | | | | Register API endpoints for "pause_resume/pause", "pause_resume/resume" and "pause_resume/cancel". Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* query_endstops: register "query_endstops/status" endpointArksine2020-06-241-0/+15
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>