aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* display_status: fix M117 checksum trimming (#3377)jhpadjustable2020-09-281-1/+3
| | | | | | | | | | The M117 command parser discards the last character of the message whenever the M117 command does not begin the line and there is no *xx checksum, e.g. N0 M117 Look at me causes the banner area of the printer screen to display "Look at m". This patch only trims the checksum when one is found to trim. Signed-Off-By: Jonathan Pickard <jhp@adjustablelabs.info>
* configfile: report "save_config_pending" via get_status() (#3372)Eric Callahan2020-09-281-1/+5
| | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* mcu: Fix set_pwm() for hard pwmKevin O'Connor2020-09-271-11/+13
| | | | | | Must use self._pwm_max to calculate range for hard pwm updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add support for changing cycle_time in set_pwm()Kevin O'Connor2020-09-265-14/+22
| | | | | Signed-off-by: Guy Shapira <gayuha@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Add soft-pwm frequency modulation supportGuy Shapira2020-09-261-9/+16
| | | | | Signed-off-by: Guy Shapira <gayuha@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Add missing serialqueue_set_receive_window() def to serialqueue.hKevin O'Connor2020-09-261-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Use standard C type definition for pyhelper_logging_callbackKevin O'Connor2020-09-261-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Rework check for building C codeKevin O'Connor2020-09-261-22/+26
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta_calibrate: Don't error on an invalid kinematic guessKevin O'Connor2020-09-171-15/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Don't log debugging output for unknown commands if command is blankKevin O'Connor2020-09-171-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Disable unused pwm output debugging infoKevin O'Connor2020-09-171-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* reactor: Record time of recent gc collection sweepsKevin O'Connor2020-09-172-10/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* reactor: Add support for explicit Python garbage collectionKevin O'Connor2020-09-162-15/+38
| | | | | | | Add support for performing Python gc work only from the main reactor thread and only when it appears the main thread is idle. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Call gc.collect() on a "restart" requestKevin O'Connor2020-09-161-2/+4
| | | | | | | Explicitly run the python garbage collector on a restart. This cleans up memory from the previous session. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* reactor: Terminate any greenlets on finalize() callKevin O'Connor2020-09-161-1/+12
| | | | | | | Make sure to terminate any greenlets that are in a pause() state. This is necessary to ensure the reactor can be deallocated. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* reactor: Add explicit finalize() method to clean up reactor stateKevin O'Connor2020-09-162-8/+10
| | | | | | | | | The existence of a __del__() method prevents deallocation on python2 if there are circular references. Replace the __del__() method with a new finalize() call and arrange for it to be called when the main reactor is released. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Setup for serialqueue_free to be automatically calledKevin O'Connor2020-09-161-8/+10
| | | | | | Use ffi_main.gc() to automatically free the C serialqueue object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Don't define a __del__() methodKevin O'Connor2020-09-161-2/+0
| | | | | | | | The existence of a __del__() method prevents deallocation on python2 if there are circular references. Just remove the method as disconnect() should already be called directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Setup for steppersync_free to be automatically calledKevin O'Connor2020-09-161-14/+14
| | | | | | Use ffi_main.gc() to automatically free the C steppersync object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Don't define a __del__() methodKevin O'Connor2020-09-161-2/+0
| | | | | | | | The existence of a __del__() method prevents deallocation on python2 if there are circular references. Just remove the method as disconnect() should already be called directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_mesh: add mesh parameters to BED_MESH_CALIBRATEArksine2020-09-151-12/+84
| | | | | | This allows the generated points to be modified prior to probing the bed. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* probe: add update_probe_points() method to helperArksine2020-09-151-0/+3
| | | | | | This allows the consumers of the ProbePoints helper to be reconfigured at runtime. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: move algorithm verification to its own methodArksine2020-09-151-6/+11
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: move mesh area configuration to _init_mesh_configArksine2020-09-151-29/+36
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* chelper: Set compiler flags to never use "x387" floating point mathKevin O'Connor2020-09-151-7/+18
| | | | | | | | | The default on X86 32bit machines is to use 80bit floating point math (as found in the ancient "387 coprocessor"). This can cause numerical stability problems. Set the compiler flags to make sure the newer SSE math is always used on X86. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: add get_status wrapper to probe for last_query from query_probe ↵Paul McGowan2020-09-091-0/+4
| | | | | | | command (#3296) Add get_status wrapper with last_query status for macros It is sometimes useful to determine the state of the probe from a macro. If the probe is connected to an endstop pin, the results can be obtained via QUERY_ENDSTOPS but if a physical endstop is in use in addition to the probe the probe state cannot be obtained. This change allows one to use QUERY_PROBE and then access the printer.probe.last_query object to obtain the state. Signed-off-by: Paul McGowan <mental405@gmail.com>
* 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>
* adc_scaled: Add support for Duet2 Maestro "vref monitoring"Kevin O'Connor2020-09-091-0/+79
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_button: Add support for analog buttonsKevin O'Connor2020-09-091-1/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Use schedule_pwm_out instead of set_pwm_out on a restartKevin O'Connor2020-09-091-4/+7
| | | | | | | | Some mcu implementations don't like it when the pwm pin is configured twice, so use the normal schedule_pwm_out implementation to update on a restart. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Improve handling of reactor.run() exceptionsKevin O'Connor2020-09-061-2/+11
| | | | | | | Try to invoke a shutdown on an unhandled exception from reactor.run(). If that fails, try to do a clean exit. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adxl345: Add support for adxl345 accelerometerKevin O'Connor2020-09-051-0/+225
| | | | | | | Add support for taking measurements from an adxl345 accelerometer via SPI interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* buttons: Improve python3 compatibilityKevin O'Connor2020-09-041-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pid_calibrate: Update for improved python3 compatibilityKevin O'Connor2020-09-041-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Make sure z is homed before probingKevin O'Connor2020-09-041-4/+6
| | | | | | | Warn if the Z axis is not homed before attempting to probe. This improves the error message. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Prefer printer.command_error() instead of homing.CommandError()Kevin O'Connor2020-09-048-17/+16
| | | | | | | Update callers to use the printer.command_error reference instead of directly using homing.CommandError() when raising or catching errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Remove EndstopErrorKevin O'Connor2020-09-0411-25/+21
| | | | | | | There's no reason to distinguish between an EndstopError and a CommandError, so just use CommandError. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Add a move.move_error() helperKevin O'Connor2020-09-039-26/+21
| | | | | | | Move the EndstopMoveError() code from homing.py to a new method in the toolhead Move class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* input_shaper: Fix typo in SET_INPUT_SHAPER report of shaper_type_yKevin O'Connor2020-09-031-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* quad_gantry_level: Add additional comments on how leveling worksKevin O'Connor2020-09-031-18/+41
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_temperature: Simplify and comment MAX31865 temperature calculationsKevin O'Connor2020-09-022-19/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_temperature: fix MAX31865 temperature conversion (#3274)Adrian Keet2020-09-021-1/+1
| | | Signed-off-by: Adrian Keet <arkeet@gmail.com>
* kin_shaper: Fix check for optimized X or Y only calculationsKevin O'Connor2020-08-301-5/+4
| | | | | | | The optimized version is only available if it's the only axis used. This fixes input_shaper on corexz. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_shaper: Add an init_shaper() helper functionKevin O'Connor2020-08-301-26/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_shaper: Group shaper setup code togetherKevin O'Connor2020-08-301-90/+93
| | | | | | No code changes - just code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_shaper: Allocate space for maximum number of shaper pulses in advanceKevin O'Connor2020-08-301-110/+99
| | | | | | | | Combine the shaper pulses and count of those pulses into a `struct shaper_pulses`. Allocate space for the maximum number of pulses in `struct input_shaper`. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* webhooks: Add client_info parameter to "info" webhookKevin O'Connor2020-08-262-14/+32
| | | | | | | Allow clients to send their version info to klipper and arrange for that info to be logged. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>