Commit Graph

2932 Commits

Author SHA1 Message Date
Kevin O'Connor 7b90830ae5 serialqueue: Remove unused serialqueue_encode_and_send() function
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor 98c7c7603e basecmd: No need for finalize_config command to send "config" response
The host code always issues a get_config command immediately after
finalize_config, so there is no need to send the two config response
messages.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 12:01:21 -05:00
Kevin O'Connor e03f75e758 tmc: Revert incorrect changes to TPWMTHRS setting
It's not valid to set the TPWMTHRS in a "klippy:connect" event handler
because the TMCVirtualPinHelper and TMCCommandHelper classes were
expecting that field to be set during the config reading phase.

Revert "tmc: Fix typo preventing stealthchop threshold from being set"
This reverts commit 7d76067ff9.

Revert "tmc: Query the stepper step_distance from the stepper object"
This reverts commit 67b2852249.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 11:41:35 -05:00
Kevin O'Connor 15f21be5ec manual_stepper: Support ignoring errors on STOP_ON_ENDSTOP
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 13:38:22 -05:00
Kevin O'Connor 804f95ebe4 homing: Don't raise a TimeoutError from home_wait()
Change home_wait() to return if the homing operation completed
succesfully or not.  This simplifies the callers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 12:20:00 -05:00
Kevin O'Connor fbbbbc85cf homing: Replace notify callback with a completion
Update the endstop code to return its trigger completion object during
home_start().  Update the toolhead class to take a completion object
(instead of creating its own).  This reduces the number of
intermediate callbacks needed during a homing operation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 11:45:44 -05:00
Kevin O'Connor e3a5e2d271 reactor: Support multiple waiting timers on a single completion
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-19 10:49:56 -05:00
Kevin O'Connor 0e37f8c9b3 graph_extruder: Internal updates to graph calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 12:38:45 -05:00
Kevin O'Connor 17f2b4e960 config: Fix minor typo in printer-lulzbot-taz6-2017.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 12:11:19 -05:00
Chris Lee 90500c331a config: Update TAZ6 configuration
Support probing the corner washers for the bed tilt using G29,
flesh out the rest of the configuration for the display, and add
support for the Aerostruder (commented out by default).

Signed-Off-By: Chris Lee <clee@mg8.org>
2020-02-18 12:10:09 -05:00
Kevin O'Connor 29c6c89327 probe: Don't allow errors to propagate from "gcode:command_error" event
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-18 11:47:04 -05:00
Matt Shirley 477b83469c
config: add mesh_min to printer-wanhao-duplicator-9-2018.cfg (#2525)
This is a small change I forgot to make when copying my config to this template.

Signed-off-by: Matt Shirley <mdshw5@gmail.com>
2020-02-17 20:59:08 -05:00
Christian S aa0a889b04
menu: Set speed for move actions (#2520)
Signed-off-by: Christian Schnellrieder <schnellrieder.cs@gmail.com>
2020-02-17 20:52:54 -05:00
Kevin O'Connor 01d985a739 docs: Recommend RPi 2 or later in Installation.md
Reported by @patrickkettner.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 20:49:32 -05:00
Kevin O'Connor 5304c4141c filament_switch_sensor: Query "printing" status instead of tracking it
It's simpler to query the "printing" status from the idle_timeout
module on an event than it is to track changes to the printing status.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 17:07:54 -05:00
Kevin O'Connor b6368173cf filament_switch_sensor: Collapse event disable flags
Introduce min_event_systime and rework the previous start_time,
last_event_time, and event_running flags into this one state tracking
variable.

This also makes a minor change to the behavior of the event_delay - it
is now calculated from the time the command completes execution
(instead of from when the event is first detected).  This may make a
difference if there is a long running g-code command occurring during
the detection event.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 16:57:27 -05:00
Kevin O'Connor 6716007420 filament_switch_sensor: Minor optimization to note_filament_present()
Avoid calling into the OS to obtain the system time if the filament
state hasn't changed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-17 16:51:00 -05:00
Arksine 718da75910 filament_switch_sensor: Add a get_status() method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
Arksine 9415071482 filament_switch_sensor: Execute events using reactor callbacks
This removes the possibility of re-entry to callers of  note_filament_present().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
Arksine 740c0ae636 filament_switch_sensor: Replace BaseSensor with RunoutHelper
Rather than inherit from the BaseSensor, filament sensor implementatons
may instantiate the RunoutHelper and update the filament state via its
note_filament_present method.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-17 16:48:43 -05:00
FanDjango 086c131bbf bltouch: Add support for stow_on_each_sample
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-15 17:58:56 -05:00
Kevin O'Connor 1dd952ac65 probe: Add multi_probe_begin() / multi_probe_end() callbacks
Add support for notifying the low-level probing handlers that a
multiple probe sequence is occurring.  This is in preparation for the
bltouch code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor 5bca4e6fa1 gcode: Add a "command_error" event notifier
Allow other modules to be notified if there is a gcode command error
detected.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor 1aa11fed8c homing: Add a "home_rails_begin" event notifier
Also, rename the "homed_rails" event to "home_rails_end".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Kevin O'Connor feb15eaf2e homing: Merge home_prepare()/home_finalize() into move_begin/move_end events
Collapse the "homing:move_begin", "homing:move_end", home_prepare(),
and home_finalize() into two new events: "homing:homing_move_begin"
and "homing:homing_move_end".  This simplifies the homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-15 17:52:44 -05:00
Arksine b23346a521 bme280: handle read timeout exceptions
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-02-14 17:25:08 -05:00
test3210-d 9a65a4569b hall_filament_width_sensor: Add new filament sensor
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
2020-02-14 13:14:34 -05:00
Kevin O'Connor 049d8c2a94 config: Update description of z_hop in safe_z_home
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-14 12:42:21 -05:00
Kevin O'Connor b5c967acd8 stm32: The stm32f1 can only reach 64Mhz when using an internal clock
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-14 12:11:50 -05:00
Kevin O'Connor c3899cefa8 configfile: Add get_status() to export raw config file information
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 22:04:40 -05:00
Kevin O'Connor fd6baa3d16 config: Minor wording change to gcode_macro rename_existing description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 21:52:00 -05:00
Kevin O'Connor 79ce3ef1c5 test: Add printer-wanhao-duplicator-9-2018.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-13 20:53:30 -05:00
Matt Shirley b0b950b7e1
config: Add Wanhao Duplicator 9 MK1 (#2497)
Also applies to the Monoprice Maker Pro MK1.
This config is based on the version from Chris Barnes (https://www.facebook.com/Jarannis)
found on https://pastebin.com/raw/wm8PQezy. This config was mostly working and I
only had to change a few things:

  - updated key names for min_point and max_point to mesh_min and mesh_max
  - enabled PID control
  - tweaked bounds to allow movement during mesh leveling
  - removed all comments
  - decreased homing speed slightly
  - sane bed mesh sample defaults

In response to Kevin O'Connor:

- remove pressure_advance setting from extruder section
- remove respond section
- remove pause_resume section

Signed-off-by: Matt Shirley <mdshw5@gmail.com>
2020-02-13 20:52:31 -05:00
Kevin O'Connor 9818055ac3 gcode_macro: Support overriding of builtin g-code commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 20:42:03 -05:00
Kevin O'Connor 0cfab84e1a gcode: Return previous handler from register_command(cmd, None)
When overriding a g-code command, allow the caller to obtain the
previous command handler.  Use this feature in homing_override and
safe_z_home.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 20:19:18 -05:00
Kevin O'Connor 512ad4b3a4 query_endstops: Add get_status() method that reports the last query state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-12 19:32:48 -05:00
FanDjango 4d9a36b34f
homing: Ability to set retract speed between homing moves (#2487)
On the retract move between homing moves, use a different speed (typically a faster one).

Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-12 10:09:39 -05:00
FanDjango cb042e749d
homing_heaters: Turn off heaters during homing/probing (#2486)
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-12 10:08:30 -05:00
David Smith 596f5e3e3a
stepper_enable: Add SET_STEPPER_ENABLE gcode command (#2463)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-02-10 22:34:11 -05:00
Kevin O'Connor 7d76067ff9 tmc: Fix typo preventing stealthchop threshold from being set
Fix typo introduced in commit 67b28522.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-09 15:38:47 -05:00
Kevin O'Connor 6f4822fe96 stm32: Fix typo that broke selection of alternate serial port pin
Fix a typo in commit aea15250.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-09 12:01:43 -05:00
Kevin O'Connor b3a180ea77 graph_extruder: Add in older pa algorithms for reference
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-03 16:42:57 -05:00
Kevin O'Connor 2336d2d6ab config: Fix generic-fysetc-f6.cfg stepper_z cs_pin
Reported by @jourjine

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-03 15:45:46 -05:00
David Smith b6779cc019
delayed_gcode: Fix definition reference for UPDATE_DELAYED_GCODE (#2465)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-02-03 15:32:44 -05:00
Kevin O'Connor 68e59528a4 endstop_phase: Query the stepper step_distance from the stepper object
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-01 21:58:14 -05:00
Kevin O'Connor 67b2852249 tmc: Query the stepper step_distance from the stepper object
Don't obtain the step_distance from the config, instead obtain
step_distance from the instantiated stepper object.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-01 21:58:11 -05:00
Kevin O'Connor c36fe76d69 probe: Add support for configuring lift_speed
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-31 15:47:06 -05:00
Kevin O'Connor e3dde19932 test: Add generic-bigtreetech-skr-v1.4.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-28 12:16:05 -05:00
Junliang Yan f29022499e config: Add Skr v1.4 configuration (#2423)
Signed-off-by: John Yan <john.yan1019@gmail.com>
2020-01-28 12:13:54 -05:00
Kevin O'Connor 5ca132eafa stepcompress: Fix rounding error when interval=0
In the rare case where the step generation code finds an interval of
zero, it was possible for an integer division of a negative number to
cause an incorrect result.  Fix that by using the idiv_up() and
idiv_down() helpers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 14:20:44 -05:00