aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
...
* output_pin: Don't flush lookahead queue on a SET_PIN commandKevin O'Connor2020-11-131-15/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Apply LED updates at time of transmissionKevin O'Connor2020-11-051-40/+42
| | | | | | | | Queue updates so that delays between updates are properly applied. This fixes macros that would blink LEDs by pausing between update commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Fix neopixel_result message so that it contains an oidKevin O'Connor2020-11-051-1/+1
| | | | | | | In order for commit 82156170 to work properly, the neopixel_result message must contain the oid. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Fix failure with multiple simultaneous neopixel updatesKevin O'Connor2020-11-041-1/+2
| | | | | | | Make sure to set the oid parameter of mcu.lookup_query_command() so responses are routed correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_macro: implement "action_call_remote_method" context actionArksine2020-11-041-0/+8
| | | | | | Users may use this action to call methods registered by a webhooks client from a command template. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* webhooks: Add "register_remote_method" endpointArksine2020-11-041-0/+29
| | | | | | This allows clients to register methods that can be called from Klipper. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* itersolve: Convert iterative solver to use "secant method"Kevin O'Connor2020-11-021-100/+79
| | | | | | | | | | The previous code calculates each step time via an "exponential search" followed by a "false position with Illinois algorithm" search. Replace with a "secant method" with "bounds check" search. This simplifies the code, improves the performance, and does a better job of finding steps near a direction change. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Add sensors to printer.heaters.available_sensors even if no gcode_idKevin O'Connor2020-11-011-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Fix registration of serial fd in debug modeKevin O'Connor2020-10-301-5/+6
| | | | | | | | When in debug output mode, make sure to register the fd correctly. Otherwise, the poll() call will use the 0 fd which could cause random results. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Remove import of unused threading moduleKevin O'Connor2020-10-301-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add support for setting reqclock in CommandQueryWrapper.send()Kevin O'Connor2020-10-293-7/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* dotstar: Don't flush the lookahead queue on a SET_LED commandKevin O'Connor2020-10-291-6/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Don't flush the lookahead queue on a SET_LED commandKevin O'Connor2020-10-291-32/+39
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Add support for RGBW LEDsKevin O'Connor2020-10-291-11/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* neopixel: Increase the maximum LED chain lengthKevin O'Connor2020-10-291-12/+45
| | | | | | | Rework neopixel updates to use an mcu buffer so that more than 18 LEDs can be in a chain. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Don't default serial config option to /dev/ttyS0Kevin O'Connor2020-10-281-10/+10
| | | | | | | | If the mcu config section is omitted, it leads to confusing error messages. Don't default the serial config option to /dev/ttyS0 to improve the error reporting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Fix bug causing incorrect position when "stow_on_each_sample=False"Kevin O'Connor2020-10-241-0/+1
| | | | | | | | | It is only valid to call raise_probe() when the toolhead is not moving. Make sure to call sync_print_time() from multi_probe_end() to ensure that. This fixes a bug that could cause the Z axis steppers to lose their position when "stow_on_each_sample=False". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Fix numerical stability when using pressure advanceKevin O'Connor2020-10-231-7/+11
| | | | | | | | | Avoid using the absolute E position when calculating pressure advance as that position can grow arbitrarily large, which can result in "numerical stability" problems. That instability could eventually lead to internal errors during step compression. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Don't raise an error if PID Ki is set to zeroKevin O'Connor2020-10-171-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* resonance_tester: Resonance testing and input shaper auto-calibration (#3381)Dmitry Butyugin2020-10-144-35/+782
| | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* toolhead: Fixed reporting of the kinematic limitsDmitry Butyugin2020-10-141-2/+3
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* mcu: Increase the time to reset a pwm pin during startupKevin O'Connor2020-10-111-6/+3
| | | | | | | | Some RPi0 users were reporting "timer too close" errors due to pwm pin resets - increase the time the host has to complete the startup to avoid this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Add an extra 200ms delay to the initialization processKevin O'Connor2020-10-111-0/+2
| | | | | | | | | | On a reset, the mcu.py code may have sent an initialization message to the bltouch, which needs time to complete. Add additional time during the bltouch setup to avoid a race with these two times. This avoids some "timer too close" errors that users of fast host machines were reporting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* thermistor: Add support for the board thermistor on the Einsy RamboKevin O'Connor2020-10-081-0/+3
| | | | | | Add in support for the "TDK NTCG104LH104JT1" thermistor. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>