aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* heater: Move M105 command handling from gcode.py to heater.pyKevin O'Connor2020-04-255-49/+59
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add an is_shutdown() methodKevin O'Connor2020-04-251-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_button: Simplify script executionKevin O'Connor2020-04-251-25/+9
| | | | | | | | | It's no longer necessary to queue gcode scripts - gcode.run_script() now does that automatically. Also, make release_gcode config optional. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Rename probe_prepare/finalize to probe_prepare/finishKevin O'Connor2020-04-252-3/+3
| | | | | | | | The probe_finalize() name is used for callbacks in both the PrinterProbe and ProbePointsHelper classes. Rename the PrinterProbe callback to avoid confusion. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename respond() to respond_raw()Kevin O'Connor2020-04-248-31/+31
| | | | | | | | | | | Rename the method to make it more clear that it is a low-level call that should be rarely used. Also, change gcode_button.py, hall_filament_width_sensor.py, and tsl1401cl_filament_width_sensor.py to use respond_info() instead of respond_raw(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Don't export respond_error()Kevin O'Connor2020-04-241-6/+6
| | | | | | | Don't export the respond_error() method as callers should raise a gcode.error() instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* virtual_sdcard: No need to call gcode.respond_error() on disk errorKevin O'Connor2020-04-241-2/+0
| | | | | | | Report low-level disk errors via the log and use the normal sdcard mechanism to report end of sdcard print to gcode users. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Raise a gcode.error() from G20 commandKevin O'Connor2020-04-241-1/+1
| | | | | | | It's important to raise an error (instead of calling respond_error() ) so that a G20 will stop a virtual_sdcard print. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* respond: Simplify M118 handlingKevin O'Connor2020-04-241-16/+13
| | | | | | | | No need to check for '#original' in params - it's always there. Properly handle a lower case m118 command. Don't register a help text for the legacy M118 g-code command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* z_tilt: Raise a gcode.error() instead of directly calling respond_error()Kevin O'Connor2020-04-242-11/+7
| | | | | | | Raising an error (instead of reporting an error) is important as only a raised error will stop a print from virtual_sdcard. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Disable E moves in absolute extrude modeKevin O'Connor2020-04-231-7/+4
| | | | | | | | Commit 402110f6 didn't actually fix absolute extrude mode. For now, report an error if an extrude move is requested in absolute extrude mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Minor cleanup of planArc()Kevin O'Connor2020-04-221-42/+27
| | | | | | | | Fix linear_travel optimization. Use "2*pi" instead of "radians(360)". Always emit at least one segment and always end at the final target coordinates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Fix Z moves and E movesKevin O'Connor2020-04-222-11/+18
| | | | | | | | Fix Z moves so that the movement is spaced out among the arc movements. Fix extrude moves when in absolute extrude mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: Simplify parameter parsingKevin O'Connor2020-04-221-84/+37
| | | | | | | | | | Use the normal gcode.get_float() mechanism for extracting parameters from the g-code command. Don't register descriptions for the G2/G3 commands as the convention is to only use descriptions for "extended g-code commands". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* safe_z_home: Simplify check for axes to homeKevin O'Connor2020-04-221-5/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rotary_delta: The get_status() method should take eventtime parameterKevin O'Connor2020-04-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Avoid divide by zero error on PROBE at minimum Z positionKevin O'Connor2020-04-191-0/+2
| | | | | | Reported by @proto3. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Allow host software to configure neopixel timingKevin O'Connor2020-04-151-2/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_mesh: Fix typo (#2692)Piotr Usewicz2020-04-141-1/+1
| | | Signed-off-by: Piotr Usewicz <piotr@layer22.com>
* Revert "bltouch: No need to pause the toolhead for PWM off commands"Kevin O'Connor2020-04-041-6/+4
| | | | | | | | | | This reverts commit 5c8d15bbee9b1c4c82e3a2ecb5c63ce37f4a8dcb. The lower_probe() code was already manually optimizing the timing of the pwm disable, and that conflicted with the optimization in commit 5c8d15bb. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serial: Add Fysetc Cheetah board specific reset sequenceGrigori Goronzy2020-04-022-4/+46
| | | | | | | | | | | | | | | | | | Fysetc Cheetah v1.2 boards require a special sequence to reset reliably. This sequence works for me in all cases. Simpler sequences without double reset did not work correctly. This is likely because of a weird stateful circuitry for toggling the bootloader state. Cheetah boards use RTS to configure bootloader triggering. By default, pySerial sets RTS on connect, which unfortunately configures the board to start the bootloader on reset. Add a toggle for the RTS state to allow users to workaround. The RTS state is set before the serial connection is opened, so there are no glitches. Addresses #2026. Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
* bltouch: No need to pause the toolhead for PWM off commandsKevin O'Connor2020-04-021-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Don't assume reset will do a pin_up in test_sensor()Kevin O'Connor2020-04-021-9/+16
| | | | | | | | | | | Some clones don't raise the pin on a reset and the ANTClabs BL-Touch sometimes doesn't raise the pin either. Rework the (infrequently called) sensor test code to always issue a pin_up command before the touch command. Also, perform a reset and retry if the sensor test fails. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Call sync_print_time() on multi_probe_end()Kevin O'Connor2020-04-021-0/+1
| | | | | | | Be sure to fully raise the probe prior to starting any future toolhead movements in the multi_probe_end() case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Apply reset command for a full second on a raise_probe() failureKevin O'Connor2020-04-021-2/+1
| | | | | | | | If an error is found during the pin_up_not_triggered check, then apply the reset command for a full second (instead of just 100ms). This gives the bltouch more time to check its internal state. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Separate out pin_up_not_triggered case in raise_probe()Kevin O'Connor2020-04-021-6/+9
| | | | | | | Simplify raise_probe() by separating out the pin_up_not_triggered case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Don't raise an error in verify_state()Kevin O'Connor2020-04-021-18/+17
| | | | | | | Return the triggered state from verify_state() and update the callers to raise the error (if needed). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: step_distance must be positive on SET_EXTRUDER_STEP_DISTANCEKevin O'Connor2020-03-281-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: No need to pass stepper_kinematics to set_step_dist()Kevin O'Connor2020-03-282-8/+7
| | | | | | | Also, no need to log in stepper.py as the update is already logged in extruder.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Extruder: Add g-code to set extruder step_distance (#2598)David Smith2020-03-282-0/+21
| | | Signed off by: David Smith <davidosmith@gmail.com>
* stepper: Add a config check for obvious incorrect homing_positive_dirKevin O'Connor2020-03-241-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Reduce connection fail timeout from 2.5 minutes to 1.5 minutesKevin O'Connor2020-03-241-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Log shutdown state in invoke_shutdown()Kevin O'Connor2020-03-241-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Allow manual_stepper to run in parallel than an other stepperJeremy Briffaut2020-03-231-3/+7
| | | | | Signed-off-by: Jeremy Briffaut <kakou@kakou.org> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* statistics: Exit loop as soon as MemAvailable foundKevin O'Connor2020-03-221-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* statistics: Add system statsKevin O'Connor2020-03-221-2/+18
| | | | | | | Report os load, process cpu time, and system available memory to each statistics report. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* util: Try to dump mcu build information on a connection errorKevin O'Connor2020-03-222-2/+57
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Shutdown if a spontaneous restart of an mcu is observedKevin O'Connor2020-03-221-3/+8
| | | | 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>
* manual_stepper: Fix sensorless endstop for manual_stepper (#2621)kakou-fr2020-03-201-0/+11
| | | Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
* stepcompress: Implement a step+dir+step filterKevin O'Connor2020-03-134-31/+105
| | | | | | | | | | Some stepper motor drivers do not respond well to rapid "step + direction change + step" events. In particular, it is believed this can cause "over current" events on the tmc2208 drivers when they are in "stealthchop" mode. Detect these events and remove them from the generated step times. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Move code around in stepcompress.cKevin O'Connor2020-03-132-51/+51
| | | | | | Just code movement - no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Use the active extruder in the default 16x4 screen layoutKevin O'Connor2020-03-131-1/+3
| | | | | | | Change the default layout to show the active extruder (not always the first extruder). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Use a separate display group for 16x4 multiple extrudersKevin O'Connor2020-03-131-57/+73
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Fix percent progress rendering on 16x4 multi-extruder layoutKevin O'Connor2020-03-081-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: add support for multiple displaysArksine2020-03-082-4/+21
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* menu: Remove the "test" menu from the default menuKevin O'Connor2020-03-081-20/+0
| | | | | | | It is likely only developers will be interested in testing the menu system, so no need to have it in the default menu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Disable support for "deck" and "card" menu itemsKevin O'Connor2020-03-082-383/+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>
* display: Replace hard-coded display with new config based displayKevin O'Connor2020-03-084-169/+334
| | | | | | | | | | 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-082-75/+71
| | | | | | | Move M73 and M117 handling from display.py to a new display_status.py module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>