aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* tmc: Do not override tcoolthrs if it is configuredAlex Voinea2023-03-151-10/+8
| | | | | | | | | | | If tcoolthrs is configured (not the default 0), then do not force the value of tcoolthrs=0xfffff during homing. This way, tcoolthrs can be set to a custom value during homing. `tpwmthrs` and `en_pwm_mode`/`en_spreadcycle` are now also correctly restored if they were changed after startup. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc: Enable `multistep_filt` for drivers that support itAlex Voinea2023-03-152-0/+2
| | | | | | | `multistep_filt` was not configured at all on tmc2240 and tmc5160. As such, it would default to the value of 0 when the GCONF field was sent to the driver. However, that field has a default value of 1 in the driver, so klipper was overriding the defaults by accident. This field improves the stability of velocity based thresholds (it's effectively TSTEP filtering) and it also improves the current regulation stability in stealthchop2 (according to the datasheet). This field was already set to 1 correctly in the tmc2208/tmc2209 driver code. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc2209: Remove duplicate `pdn_disable` initializationAlex Voinea2023-03-151-1/+0
| | | Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* reactor: Fix typoD4SK2023-03-141-2/+2
| | | | Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
* reactor: Fix typoD4SK2023-03-141-2/+2
| | | Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
* probe: expose name on status reportPedro Lamas2023-03-141-1/+2
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* probe: Allow overriding horizontal_move_z on gcodeLasse Dalegaard2023-03-141-1/+5
| | | | Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
* tmc: Beautify initialization codeAlex Voinea2023-03-074-5/+19
| | | | | Purely esthetic. Make all tmc driver init code similar to one another. The various fields were grouped based on the register which they affect or the function they perform. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc5160: allow changing the globalscaler at runtimeAlex Voinea2023-03-071-10/+12
| | | | | | | | | Previously, the globalscaler was calculated during the config parsing and set to a fixed value. If the current was changed for any reason after the initialization, only IRUN and IHOLD would be changed. This however caused issues: - If the new current was lower, then the resolution of the possible current values would be low since there are only 32 IRUN/IHOLD steps. - If the new current was higher, it wouldn't actually work since IRUN and IHOLD are capped at 31, so it wouldn't be possible to increase the current without increasing globalscaler. With this commit, the globalscaler is recalculated whenever necessary in order to ensure the correct range of IRUN/IHOLD is used. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc: Fix s2vs field formattersAlex Voinea2023-03-072-2/+6
| | | | | Rename the field formatter text for tmc2208/tmc2209 and implement it also for tmc5160. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc2240: initial implementationAlex Voinea2023-03-013-2/+401
| | | | | Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Move lookup_command_tag() to CommandWrapper classKevin O'Connor2023-02-223-14/+24
| | | | | | | | Use mcu.lookup_command().get_command_tag() instead of mcu.lookup_command_tag(). This improves error reporting on a protocol mismatch. It also enables support for a msgtag that is negative. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Code movement in mcu.pyKevin O'Connor2023-02-221-73/+88
| | | | | | This is code movement and comment updates only - no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: report statusPedro Lamas2023-02-131-0/+4
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* configfile: Make getlists return an empty list on empty string. (#6042)Jordan Woyak2023-02-091-2/+6
| | | Signed-off-by: Jordan Woyak <jordan.woyak@gmail.com>
* extruder: store currently sync'ed motion queue namePedro Lamas2023-02-091-1/+5
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* extruder: Add extruder name to extruder_stepper respond message (#6020)CODeRUS2023-02-031-2/+4
| | | Signed-off-by: Andrei Kozhevnikov <coderusinbox@gmail.com>
* screws_tilt_adjust: status result as dictionaryPedro Lamas2023-02-031-6/+7
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* bed_mesh: do not load a profile on startupEric Callahan2023-02-011-5/+0
| | | | | | | Some users may not desire this behavior and others may wish to initialize to a profile not named default. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* replicape: Only call note_pwm_enable() in main threadKevin O'Connor2023-01-171-11/+17
| | | | | | | | The pca9685_pwm set_pwm() code can be called from a background thread (when the pin controls a heater). Propagate updates to the main thread for enable tracking. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* z_tilt: Improve python3 compatibilityKevin O'Connor2023-01-171-1/+1
| | | | | | | | | Sort using comparison on only first item in list to avoid greater/less than comparison of stepper objects (which causes an error on Python3). Reported by discourse user salbang. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Flush in chunks from flush_step_generation()Kevin O'Connor2023-01-081-2/+8
| | | | | | | | | If note_kinematic_activity() has a time far in the future it could result in a single flush attempt of that time range. Be sure to break up that range into small chunks using the normal _update_move_time() mechanism. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Rename last_kin_flush_time to force_flush_timeKevin O'Connor2023-01-081-8/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Fix note_kinematic_activity()Kevin O'Connor2023-01-081-1/+1
| | | | | | | | It was possible a note_kinematic_activity() call could increase last_kin_move_time, but _process_moves() could reset it. Fix by making sure _process_moves() only ever increases last_kin_move_time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Minor declaration movement in __init__.pyKevin O'Connor2023-01-071-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Minor code movement in trapq.cKevin O'Connor2023-01-072-53/+53
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: No need to import pins moduleKevin O'Connor2023-01-071-7/+2
| | | | | | The pins module is no longer used in console.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Add a get_serialqueue() methodKevin O'Connor2023-01-062-2/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Add comment to do_write()Kevin O'Connor2023-01-051-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* palette2: Fix errors with bad handling of NoneType in a few locationsClifford Roche2022-12-311-5/+6
| | | | | | Issue specific to Python 3, NoneType is being used to compare heartbeat time (actually caused by invalid condition operator), and by returning NoneType in timer functions. Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
* delta: Better delta build volume constraint checkjanherich2022-12-301-1/+7
| | | | | | | | | | Existing code uses very restrictive build volume constraint checking with just narrow cone on top of fully cylinder for delta printers. Code here implements more permissive and still safe build volume constraint checks. Signed-off-by: Jan Herich <jan.herich@gmail.com>
* tmc: Configurable microstep lookup table (#5920)Alex Voinea2022-12-213-4/+71
| | | | | | | Make all the microstep lookup table registers configurable via the config file. It also loads the default values. TMC220x and TMC2660 do not support this feature. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* manual_probe: Add Z_OFFSET_APPLY_ENDSTOP for deltajanherich2022-12-191-0/+45
| | | | | | | | | | Current Z_OFFSET_APPLY_ENDSTOP command only works for printers with cartesian architecture which have separate Z axis defined. But this functionality (persisting Z babystep value to endstops) is exactly as convinient for delta printers, therefore this PR implements it. Signed-off-by: Jan Herich <jan.herich@gmail.com>
* bed_mesh: Allow bedmeshing at 1mm spaced intervals (#5918)Keyan Mobli2022-12-191-1/+1
| | | Signed-off-by: Keyan Mobli <keyan@kmobli.com>
* screws_tilt_adjust: Add get_status() method (#5921)theophile2022-12-171-0/+14
| | | Signed-off-by: Christopher Meredith <chmeredith@gmail.com>
* gcode_arcs: Allow either one of I, J, K to be default-zero on G2/G3 (#5939)maze2022-12-141-1/+1
| | | Signed-off-by: Wijnand Modderman-Lenstra <maze@pyth0n.org>
* save_variables: Verify filename path is writeable at startupJustin Schuh2022-12-111-0/+2
| | | | Signed-off-by: Justin Schuh <code@justinschuh.com>
* gcode_arcs: No need to import gcode module to access Coord()Kevin O'Connor2022-12-111-6/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_arcs: support XY, XZ and YZ planesAndrew Mirsky2022-12-111-28/+73
| | | | | | | add G17, G18 and G19 commands to select arc planes enhance G2/G3 to support arc moves in XY, XZ and YZ planes Signed-off-by: Andrew Mirsky <andrew@mirsky.net>
* parsedump: Support running on both python2 and python3Kevin O'Connor2022-12-072-14/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: add STM32H723 supportbigtreetech2022-12-021-0/+6
| | | | | Signed-off-by: Chen.BJ from BigTreeTech chenbj@biqu3d.com Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32g4: implement build,usb,can,i2c,spi,serial,adc.Matt Baker2022-12-021-0/+1
| | | | Signed-off-by: Matt Baker <baker.matt.j@gmail.com>
* corexz: Multiple steppers per axis on CoreXZNeko-vecter2022-12-021-7/+6
| | | | | | Allowing multiple steppers per axis. Signed-off-by: Vecter Fang <vecterfang@icloud.com>
* safe_z_home: Fix final z hop to use relative z coordinates (#5879)redstone992022-11-221-1/+4
| | | | | | | | | | | After a G28 z-axis homing, there is a final z hop. It was hoping to height z_hop as an absolute z height rather than relative. If the z-axis home leaves the head at a z height higher than z_hop, e.g. because you were using a probe to do z homing, this meant that it was z hopping in the negative z direction, which could result in crashing the toolhead. Signed-off-by: Joshua Redstone <redstone@gmail.com>
* mpu9250: add MPU6500 (#5767)Yifei Ding2022-11-191-4/+14
| | | Signed-off-by: Yifei Ding <yifeiding@protonmail.com>
* bed_mesh: disallow null profile namesEric Callahan2022-11-111-0/+6
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* menu: Conditional display of common Control utilsGrigi2022-11-031-3/+24
| | | | | | | | | | This will hide features in the Klipper Display menu that isn't applicable for the machine, therefore we can add extra alignment tools in the Control menu as well. Also conditionally displays Setup/Calibration options. Signed-off-by: Nickolas Grigoriadis <nagrigoriadis@gmail.com>
* adxl345: Apply correct scaling for X,Y and Z axesDmitry Butyugin2022-10-251-3/+4
| | | | | | | | According to ADXL345/ADXL343 datasheets, at 3.3V supply voltage, which is most frequent in the various boards, the sensitivity of X and Y axes changes to 265 LSB/g from 256 LSB/g at 2.5V. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* toolhead: Capture current junction_deviation in a Move classDmitry Butyugin2022-10-171-3/+4
| | | | | | | If a maximum acceleration is changed between two consecutive moves, this allows to correctly compute the junction velocity between them. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* atsamd: Add Kconfig definitions for same51j19 and same54p20 chipsKevin O'Connor2022-10-131-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>