Commit Graph

2102 Commits

Author SHA1 Message Date
Kevin O'Connor 6c8d1ddaec bltouch: Ensure the z_offset is not negative
It would not make sense to have a negative z_offset.  Reported by
@Yoyolick.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-22 15:30:25 -04:00
Matthew Lloyd c2907c998c
screws_tilt_adjust: Add DIRECTION parameter to SCREWS_TILT_CALCULATE (#4357)
Signed-off-by: Matthew Lloyd <github@matthewlloyd.net>
2021-06-22 15:18:05 -04:00
Kamil Trzcinski f1091a484b virtual_sdcard: add `file_path` and `file_size` to `status`
This provides a comprehensive information if currently
we have a file loaded.

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
2021-06-22 15:15:03 -04:00
Eric Callahan 7ced62ab9c dotstar: report color data via get_status()
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-06-18 10:53:12 -04:00
Arksine 65afad9428 neopixel: report color data via get_status() method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-06-18 10:53:12 -04:00
Kamil Trzciński 46f51b2bb0
print_stats: add `cancelled` when `CANCEL_PRINT` used (#4366)
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>
2021-06-14 15:09:55 -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 0bc0767997 stepper: Restore mcu_position on set_stepper_kinematics() and set_step_dist()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-11 23:13:05 -04:00
Kevin O'Connor 1506043477 stepcompress: Add missing functions to stepcompress.h
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-11 23:12:16 -04:00
Kevin O'Connor acdad76408 klippy: Add a newline between initial error message and hint text
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-10 21:30:09 -04:00
Kevin O'Connor bc29ee1c6d homing: Check for failures during multi-endstop homing
If any endstop reports a failure, then stop homing on all endstops.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor 983951443c mcu: Enable trdispatch infrastructure during homing
Separate out trsync handling from endstop handling in mcu.py code.
Enable the low-level trdispatch C code.

This is in preparation for multi-mcu homing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor e1f7748e1a trdispatch: Support fast responses to trsync_state messages
Add C code that can process trsync_state messages and dispatch
responses with low-latency.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor b6d8cf27d2 serialqueue: Add serialqueue_send_one() helper function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor c53e8c7d4a serialqueue: Add "fast reader" support
Add ability to run C code directly from the low-level socket reading
thread.  This enables host based low-latency handlers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor 620f77ddb7 msgblock: Add clock estimation helper functions
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor f938caa0d2 msgblock: Add msgblock_decode()
Add function that can parse a simple VLQ encoded message to an array
of integers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor 1865080a07 msgblock: Move message manipulation code from serialqueue.c to new msgblock.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor 2559a2dd5a pollreactor: Move C pollreactor code from serialqueue.c to its own file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor 05c2d51a12 trsync: Introduce new "trigger synchronization" support
Separate out the stepper stopping code from endstop.c into its own
trsync.c code file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor f3bd4e6acf probe: Call add_stepper() earlier in boot process
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:35 -04:00
Kevin O'Connor ecbfa76242 mcu: Raise config_error (not protocol error) on pin enumeration errors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:26 -04:00
Kevin O'Connor 31fcd491fd serialhdl: Support prepending a warn_prefix to error and log messages
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-09 18:58:26 -04:00
Eric Callahan 3fcce4bb4b bed_mesh: implement BED_MESH_OFFSET
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>
2021-06-08 00:02:35 -04:00
Eric Callahan 4dfe01a2cd bed_mesh: move the "fade offset" out of the ZMesh
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>
2021-06-08 00:02:35 -04:00
Kevin O'Connor be4fb7f128 endstop_phase: Unify phase conversion code
Introduce a new PhaseCalc class and use that for both homing and
ENDSTOP_PHASE_CALIBRATE.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-06 20:41:27 -04:00
Dmitry Butyugin 4596a244e3
resonance_tester: Set max_accel ignoring the limit from the config (#4174)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-06-06 13:04:53 -04:00
Kevin O'Connor 93b9a85d19 endstop_phase: Add support for reporting phase information via get_status()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-06-03 22:27:30 -04:00
Michael Rose 27f8cf025e
z_tilt: expose an 'applied' status to allow macros to skip QGL/Z_TILT_ADJUST (#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>
2021-06-02 11:11:19 -04:00
Paul McGowan c148f17ea3
neopixel: add sync parameter to prevent waking toolhead (#4339)
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>
2021-06-02 10:51:45 -04:00
Stefan Dej b5e4f3d204
gcode: Update gcode descriptions (#4335)
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>
2021-06-02 10:45:27 -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
Alex Zellner 341fc64a67
gcode_macro: add description property (#4317)
Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
2021-05-26 14:21:21 -04:00
Florian Heilmann ba3bbca861
gcode_macro: Disallow whitespace in macro name (#4312)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2021-05-26 13:03:10 -04:00
Florian Heilmann cf61ca301b safe_z_home: Simplify logic and fix edge case
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2021-05-26 12:57:31 -04:00
Jason S. McMullan 913649de2e loop_sdcard: Add loopable SD card file sections
To support continuous belt printing, add nestable repeat
loop support via an `[sdcard_loop]` module.

Supported G-Code:
  - SDCARD_LOOP_BEGIN COUNT=n  ; Loop for N times, or infinitely if N is 0
  - SDCARD_LOOP_END            ; End of loop
  - SDCARD_LOOP_DESIST         ; Complete all loops without iterating

Marlin M808 compatibility example in `config/sample-macros.cfg`:
  - M808 Ln        ; Loop for N times, or infinitely if N is 0
  - M808           ; End of loop
  - M808 K         ; Complete all loops without iterating

Added unit tests in test/klippy/sdcard_loop.test

See https://reprap.org/wiki/G-code#M808:_Set_or_Goto_Repeat_Marker

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
2021-05-26 11:57:57 -04:00
Alex Zellner 60352f4b67
filament_motion_sensor: add get_status (#4281)
Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
2021-05-11 13:17:22 -04:00
Arksine dc71b64c0a virtual_sdcard: fix check for case sensitive files
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-05-11 13:15:56 -04:00
Dany Yanev b333547f1f
menu: Fixed typo when reading `print_stats.state` (#4261)
Fixed typo when reading `print_stats.state` causing some of the menus to now show up.

Signed-off-by: Dany Yanev <yanev89@gmail.com>
2021-05-06 11:54:27 -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 89082b494f klippy: Report known software versions on a protocol error during connection
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-05-02 17:51:15 -04:00
Kevin O'Connor edea52863a endstop: Report trigger time in endstop_query response
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:40:37 -04:00
Kevin O'Connor 470b1e2e46 adxl345: Use "clock" suffix instead of "time" in commands
The debugging code knows how to handle fields that end in "clock".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:40:37 -04:00
Kevin O'Connor b611e72a19 pulse_counter: Use "clock" suffix instead of "time" in commands
The debugging code knows how to handle fields that end in "clock".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:40:37 -04:00
Kevin O'Connor 8f76e53c0e stepper: Remove min_stop_interval from mcu code
Now that the host never uses a min_stop_interval, remove it from the
mcu code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:26:19 -04:00
Kevin O'Connor b1ea4f3bef toolhead: Do not limit SET_VELOCITY_LIMIT to values specified in config
Allow a larger velocity, accel, and square_corner_velocity than what
is specified in the config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:26:19 -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 0a4a64058d probe: Use original XY position on multiple probe samples
On some kinematics it's possible for the XY position to change
slightly during a probing move.  Return back to the original XY
position on a probe lift so each probe attempt starts at the same
nominal position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-28 21:40:49 -04:00
Kevin O'Connor 0990a3da6f gcode: Generate M115 output even if command not sent from gcode pseudo-terminal
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-28 21:40:03 -04:00