R Still missing, also might be somewhat dirty since code is converted
into G1 commands.
Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
During a "drip feed" move, both the move's maximum speed and maximum
acceleration may be limited by the kinematics.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a helper class for tracking gpio outputs that are synchronized to
bus updates on a particular command queue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rework the spi_config commands so that bus configuration and shutdown
message configuration is done separately from the main "config_spi"
command. This makes the spi configuration more flexible. It's now
possible to use software spi without a CS pin. It's now possible to
define multiple SPI messages to send on a shutdown event.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
use SET_GCODE_OFFSET's MOVE=1 parameter in the z offset menu.
Less confusing for people who think nothing happened.
Signed-off-by: John "Fess" Fessenden <fess@fess.org>
It's not necessary to fully build up the look-ahead queue prior to
starting a "drip move" homing operation. Instead, allow the
look-ahead queue to flush normally.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If the homing move is exceptionally long, it could take a long time
for the host to process the look-ahead queue. Delay the print_time
calculation until moves are ready to be sent.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the commands.
The main reason for this change is to force a micro-controller code
updated (due to important bugfix in 7fefe52d).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The current z_hop support did not work correctly with common slicers
that change Z height between retract and unretract, and it did not
work correctly with slicers that issue a retract at the end of a print
and then at the beginning of the next print.
The z_hop support is therefore being removed until these issues can be
fixed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't default to a Z location of 10, as that could cause damage if the
probe's z_offset is greater than 10. Instead, use the "retract
distance" method that is used for normal multi-sample probing.
Update the PROBE_ACCURACY command parameter names to use the same
parameter names as the PROBE command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that homing is implemented via "drip moves", it is no longer
necessary for the stepcompress code to have special homing logic.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that homing is implemented via "drip moves", it is no longer
necessary to move the print_time backwards.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that homing is implemented via "drip moves", it is no longer
necessary to round the homing speed and it is no longer necessary to
add a delay for cpu processing time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rework the low-level implementation of homing movement. The existing
mechanism buffers all homing movement into the micro-controller prior
to starting the home. Replace with a system that buffers all movement
into the host look-ahead buffer and then "drip feed" those moves to
the micro-controllers. Then clear the host look-ahead buffer when all
endstops trigger.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Finish Moves needs be a hard requirement for the event gcodes, as it eliminates the possiblility of an event firing while the gcode is executing.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It really helps to see a snapshot of available printer variables when building menus and macros. The list of variables always depends on what printer config you have.
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This moves skew_correction configuration out of printer.cfg. It is now dynamically set by the SET_SKEW gcode.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add support for enabling the stepper via the communication channel.
This improves support for boards with a shared enable line.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
A print_time of zero may translate to a negative clock on a secondary
micro-controller, which would cause an internal error. Change the
code to pass a real print_time or None if it is not needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Only the tmc2208 driver needs special read register translation logic.
Rework the code so a default implementation is available for all the
other drivers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the serial command wrapper class from serialhdl.py to mcu.py.
This will allow that class to better support higher level
functionality.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce a main send_with_response() helper function and use it
during identify and the setup of clocksync.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
An extra to execute gcode when a hardware button is pressed or released. Uses the jinja2 templating system.
Inspired by pull request #545 from Miguel Moitinho miguel@moitinho.net and pull request #1098 from Paulo Drugos paulodrugos@gmail.com
Signed-off-by: Alec Plumb <alec@etherwalker.com>
Add PROBE_SPEED, SAMPLES, SAMPLE_RETRACT_DIST, SAMPLES_TOLERANCE,
SAMPLES_TOLERANCE_RETRIES, and SAMPLES_RESULT parameters to the PROBE
command (and to commands that indirectly invoke a probe).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Make sure to configure DRVCONF with SDOFF=0 prior to writing DRVCTRL
as that field controls access to that register.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support retrying Z_TILT_ADJUST a configurable number of times
to a configurable tolerance both in the config or as parameters.
- By default keeps original behavior of no retries.
- Adds parameters RETRIES and RETRY_TOLERANCE to QUAD_GANTRY_LEVEL gcode.
- adds config options retries and retry_tolerance to uad_gantry_level]
- issues an error if we are getting worse intead of approaching tolerance
- issues an error if retries were requested but we did not reach the tolerance
in the specified number of retries
the minimum change should be a single z step for those
probing 2 points for 2 stepper motors and 3 for 3 stepper motors.
at one point it was suggested to use the amount of z adjustment instead of the
range of the probed points as a trigger for retry. I've chosen not to do this.
using z adustment in these cases means the minimum unit of change is related to
the angle created by the probed points and the distance to stepper motor and
can be more than a couple steps which is rather unintuitive.
for the case when someone is using more probed points than z steppers the
probed points range will have some fixed minimum value that can't be reduced
which is also unintuitive but that case should idealy be the rarer case, and
the user can learn to set a higher tolerance that matches their probing setup.
Signed-off-by: John "Fess" Fessenden <fess@fess.org>
Support retrying QUAD_GANTRY_LEVEL a configurable number of times
to a configurable tolerance both in the config or as parameters.
- By default keeps original behavior of no retries.
- Adds parameters RETRIES and RETRY_TOLERANCE to QUAD_GANTRY_LEVEL gcode.
- adds config options retries and retry_tolerance to `[quad_gantry_level]`
- issues an error if we are getting worse intead of approaching tolerance
- issues an error if retries were requested but we did not reach the tolerance
in the specified number of retries
Signed-off-by: John "Fess" Fessenden <fess@fess.org>
List all the configurable parameters in the tmc5160 example block and
use similar wording as the other tmc drivers.
Also, don't allow DEDGE to be configured as it would just break the
current code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce TMCMicrostepHelper and TMCStealthchopHelper helper code that
uses the mcu_tmc interface. Update the callers to use these new
helpers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Perform the register initialization directly from TMCCommandHelper and
perform it during the "connect" phase. This unifies the register
setup for the TMC2130, TMC2208, TMC2660, and TMC5160.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use a get_register() method instead of get_response(). This makes the
tmc2660 class more similar to other TMC drivers. It also enables
DUMP_TMC to dump all the readable content.
Also, use the tmc2130.get_config_microsteps() helper.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Reduce the delay in send_with_response() by introducing a reactor
mutex to wake the main thread when the response is obtained.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow the callers of process_batch() to directly inspect the gcode
mutex. Those callers can then directly invoke run_script().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If commands are slowly fed to the printer it could cause the number of
queued commands to grow without bound. Be sure to pause the incoming
command stream even if the lookahead queue is empty.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>