Commit Graph

138 Commits

Author SHA1 Message Date
Kevin O'Connor 2f7b234189 extruder: Remove deprecated commands and config
Remove the deprecated SET_EXTRUDER_STEP_DISTANCE and
SYNC_STEPPER_TO_EXTRUDER commands.  Remove the deprecated
shared_heater config option.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2024-02-15 12:35:19 -05:00
Francois Chagnon d7f6348ae6
toolhead: Keep stepcompress move history relative to current time (#6439)
Expire history relative to current time rather than last move in history queue

Signed-off-by: Francois Chagnon <fc@francoischagnon.net>
2023-12-30 11:34:21 -05:00
Kevin O'Connor f7567a0db9 Revert "toolhead: Use dict for step generation flush times. (#6303)"
This reverts commit 6749985302.

A defect was found in the above commit (the input shaper code calls
note_step_generateion_scan_time() for many steppers, so the
input_shaper class can't be used as the index).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2023-10-21 15:46:08 -04:00
Viesturs Zariņš 6749985302
toolhead: Use dict for step generation flush times. (#6303)
Makes the API to extruder and input shaper more robust, avoiding the need to track the old delay.

Signed-off-by: Viesturs Zariņš <viesturz@gmail.com>
2023-10-19 13:28:16 -04:00
Dmitry Butyugin a4cd0336bd
idex_modes: Fixed the case when carriages home in the same direction (#6310)
Previous version of the code assumed that dual carriages home away
from each other, which is not true on some machines, which have the
second dual carriage homing on the first carriage. The new code
correctly identifies the relative order of the carriages now.

This fixes discrepancies between the documentation and the actual
implementation of the carriages kinematic ranges calculation.

Notes about dual_carriage homing and proximity checks changes

Fixed clearing of homing state after homing in certain modes

In case of multi-MCU homing it is possible that the carriage position
will end up outside of the allowed motion range due to latencies in data
transmission between MCUs. Selecting certain modes after homing could
result in home state clearing instead of blocking the motion of the
active carriage. This commit fixes this undesired behavior.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-09-29 13:46:42 -04:00
D4SK aa8ba30f8a
cartesian: fix x-axis being hardcoded for dual_carriage (#6313)
Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
2023-08-11 21:21:46 -04:00
Dmitry Butyugin 55d09771b1 idex_modes: A small fix for MOVE_SPEED param
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-08-01 20:26:19 -04:00
Dmitry Butyugin 36be1cfc51
idex_modes: COPY and MIRROR mode implementation (#6297)
COPY and MIRROR mode implementation

Correctly apply input shaper params to new dual_carriage

Added SAVE_/RESTORE_IDEX_STATE commands

Documentation updates for the new IDEX modes

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-08-01 12:23:52 -04:00
Dmitry Butyugin 345934bd68 idex_modes: Native input shaping support with dual carriages
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2023-06-06 20:17:49 -04:00
Frans-Willem Hardijzer ec61f10f0f
hybrid_corexy: Fix changing dual-carriage carriage will inadvertently set axis to homed, even if it wasn't. (#6183)
In hybrid_corexy and hybrid_corexz, the update_limits function is (only) called by the DualCarriage implementation, whenever the carriage changes.
Unfortunately, these limits also keep track of homing status, when they're unhomed they are set to 1 to -1 (invalid range).
As a fix, if the limit was set to "unhomed", we keep it that way, and only update it with the new rail limits if it was already properly homed before.

Signed-off-by: Frans-willem Hardijzer <fw@hardijzer.nl>
2023-05-25 11:55:07 -04:00
Pedro Lamas da8d4b0231 extruder: store currently sync'ed motion queue name
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2023-02-09 16:51:47 -05:00
CODeRUS 791ad6162a
extruder: Add extruder name to extruder_stepper respond message (#6020)
Signed-off-by: Andrei Kozhevnikov <coderusinbox@gmail.com>
2023-02-03 18:50:56 -05:00
janherich 29ba5ab05a delta: Better delta build volume constraint check
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>
2022-12-30 21:39:32 -05:00
Neko-vecter a1de69e39b corexz: Multiple steppers per axis on CoreXZ
Allowing multiple steppers per axis.

Signed-off-by: Vecter Fang <vecterfang@icloud.com>
2022-12-02 11:25:55 -05:00
Tircown 354915d2ad
kinematics: Add deltesian printers (#5743)
Initial push of the working deltesian kinematics after some successful tests.

Signed-off-by: Fabrice GALLET <tircown@gmail.com>
2022-09-01 15:56:31 -04:00
Dmitry Butyugin 5d9ff75d02 extruder_stepper: Support configuring pressure advance from config
Also added status report for extruder_stepper objects with the
current pressure advance parameters values.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2022-09-01 14:53:12 -04:00
Nitram 6a91824486
delta: Added the possibility to get where the "cone shape" of the build volume starts from Macros (#5662)
Added the possibility to get where the "cone shape" of the build volume starts from Macros

Signed-off-by: Martin Malmqvist <Volcomosq@gmx.com>
2022-08-19 13:27:44 -04:00
Kevin O'Connor fe2974b8ec extruder: Verify trapq is unmodified on default SET_PRESSURE_ADVANCE
Check that a SET_PRESSURE_ADVANCE without an explicit EXTRUDER
parameter isn't done after the user disables or reassociates the
extruder stepper motor (via SYNC_EXTRUDER_MOTION).  Otherwise, it
could lead to very confusing results.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-03-04 13:38:59 -05:00
Kevin O'Connor 6627d036ac extruder: Allow an extruder object to be created without a stepper
This may be useful for dual hotend printers that have only one
stepper.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-03-04 13:20:35 -05:00
Andrei Ignat 682d38f590
delta: Multiple steppers on delta tower (#5217)
Updated tower rail setup to support multiple steppers per tower.

Signed-off-by: Andrei Ignat <andrei@ignat.se>
2022-02-28 23:14:25 -05:00
Andrei Ignat bbd1ddadd1
corexy: Multiple steppers per axis on CoreXY (#4886)
Allowing multiple steppers per axis.

Signed-off-by: Andrei Ignat <andrei@ignat.se>
2022-02-28 23:11:50 -05:00
Kevin O'Connor 2e17519a7e extruder: Deprecate old extruder commands and shared_heater config option
Deprecate SET_EXTRUDER_STEP_DISTANCE and SYNC_STEPPER_TO_EXTRUDER.
Recommend using SET_EXTRUDER_ROTATION_DISTANCE and
SYNC_EXTRUDER_MOTION.

Deprecate the extruder "shared_heater" option and reocmmend using
extruder_stepper config sections to obtain the same functionality.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-02-10 13:25:16 -05:00
Kevin O'Connor 2af8c5aa86 extruder: Add new SYNC_EXTRUDER_MOTION command
This command is a rename of SYNC_STEPPER_TO_EXTRUDER.  This change is
in preparation for the removal of SYNC_STEPPER_TO_EXTRUDER.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-02-10 13:24:21 -05:00
Kevin O'Connor 9ec9742484 extruder: Add support for reversing the direction of extruder stepper movement
Extend SET_EXTRUDER_ROTATION_DISTANCE to support reversing the
direction of extruder movement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-02-10 13:24:21 -05:00
Kevin O'Connor 189188e3ca extruder: Add a SET_EXTRUDER_ROTATION_DISTANCE command
Support altering the extruder distance using the higher-level
rotation_distance.  This is in preparation for removal of the
SET_EXTRUDER_STEP_DISTANCE command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-02-10 13:24:21 -05:00
Kevin O'Connor 02d5f9754f extruder: Support disassociating a stepper from all extruders
Support SYNC_STEPPER_TO_EXTRUDER commands with an EXTRUDER parameter
set to an empty string.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-01-16 19:01:15 -05:00
Kevin O'Connor eb2a67cb95 extruder: Support SYNC_STEPPER_TO_EXTRUDER on extruder objects
Refactor the extruder_stepper support so that it uses the
ExtruderStepper class defined in extruder.py.

Support the SYNC_STEPPER_TO_EXTRUDER command on steppers defined in
either extruder_stepper or extruder config sections.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-01-16 19:01:15 -05:00
Kevin O'Connor ffbd2698fe extruder: Separate extruder stepper tracking to new ExtruderStepper class
Move the stepper handling (including pressure advance handling) to a
new class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-01-16 19:01:15 -05:00
Kevin O'Connor 29724a7411 extruder: Don't store pressure_advance value in trapq moves
Store the pressure_advance value in "struct extruder_stepper" instead
of in the trapq's "struct move".  This makes it possible for multiple
stepper motors to have different pressure advance values while still
using the same trapq.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2022-01-16 19:01:15 -05:00
Nitram 54acca37ba
delta: max z-accel and speed ratio calculation for deltas (#4689)
Adding a possibility to use a lower z- acceleration.

Signed-off-by: Martin Malmqvist <volcomosq@gmx.com>
2021-11-29 13:21:26 -05:00
Kevin O'Connor afd1058af6 delta: Don't limit XY+Z moves to max_z_velocity
Scale the max_z_velocity limit by the amount of movement in the Z.
This should improve bed_mesh and vase mode prints on delta printers.

Reported by @hywelmartin and @dalegaard.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-11 11:53:00 -04:00
Kevin O'Connor de38ef4290 kinematics: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-01 19:12:30 -04:00
Kevin O'Connor 01ab8267a6 hybrid_corexy: Improve Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-30 13:10:45 -04:00
Kevin O'Connor d7b04aa18f delta: Make the 'arm_length' description more clear in save_state()
Reported by @conlank.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-09-02 11:46:33 -04:00
Kevin O'Connor 809f1ccea6 stepper: Add mcu_to_commanded_position() method
Convert stepper.get_past_commanded_position() to the more general
stepper.mcu_to_commanded_position().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-22 11:10:19 -04:00
Tircown a143921534
idex_modes: Fix get_status (#4550)
Fix get_status to be called without eventtime parameter.

Signed-off-by: Fabrice GALLET <tircown@gmail.com>
2021-08-01 15:10:45 -04:00
Kevin O'Connor cbd5680ae0 extruder: Add get_trapq() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-29 16:35:30 -04:00
Kevin O'Connor e2f483aea3 trapq: Rename trapq_free_moves() to trapq_finalize_moves()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-29 16:35:30 -04:00
Tircown 4d559633e3
kinematics: Add dual_carriage to hybrid-corexyz (#4296)
- 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>
2021-06-27 18:37:05 -04:00
Kamil Trzcinski d2c2aaf55d extruder: expose `can_extrude` flag based on temperature
Sometimes an automated filament load is implemented,
but extruder might not always extrude filament.

This adds a flag to check if this operation is possible.

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
2021-06-14 12:56:50 -04:00
Kevin O'Connor c0d860487a stepper: Remove set_tag_position() code
Have callers store the stepper positions in a dict.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-05-29 21:54:34 -04:00
Kevin O'Connor 77bc5e4388 stepper: Improve get_past_commanded_position()
Pass a print_time instead of a clock to get_past_commanded_position().
Fix calculation on steppers that home and use an inverted direction
pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-05-29 21:29:00 -04:00
Tircown f2c74ec023
kinematics: Add hybrid-corexy and hybrid-corexz (#4229)
Signed-off-by: Fabrice GALLET <tircown@gmail.com>
2021-05-03 14:31:23 -04:00
Kevin O'Connor 5a5ecd88e2 stepper: Do not set min_stop_interval in micro-controller
The min_stop_interval safety check is fragile and leads to a notable
amount of complexity.  Avoid these issues by not programming this
safety check.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:09:08 -04:00
Kevin O'Connor 20245d2e46 rotary_delta: Fix typo in get_status() homed_axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 23:05:34 -04:00
Kevin O'Connor d77928b17b extruder: Support looking up an extruder position from a past time
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-13 15:19:43 -05:00
Kevin O'Connor 64b3e5642e heaters: Make sure set_temp() command wakes up the idle_timeout
Introduce a heaters.set_temperature() command and call that from
commands that set a heater temperature.  This new function calls
toolhead.register_lookahead_callback() so that the idle_timeout gets
notification that activity has occurred.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-05 18:59:01 -05:00
Kevin O'Connor c5a9d7914b extruder: Make sure to flush steps during sync_stepper()
The stepper positions will only be in sync after the step generation
code has been flushed.  This fixes an "internal error in stepcompress"
error during a SYNC_STEPPER_TO_EXTRUDER command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-26 20:11:39 -05:00
Kevin O'Connor 611b76369f winch: Improve python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-17 22:54:16 -05:00
Kevin O'Connor c8434ec54b kinematics: Calculate axis_minimum/axis_maximum in advance
Calculate the get_status() axis_minimum and axis_maximum fields in
advance so that they don't need to be calculated on each get_status()
call.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-01-08 11:52:28 -05:00