aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepper.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Extruder: Add g-code to set extruder step_distance (#2598)David Smith2020-03-281-0/+4
| | | Signed off by: David Smith <davidosmith@gmail.com>
* stepper: Add a config check for obvious incorrect homing_positive_dirKevin O'Connor2020-03-241-0/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Introduce new lookup_query_command() command wrapperKevin O'Connor2020-02-201-4/+4
| | | | | | | Use new mcu.lookup_query_command() for all commands that query information from the micro-controller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Ability to set retract speed between homing moves (#2487)FanDjango2020-02-121-4/+6
| | | | | On the retract move between homing moves, use a different speed (typically a faster one). Signed-off-by: Mike Stiemke <fandjango@gmx.de>
* itersolve: Add ability to query the active_flags stateKevin O'Connor2020-01-231-0/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Export itersolve_calc_position_from_coord()Kevin O'Connor2020-01-061-3/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Track if using units of radians instead of millimetersKevin O'Connor2020-01-061-5/+12
| | | | | | | | The STEPPER_BUZZ command needs to know if the axis is using radians instead of millimeters so that it can move a more appropriate distance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Remove set_commanded_position() callKevin O'Connor2019-11-131-12/+6
| | | | | | | | Now that the only caller to set_commanded_position() is set_position(), remove the set_commanded_position() method and pass the set_position() call directly to the itersolve.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Do not call itersolve_set_commanded_pos() after homingKevin O'Connor2019-11-131-2/+1
| | | | | | | | Now that the homing code does not use get_commanded_position(), it is no longer necessary to alter the low-level commanded position after a homing move. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add get/set_tag_position() and convert calc_position()Kevin O'Connor2019-11-131-1/+7
| | | | | | | | | Rename calc_position() to calc_tag_position() and have it calculate the value of the position from the last stepper set_tag_position() call. This enables the calc_tag_position() code to be more flexible as it can be run with arbitrary positions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Remove add_to_endstop() methodKevin O'Connor2019-11-121-7/+2
| | | | | | | Now that the PrinterStepper and MCU_stepper classes have been merged, there is no need for the add_to_endstop() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Merge PrinterStepper and MCU_stepper classesKevin O'Connor2019-11-121-69/+48
| | | | | | | There's no need to track the two classes separately - just combine them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Move MCU_stepper from mcu.py to stepper.pyKevin O'Connor2019-11-121-2/+139
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Simplify PrinterRail initKevin O'Connor2019-11-121-23/+18
| | | | | | Use add_extra_stepper() during class init. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Move enable tracking from stepper.py to stepper_enable.pyKevin O'Connor2019-11-121-68/+7
| | | | | | | Move the enable line tracking out of the main stepper.py code. This simplifies the main kinematic code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Move motor_off() logic to stepper_enable.pyKevin O'Connor2019-11-121-0/+1
| | | | | | | | Directly disable all the stepper motors on a global motor_off() from the StepperEnable() class in stepper_enable.py. This simplifies the toolhead and kinematic classes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Add new extras module for stepper enable line trackingKevin O'Connor2019-11-101-0/+2
| | | | | | | Move the M18/M84 command handling from gcode.py to new stepper_enable module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Remove unused gen_steps()Kevin O'Connor2019-11-061-6/+0
| | | | | | | Eliminate the old gen_steps() call now that all callers have been converted to the newer trapq based generate_steps(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Remove set_ignore_move()Kevin O'Connor2019-11-061-1/+0
| | | | | | | Update callers of set_ignore_move() to use the trapq system to set a stepper to ignore moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Add support for generating steps from a trapqKevin O'Connor2019-11-061-0/+14
| | | | | | | Support associating a stepper_kinematics with a trapq. Support generating steps from a time range on the given trapq. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add support for providing a list of pins to enableKevin O'Connor2019-06-281-11/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop_phase: Fix endstop_phase on trinamic drivers that aren't invertedKevin O'Connor2019-06-211-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop_phase: Move endstop phase homing code to new "extras" moduleKevin O'Connor2018-10-161-57/+0
| | | | | | | Move the endstop phase tracking code from stepper.py to a new extras/endstop_phase.py module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add a set_commanded_position() method to MCU_stepperKevin O'Connor2018-10-101-3/+7
| | | | | | Add the ability to directly set the "commanded" stepper position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Wrap lines to 80 columnsKevin O'Connor2018-10-091-3/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Adding support for a second_homing_speed parameter (#677)Chris Whiteford2018-10-041-2/+3
| | | Signed-off-by: Chris Whiteford <chris@chrisandtennille.com>
* probe: Infer position_endstop when using probe:z_virtual_offsetKevin O'Connor2018-10-011-1/+3
| | | | | | | | | Don't require (or permit) the user to specify a stepper_z position_endstop when using the probe:z_virtual_offset mechanism. In that case the position_endstop should always equal the probe's z_offset - so no need to have the user specify it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Rename stepper_buzz.py to force_move.pyKevin O'Connor2018-07-261-2/+2
| | | | | | This is in preparation for extending the ability to make manual moves. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Minor whitespace changesKevin O'Connor2018-07-261-17/+19
| | | | | | Wrap lines at 80 columns. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Explicitly pass can_invert and can_pullup to lookup_pin()Kevin O'Connor2018-07-261-3/+5
| | | | | | | | | | | | Don't pass pin_type to lookup_pin() - instead, if a pin can be inverted or can have a pullup, then the caller must explicitly specify that when calling lookup_pin(). This simplifies the code for the cases where it is not valid to invert or pullup. Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin() apply default pullup and invert flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Support calculating a stepper position from a cartesian coordinateKevin O'Connor2018-07-181-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* query_endstops: Move QUERY_ENDSTOP command to it own extras/ moduleKevin O'Connor2018-07-161-3/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Enhance itersolve stepper kinematics allocationKevin O'Connor2018-07-131-6/+4
| | | | | | | Allocate the stepper_kinematics directly in mcu.py - that way the kinematic classes don't have to interact with the chelper code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Support setting the stepper position via a cartesian coordinateKevin O'Connor2018-06-221-2/+2
| | | | | | | | | Add support for an itersolve_set_position() function that sets a stepper position from a cartesian coordinate. This eliminates the need for both the python and C code to be able to translate from a cartesian coordinate to a stepper position. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Replace PrinterHomingStepper with PrinterRailKevin O'Connor2018-06-221-75/+83
| | | | | | | | Update the code to use the term "rail" when dealing with a motor controlled "axis". A rail has a series of steppers and endstops that control that motor controlled "axis". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_homing_info() method to PrinterHomingStepperKevin O'Connor2018-06-221-1/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_range() method to PrinterHomingStepperKevin O'Connor2018-06-221-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Don't peak into PrinterStepper membersKevin O'Connor2018-06-221-4/+8
| | | | | | | Add additional wrapper functions so that no outside callers need to peak into the member variables of PrinterStepper. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a is_stepper_enabled() method to PrinterStepperKevin O'Connor2018-06-221-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Don't store step_dist in PrinterStepperKevin O'Connor2018-06-221-11/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add a get_name() method to PrinterStepperKevin O'Connor2018-06-221-9/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: No need to pass printer reference to kinematic/stepper constructorsKevin O'Connor2018-06-221-12/+12
| | | | | | The config reference already stores a reference to the printer object. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_cartesian: Remove stepcompress_push_const()Kevin O'Connor2018-06-201-8/+0
| | | | | | | All the kinematic code now uses the iterative solver to generate steps. Remove the old stepcompress_push_const() mechanism. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* corexy: Convert corexy to use the iterative solverKevin O'Connor2018-06-201-1/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Convert delta kinematics to use iterative solverKevin O'Connor2018-06-201-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_buzz: Move STEPPER_BUZZ command from stepper.py to new fileKevin O'Connor2018-06-201-28/+2
| | | | | | | Add a klippy/extras/stepper_buzz.py file to handle the STEPPER_BUZZ command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add STEPPER_BUZZ commandKevin O'Connor2018-05-241-0/+30
| | | | | | Add a new command that can help diagnose stepper motor connectivity. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Raise an error if position_endstop is not in min/max rangeKevin O'Connor2018-05-181-6/+16
| | | | | | | | Raise an error during config parsing if the position_endstop is not between the position_min and position_max. This avoids a confusing error message during homing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Fix typo in error report - name should be self.nameKevin O'Connor2018-05-141-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Remove module level get_printer_pins() and setup_pin() functionsKevin O'Connor2018-04-041-12/+11
| | | | | | | | Most callers did a lookup of the pins module via printer.lookup_object("pins"). Use that as the standard method and remove these less frequently used methods. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>