Commit Graph

696 Commits

Author SHA1 Message Date
Kevin O'Connor 0ae20421d1 neopixel: Allow host software to configure neopixel timing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-15 13:29:43 -04:00
Piotr Usewicz 939b575b01
bed_mesh: Fix typo (#2692)
Signed-off-by: Piotr Usewicz <piotr@layer22.com>
2020-04-14 22:09:28 -04:00
Kevin O'Connor a028aeaf78 Revert "bltouch: No need to pause the toolhead for PWM off commands"
This reverts commit 5c8d15bbee.

The lower_probe() code was already manually optimizing the timing of
the pwm disable, and that conflicted with the optimization in commit
5c8d15bb.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-04 18:51:53 -04:00
Kevin O'Connor 5c8d15bbee bltouch: No need to pause the toolhead for PWM off commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor 9f2a025762 bltouch: Don't assume reset will do a pin_up in test_sensor()
Some clones don't raise the pin on a reset and the ANTClabs BL-Touch
sometimes doesn't raise the pin either.

Rework the (infrequently called) sensor test code to always issue a
pin_up command before the touch command.  Also, perform a reset and
retry if the sensor test fails.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor 2b916e79c7 bltouch: Call sync_print_time() on multi_probe_end()
Be sure to fully raise the probe prior to starting any future toolhead
movements in the multi_probe_end() case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor 5e207d2baa bltouch: Apply reset command for a full second on a raise_probe() failure
If an error is found during the pin_up_not_triggered check, then apply
the reset command for a full second (instead of just 100ms).  This
gives the bltouch more time to check its internal state.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor 3646cc0140 bltouch: Separate out pin_up_not_triggered case in raise_probe()
Simplify raise_probe() by separating out the pin_up_not_triggered
case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Kevin O'Connor 87bfa06b9e bltouch: Don't raise an error in verify_state()
Return the triggered state from verify_state() and update the callers
to raise the error (if needed).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-02 08:25:22 -04:00
Jeremy Briffaut 6be552f6e6 Allow manual_stepper to run in parallel than an other stepper
Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-23 14:43:34 -04:00
Kevin O'Connor 6b7e917a8e statistics: Exit loop as soon as MemAvailable found
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 22:04:40 -04:00
Kevin O'Connor 6aae62542c statistics: Add system stats
Report os load, process cpu time, and system available memory to each
statistics report.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-22 20:02:51 -04:00
Kevin O'Connor d3a7d992aa display: Remove unused self.lcd_type variable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-21 12:12:29 -04:00
kakou-fr 961f68629a
manual_stepper: Fix sensorless endstop for manual_stepper (#2621)
Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
2020-03-20 21:11:36 -04:00
Kevin O'Connor 5e39d346ed display: Use the active extruder in the default 16x4 screen layout
Change the default layout to show the active extruder (not always the
first extruder).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:50:38 -04:00
Kevin O'Connor f2dd4b001d display: Use a separate display group for 16x4 multiple extruders
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-13 21:46:36 -04:00
Kevin O'Connor 986e9c884a display: Fix percent progress rendering on 16x4 multi-extruder layout
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:55:53 -04:00
Arksine aa7d24b0af display: add support for multiple displays
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-03-08 17:38:24 -04:00
Kevin O'Connor 6d5ce309a5 menu: Remove the "test" menu from the default menu
It is likely only developers will be interested in testing the menu
system, so no need to have it in the default menu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:24 -04:00
Kevin O'Connor d39c4fe628 menu: Disable support for "deck" and "card" menu items
Disable support for customizing the main lcd display content via the
menu system.  Advise users to use the new display_data config sections
as a replacement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:24 -04:00
Kevin O'Connor 2cf03ffa23 display: Replace hard-coded display with new config based display
Introduce a new config based system for specifying the on-screen
contents of an lcd screen.  The default screen configuration (found in
klippy/extras/display/display.cfg) is the same as the previous
hard-coded display, so this should not change behavior for existing
users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:38:21 -04:00
Kevin O'Connor 5acc181624 display_status: Separate out M73 and M117 handling to new module
Move M73 and M117 handling from display.py to a new display_status.py
module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-08 17:36:14 -04:00
Kevin O'Connor a61d483e21 tmc_uart: Use nominal mcu frequency in baud calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-06 16:29:18 -05:00
Kevin O'Connor a074af7c87 adc_temperature: Add builtin definition for PT1000 sensors
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-05 11:46:01 -05:00
Kevin O'Connor d6c2e24f4c tmc5160: Support setting GLOBALSCALER to fine tune current selection
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-03-04 19:40:32 -05:00
David Smith c0f72a2c38
safe_z_home: Support note_z_not_homed() in kinematics (#2500)
Signed-off-by: David Smith <davidosmith@gmail.com>
2020-03-01 23:00:41 -05:00
Denis Ignatenko f84542cd20
hall_filament_width_sensor: Added virtual runout sensor (#2535)
Signed-off-by: Denis Ignatenko deniss979@gmail.com
2020-03-01 22:05:12 -05:00
Kevin O'Connor c197fdb03d heater: Fix misspelling of Celsius
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-27 11:31:51 -05:00
FanDjango 16ecf15a91
bltouch: BTLOUCH V3.0/V3.1 Enable 5V/OD mode set commands (#2540)
Signed-off-by: Mike Stiemke <fandjango@gmx.de>
2020-02-23 22:32:07 -05:00
Kevin O'Connor 245917bf03 mcu: Introduce new lookup_query_command() command wrapper
Use new mcu.lookup_query_command() for all commands that query
information from the micro-controller.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-02-20 13:24:53 -05:00
Kevin O'Connor 332038ea01 serialhdl: Convert queries to use new notify message ack system
Convert standard queries to use the acknowledgments of the sent
command to determine if the response was received or not.  This also
controls command retransmissions (should the response have been lost).

The tmc_uart.py will continue to use the old mechanism as the tmcuart
responses are not sent synchronously with the query command.

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 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
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 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 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 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