aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
Commit message (Collapse)AuthorAgeFilesLines
* mcu: Return time of trigger from home_wait()Kevin O'Connor2021-08-172-4/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* htu21d: Update htu21d.py (#4520)dawidmpunkt2021-08-171-1/+1
| | | | | Line 202: should be self.humidity instead of self.temp Signed-off-by: Dawid Murawski <dawid.m@gmx.net>
* bed_mesh: Added PROFILE name option (#4522)Randell Hodges2021-08-171-1/+3
| | | | | | | Added optional PROFILE parameter to allow bed_mesh_calibrate to save the mesh directly into the provided profile name instead of default. If omitted, it will be stored in default. Signed-off-by: Randell L Hodges <rhodges@taxfodder.com>
* output_pin: fix time difference calculationPascal Pieper2021-08-171-1/+1
| | | | Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
* bed_screws: Finish bed_screws_adjust after n consecutive accepts (#4521)chrenderle2021-08-171-6/+12
| | | | | | | Changed the bed_screws_adjust command so that it finishes after 4 consecutive accepts. Before if you had 4 screws and adjusted the first one you had to accept 7 times to finish the bed_screws_adjust. Signed-off-by: Christian Enderle <mail@chrenderle.de>
* bed_mesh: Fix off-by-one error in faulty region error reportKevin O'Connor2021-08-171-2/+4
| | | | | | Reported by @craiglink. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* motion_report: Fix typo causing incomplete queriesKevin O'Connor2021-08-171-4/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop_phase: Convert to using tmc mcu_phase_offsetKevin O'Connor2021-08-087-33/+26
| | | | | | | Now that the TMC drivers track the phase offset, use that to implement endstop phase. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Track offset between tmc driver and mcu positionKevin O'Connor2021-08-081-6/+59
| | | | | | | | Track the offset between driver phase and mcu position. This offset should be constant as long as neither the driver nor the mcu is reset. If the offset ever changes, log a warning. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Move stepper phase reading code to TMCCommandHelper classKevin O'Connor2021-08-066-41/+36
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Consistently use lower case for all TMC field namesKevin O'Connor2021-08-066-253/+253
| | | | | | | | | | | | The Trinamic specs aren't consistent with upper vs lower case, which can be confusing. Improve clarity by using lower case names consistently in the code. Register names will continue to use all upper case naming in the code. Update the SET_TMC_FIELD command to automatically convert field names to lower case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2208: Send pdn_disable UART setup as first command to chip during initKevin O'Connor2021-08-061-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Improve error messages on a printer shutdown during homingKevin O'Connor2021-08-061-3/+18
| | | | | | | | If a shutdown occurs during homing, make sure any follow up errors are clear that the cause of the error is the shutdown. This suppresses the confusing "Unable to obtain 'trsync_state' response" messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: bugfix to z_offset_apply_probe (#4553)shiftingtech2021-08-021-2/+1
| | | | | | Command was accessing the wrong variable for the existing z offset, leading to bad behavior. Signed-off-by: Ben Eastep <shifting@shifting.ca>
* motion_report: Add get_status() method with current requested toolhead positionKevin O'Connor2021-07-291-4/+43
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* motion_report: Add new extras module for low-level motion diagnosticsKevin O'Connor2021-07-291-0/+146
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Simplify helper module registration of stepper motorsKevin O'Connor2021-07-292-7/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Rename trapq_free_moves() to trapq_finalize_moves()Kevin O'Connor2021-07-292-4/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Note force_enable() and restore_enable() are internal functionsKevin O'Connor2021-07-291-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: fix crash when opening SDCard menu while printingKamil Trzcinski2021-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This fixes the bug introduced by https://github.com/KevinOConnor/klipper/commit/f1091a484bfbf2cc5676e3a6fcd595172f123f67. The problem is that condition was returning string which could not be converted to boolean. We solve that by showing `Start Printing` when `is_active`. ``` ERROR:root:Unhandled exception during run Traceback (most recent call last): ... File "/opt/klipper/klippy/extras/display/menu.py", line 117, in eval_enable return bool(ast.literal_eval(self._enable_tpl.render(context))) File "/usr/lib/python2.7/ast.py", line 49, in literal_eval node_or_string = parse(node_or_string, mode='eval') File "/usr/lib/python2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) File "<unknown>", line 1 /opt/octoprint/uploads/wait_print.gcode ``` Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
* probe: add ability to save babystepping (#4404)shiftingtech2021-07-252-0/+38
| | | | | | | | Created two new extended gcodes: Z_OFFSET_APPLY_ENDSTOP, and Z_OFFSET_APPLY_PROBE. These use the z gcode offset to revise the probe offset, or z endstop position allowing users to make a frequently used babystepping value permanent without manual config editing. Signed-off-by: Ben Eastep <shifting@shifting.ca>
* tmc_uart: Increase default UART rate to 40000 on 32bit MCUsKevin O'Connor2021-07-231-2/+7
| | | | | | | | A higher UART baud rate will allow for faster transfers and may result in more stable operation in general. Increase the baud to 40000 on 32bit MCUs and leave the baud at 9000 baud for 8bit AVR MCUs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2209: Set SENDDELAY=2 to avoid uart rx/tx errorsKevin O'Connor2021-07-231-0/+3
| | | | | | | | | | It looks like the tmc2209 chips have increased uart errors with the default SENDDELAY of zero. Increasing the SENDDELAY to two seems to work around this issue. Reported by @ReXT3D. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* controller_fan: Minor updatesKevin O'Connor2021-07-202-6/+7
| | | | | | | | | | Document change in behavior of the controller_fan module. Lookup heater objects in connect() event handler. Return list of stepper names from stepper_enable.get_steppers(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* controller_fan: Add "stepper" config option (#4447)Sophie Hirn2021-07-202-2/+18
| | | | | | Allows contoller_fan sections to monitor only certain steppers instead of all of them, similar to how heaters are currently handled. Signed-off-by: Sophie Hirn <sophie.hirn@wyvernscale.com>
* resonance_tester: Arbitrary AXIS in TEST_RESONANCES commandDmitry Butyugin2021-07-081-29/+61
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* rp2040: Add initial adc supportKevin O'Connor2021-07-041-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* samd_sercom: Specify the sercom explicitly in a config optionKevin O'Connor2021-07-041-6/+6
| | | | | | | Do not infer the sercom from the config section name, as that prevents one from using SPI buses on multiple samd mcus. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Move pin handling out of EnableTracking classKevin O'Connor2021-07-031-19/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stm32: Add support for STM32F072 (used in the TurboCAN board) (#4412)henrikssn2021-06-271-2/+3
| | | | | | | * Add menuconfig option for stm32f072 * Add support for internal temp of stm32f072 * Share the temperature calculation logic between stm32f0x2 MCUs Signed-off-by: Erik Henriksson <erikhenrikssn@gmail.com>
* duplicate_pin_override: Debugging tool to permit multiple use pinsKevin O'Connor2021-06-271-0/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Ensure the z_offset is not negativeKevin O'Connor2021-06-221-1/+1
| | | | | | | It would not make sense to have a negative z_offset. Reported by @Yoyolick. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* screws_tilt_adjust: Add DIRECTION parameter to SCREWS_TILT_CALCULATE (#4357)Matthew Lloyd2021-06-221-18/+39
| | | Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
* virtual_sdcard: add `file_path` and `file_size` to `status`Kamil Trzcinski2021-06-222-6/+16
| | | | | | | This provides a comprehensive information if currently we have a file loaded. Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
* dotstar: report color data via get_status()Eric Callahan2021-06-181-0/+9
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* neopixel: report color data via get_status() methodArksine2021-06-181-0/+10
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* print_stats: add `cancelled` when `CANCEL_PRINT` used (#4366)Kamil Trzciński2021-06-143-9/+26
| | | | | | | | | | | Before this change, a `CANCEL_PRINT` set a `print_stats` to `paused` that would later be workaround-ed with `fluidd`/`mainsail` to re-define `CANCEL_PRINT`. This sets a proper canceled state, but additionally closes a file from a `virtual_sdcard` context for `canceled`/`error`, as this is no longer resumable from this point. Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
* homing: Check for failures during multi-endstop homingKevin O'Connor2021-06-091-2/+7
| | | | | | If any endstop reports a failure, then stop homing on all endstops. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Call add_stepper() earlier in boot processKevin O'Connor2021-06-092-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_mesh: implement BED_MESH_OFFSETEric Callahan2021-06-081-3/+24
| | | | | | The BED_MESH_OFFSET gcode can be used to apply X and/or Y offsets the the mesh lookup. This allows printers with independent extruders to correct the Z adjustment when changing a tool. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: move the "fade offset" out of the ZMeshEric Callahan2021-06-081-15/+9
| | | | | | This is a temporary offset applied to the mesh used to fade toward a "target". For clarity, apply the fade offset when the final z calculation is made. SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
* endstop_phase: Unify phase conversion codeKevin O'Connor2021-06-061-80/+87
| | | | | | | Introduce a new PhaseCalc class and use that for both homing and ENDSTOP_PHASE_CALIBRATE. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* resonance_tester: Set max_accel ignoring the limit from the config (#4174)Dmitry Butyugin2021-06-061-15/+23
| | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* endstop_phase: Add support for reporting phase information via get_status()Kevin O'Connor2021-06-031-14/+32
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* z_tilt: expose an 'applied' status to allow macros to skip QGL/Z_TILT_ADJUST ↵Michael Rose2021-06-022-2/+29
| | | | | | | | | | | | | | (#4313) This is useful for macros that'd like to skip QGL if already leveled, e.g.: ``` {% if not printer.quad_gantry_level.applied %} QUAD_GANTRY_LEVEL {% endif %} ``` Signed-off-by: Michael Rose <elementation@gmail.com>
* neopixel: add sync parameter to prevent waking toolhead (#4339)Paul McGowan2021-06-022-18/+42
| | | | | | | neopixel: add sync param to prevent waking toolhead dotstar: refactor to match neopixel methods and add sync parameter Signed-off-by: Paul McGowan <mental405@gmail.com>
* gcode: Update gcode descriptions (#4335)Stefan Dej2021-06-025-16/+37
| | | | | | | | | | Add help description to HELP Add help description to RESPOND Add help description to MEASURE_AXES_NOISE, TEST_RESONANCES and SHAPER_CALIBRATE Add help description to PAUSE, RESUME, CLEAR_PAUSE and CANCEL_PRINT Add help description to GET_POSITION Add help description to SET_RETRACTION and GET_RETRACTION Signed-off-by: Stefan Dej <meteyou@gmail.com>
* stepper: Remove set_tag_position() codeKevin O'Connor2021-05-295-31/+33
| | | | | | Have callers store the stepper positions in a dict. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_macro: add description property (#4317)Alex Zellner2021-05-261-1/+1
| | | Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
* gcode_macro: Disallow whitespace in macro name (#4312)Florian Heilmann2021-05-261-0/+4
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>