aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* mcu: Return time of trigger from home_wait()Kevin O'Connor2021-08-173-5/+18
| | | | 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>
* avr: Rename the analog-only PE0/PE1 pins on atmega168/328 to PE2/PE3Kevin O'Connor2021-08-141-1/+1
| | | | | | | The atmega328pb has officially named these pins as PE2 and PE3, so use that naming scheme instead of the previous Klipper invented names. 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-082-6/+60
| | | | | | | | 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>
* stepper: Query the stepper mcu position during startupKevin O'Connor2021-08-062-3/+8
| | | | | | | | Try to keep the host mcu_position synchronized with the micro-controller by querying during startup and after every homing event. 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>
* trapq: Prune interrupted moves from history on trapq_set_position()Kevin O'Connor2021-08-061-1/+16
| | | | | | | | It is possible for a homing move to not fully complete. Fixup the trapq history to make processing of the history easier for callers. Similarly, do not add artificial "null" moves to the trapq history. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Pass clock to stepcompress_set_last_position()Kevin O'Connor2021-08-064-5/+9
| | | | | | | | | Using sc->last_step_clock for the last position marker does not work properly, because the stepper.py code calls stepcompress_reset() prior to calling stepcompress_set_last_position(). Fix by passing an explicit clock to stepcompress_set_last_position(). 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>
* idex_modes: Fix get_status (#4550)Tircown2021-08-011-1/+1
| | | | | Fix get_status to be called without eventtime parameter. Signed-off-by: Fabrice GALLET <tircown@gmail.com>
* webhooks: Remove spaces from json messages sent on api serverKevin O'Connor2021-07-291-1/+1
| | | | | | | Reduce the bandwidth slightly by removing unnecessary spaces in messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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-292-1/+147
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Simplify helper module registration of stepper motorsKevin O'Connor2021-07-293-13/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Support returning the mcu reported shutdown timeKevin O'Connor2021-07-291-0/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Add get_trapq() methodKevin O'Connor2021-07-291-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Support extracting stepcompress historyKevin O'Connor2021-07-294-4/+59
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Rename 'struct history_move' to 'struct history_steps'Kevin O'Connor2021-07-291-25/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Store toolhead.set_position() updates in trapq historyKevin O'Connor2021-07-294-1/+24
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Keep history of recent trapq movesKevin O'Connor2021-07-293-4/+71
| | | | | | | Store trapq moves in a separate "history" list after each move is nominally expired. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Rename trapq_free_moves() to trapq_finalize_moves()Kevin O'Connor2021-07-297-14/+14
| | | | 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>
* spi_flash: Make SD updates more tolerant of flaky boardsJustin Schuh2021-07-201-0/+2
| | | | | | | | | | Validation passes if either of the following succeeds (in order): 1. Active firmware's raw dictionary changed after update 2. Checksum of firmware.cur matches expected Additionally, deletes firmware.bin if found after update succeeds. Signed-off-by: Justin Schuh <code@justinschuh.com>
* 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>
* mcu: Set reqclock on trsync_start commandsKevin O'Connor2021-07-091-2/+3
| | | | | | | | Set the reqclock on trsync commands to ensure those commands do not cause 32-bit timer rollover errors. Otherwise, it may result in "Timer too close" errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* 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>
* stepper: Minor indentation changesKevin O'Connor2021-07-031-4/+4
| | | | 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-272-3/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Add dual_carriage to hybrid-corexyz (#4296)Tircown2021-06-275-9/+224
| | | | | | | - Add dual_carriage abilities for hybrid-corexy and hybrid-corexz - Introduce the module idex_mode - Fix add_stepper to the correct rail in hybrid-corexy Signed-off-by: Fabrice GALLET <tircown@gmail.com>
* 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>