Commit Graph

1073 Commits

Author SHA1 Message Date
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
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
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 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 25389027de Revert "endstop_phase: wip"
This reverts commit f2e4653ca4.

Revert incomplete testing code that was accidentally committed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-28 20:42:33 -04:00
Kevin O'Connor f2e4653ca4 endstop_phase: wip 2021-04-28 20:32:14 -04:00
Dmitry Butyugin 3b33d6652f resonance_tester: Refactored the testing code
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-28 12:36:23 -04:00
Johannes Stuettgen ed6ab6b9cc screws_tilt_adjust: Add MAX_DEVIATION parameter for bed level invariant.
This is useful when a saved bed mesh is used to ensure that the bed level
has not drifted too far from where it was when the mesh was created.

Signed-off-by: Johannes Stuettgen <johannes.stuettgen@gmail.com>
2021-04-28 11:53:18 -04:00
nlef 2d2db0f839
probe: Add deactivate_on_each_sample: param for Probe (#4161)
Signed-off-by: Nick Lefskiy <n.lefskiy@yandex.ru>
2021-04-24 13:39:58 -04:00
Dmitry Butyugin 200b62bcb4 adxl345: Verify the register writes, added debug adxl345 commands
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-24 13:15:17 -04:00
Clifford Roche 3a023d0ff4
palette2: Fix get_status (#4171)
Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2021-04-15 13:53:06 -04:00
Clifford Roche e7b0e7b43b
palette2: Add ping variation + ping status reports (#4114)
Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
2021-04-14 11:37:24 -04:00
Arksine 60372fd0cf bed_mesh: introduce "faulty_regions" option
Users may define "faulty regions", locations within the mesh where a probed value is unreliable. When bed mesh generates points it will substitute points in faulty regions with up to 4 points nearest to the region. After calibration is complete the Z values at these points will be averaged and assigned to the original value inside the faulty region.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2021-04-10 11:16:07 -04:00
Arksine 5f5dfbaa7f bed_mesh: Allow user to clear the relative_reference_index via gcode
If a negative number is specified for the RELATIVE_REFERENCE_INDEX parameter clear the internal relative_reference_index.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-04-10 11:16:07 -04:00
Kevin O'Connor 49a2b0354f statistics: Export the OS and process load in a get_status() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-09 20:27:38 -04:00
le-Bark eb4abdd830
pca9533: RGB support for the mightyboard (#4150)
Signed-off-by: Marc-André Denis <marcadenis@msn.com>
2021-04-09 17:47:16 -04:00
le-Bark 317402d5ba
hd44780_spi: added lcd support to the mightyboard (#4121)
Signed-off-by: Marc-André Denis <marcadenis@msn.com>
2021-04-07 21:07:23 -04:00
Dmitry Butyugin 165d2fc228 resonance_tester: Fixed multi-point resonance testing
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2021-04-07 19:05:23 -04:00
Kevin O'Connor b5b2fe2d2b bed_mesh: Perform initialization from klippy:connect instead of klippy:ready
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:50:38 -04:00
Kevin O'Connor 3cfc42e54a bltouch: Minor indentation change
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor 2a9a133f36 bltouch: Raise the probe as soon as the endstop triggers
Start the raise sequence once the endstop notification arrives.  This
can reduce the response time as it does not require waiting for the
homing sequence to fully finalize.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor c9ae89e142 bltouch: Use hmove.check_no_movement() to verify bltouch deployed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-02 13:43:01 -04:00
Kevin O'Connor cdaf9379b0 pause_resume: Perform setup via "klippy:connect" instead of "klippy:ready"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-01 10:10:39 -04:00
Arksine 74d527776e bed_mesh: lookup the toolhead object in "handle_connect"
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2021-04-01 09:32:23 -04:00
Kevin O'Connor d609753a6a gcode_move: Make sure to call reset_last_position() in _handle_ready()
If reset_last_position() is invoked prior to the printer being
"ready", then the transform may not be properly accounted for.  Handle
this by calling reset_last_position() when the printer becomes
"ready".

This should fix some "must home first" errors on extrude-only moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-31 22:15:54 -04:00
Kevin O'Connor 3390088d3a skew_correction: Register during "connect" phase instead of "ready" phase
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-31 22:13:36 -04:00
Kevin O'Connor 58a0eb76c5 homing: Pass the HomingMove class to homing_move_begin/end events
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:20:57 -04:00
Kevin O'Connor 37a263c0b9 homing: Move homing logic from manual_stepper.py to homing.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:20:57 -04:00
Kevin O'Connor 38719c1359 homing: Extract out movement verification to new check_no_movement()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor d39f849203 homing: Separate homing/probing movement logic to its own class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 5002dda37c homing: Move home_axes() into cmd_G28()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor df56c723b9 homing: Minor simplification of verify_movement tracking
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 862d3f9633 homing: Move low-level probing logic from probe.py to homing.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-29 21:17:53 -04:00
Kevin O'Connor 00706dec21 output_pin: Fix bug in setting of self.resend_interval
Only set resend_interval if a mcu_duration is specified.  This fixes a
bug introduced in commit 861144d8.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-03-27 14:52:21 -04:00