Commit Graph

3317 Commits

Author SHA1 Message Date
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
Kevin O'Connor 502e83725b stm32: Reset adc calibration prior to starting calibration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 11:23:58 -05:00
Kevin O'Connor bf3fa979f9 stm32: Increase adc sample time
Increase the sample time register from 3 to 4 (which adds about ~1.5us
to each adc sample).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 10:50:29 -05:00
Kevin O'Connor 264aac5856 scripts: Revert virtualenv workarounds
Revert "scripts: Disable "virtualenv setuptools" in install-octopi.sh script"
This reverts commit 5fc92ff6b7.

Revert "scripts: Install "virtualenv setuptools==44.0.0" in install-octopi.sh"
This reverts commit 730c7cfc20.

The online setuptools repository was fixed upstream, so it is no
longer necessary to implement a local virtualenv workaround.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-25 10:34:24 -05:00
mtw3d 2b3ea29f30 config: Add example printer-mtw-create-2015.cfg config file
Signed-off-by: Mike Payson <mike@mtw3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-24 09:28:03 -05:00
Kevin O'Connor ef4710c6e0 hd44780: Increase timeout to 40us
There have been several reports that increasing the delay from 37us to
40us eliminates screen corruption on some clone hd44780 displays.
Increase the timeout value so that the standard code works on these
displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-24 00:04:31 -05:00
Kevin O'Connor fe76fbe820 test: Add generic-simulavr.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 23:29:32 -05:00
Kevin O'Connor 6e020123c6 test: Add printer-monoprice-mini-delta-2017.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 23:29:32 -05:00
Kevin O'Connor 196210cad2 config: Fix file permissions of generic-flyboard.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 22:25:42 -05:00
Kevin O'Connor 2ea3631222 delta: Add print_radius option to customize valid XY radius
Add ability to override the default XY move checking radius.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 21:14:09 -05:00
Kevin O'Connor 8ed0f7c5c3 kinematics: Remove support for identifying Z steppers
The caller can now determine which steppers are connected to cartesian
Z movement via the new stepper.is_active_axis() method.  It is
therefore no longer necessary for the kinematic code to identify these
steppers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 20:47:01 -05:00
Kevin O'Connor d1972b1e9c itersolve: Add ability to query the active_flags state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 20:47:01 -05:00
Kevin O'Connor 8bf3e56301 config: Add example generic-flyboard.cfg config file
Reported by @DJDOUBLEG.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 19:23:00 -05:00
Kevin O'Connor fc6d045ded config: Add example generic-archim2.cfg config
Signed-off-by: Mike Payson <mike@mtw3d.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 18:32:52 -05:00
Kevin O'Connor 0160a7db9a config: Add an example generic-mks-sgenl.cfg config
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 18:07:34 -05:00
Kevin O'Connor ff0324b0c2 config: Add generic-mightyboard.cfg
Reported by @fragginright.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-01-23 17:49:10 -05:00