Commit Graph

2980 Commits

Author SHA1 Message Date
Kevin O'Connor 57ca91a875 quad_gantry_level: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor d4adeda76b manual_probe: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor dce46ea053 z_tilt: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor ff6c11e827 probe: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 1746148a45 firmware_retraction: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 5fe5e21508 heaters: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor c186766708 configfile: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 9b6010dc7b extruder: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 6869611147 cartesian: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor ec0e3e710c toolhead: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor b0d9a82718 virtual_sdcard: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 48ebb6959d skew_correction: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 433c8c937a respond: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 5a0b9d1ce8 display_status: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor 98c9a991a3 bed_mesh: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor c0796bc42d gcode_arcs: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor c79f135cd5 gcode: Use new GCodeCommand wrappers in command handlers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Kevin O'Connor ddb8311890 gcode: Create new wrapper class for gcode command parameters
Instead of passing a dictionary to the command handlers, create a
wrapper class and pass that class to the command handlers.  This can
simplify the command handler code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-05 11:08:11 -04:00
Dushyant Ahuja 1eb2d4da90
docs: Clarify that Probe_Calibrate uses the speed variable for XY as well (#2735)
Signed-off-by: Dushyant Ahuja <dusht.ahuja@gmail.com>
2020-05-05 09:03:39 -04:00
Kevin O'Connor 9a92b346fd itersolve: Use more explicit list traversal in itersolve_generate_steps()
Avoid using doubles as flags when generating steps during "lead up to
stepper activity".  Instead, explicitly track how many inactive move
entries are skipped and only generate steps for those entries.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-04 14:00:53 -04:00
Kevin O'Connor 7843c23b8c itersolve: Fix numeric stability of flush range times
Don't assume the times passed to itersolve_gen_steps_range() are
contained within the move.  It's possible the checks in
itersolve_generate_steps() may round to different values when
converting the times to a relative move time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-04 10:24:46 -04:00
Lucio Tarantino dac42efbd9
htu21d: Support for HTI21D family sensor on I2C bus (#2803)
Signed-off-by: Lucio Tarantino <lucio.tarantino@gmail.com>
2020-05-03 18:47:24 -04:00
Arksine f8649b4ba9 stm32: Wait for setup complete to enable ep0 rx in usbotg.c
Endpoint 0 OUT needs to NAK everything until the core signals that the
setup stage is complete.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-03 12:00:47 -04:00
Kevin O'Connor e93c188766 stm32: Wait for setup complete notification in usbotg.c
A setup packet is only valid after receiving the "setup complete"
notification.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-03 11:27:43 -04:00
Janne Grunau 0aa78ec76e
linux: Adapt servo0 channels for beagleboard kernel 4.14.108-ti (#2746)
The beagleboard TI kernel 4.14 and 4.19 contain a commit which change
the device names ("pwm: Create device class for pwm channels") from
pwmN to pwm-${chip}:N. This commit was never merged into the upstream
kernel.

Decrease the number of pwm channels to a more reasonable 16. Increase
the number of pwm chips to 8 since the replicape servo pwm outputs are
on pwmchip4.

Update replicape code to detect appropriate channel.

Signed-off-by: Janne Grunau <janne-gh@jannau.net>
2020-05-03 11:24:42 -04:00
andryblack db732e58db linux: change clock frequency
Increase timer resolution for linux mcu

Signed-off-by: Andrey Kunitsyn <blackicebox@gmail.com>
2020-05-02 16:38:56 -04:00
Kevin O'Connor f4429a54a9 clocksync: Don't filter any of the initial syncronization clock messages
Add a 50ms delay from the initial clock measurement to the first
get_clock query.  Disable the prediction_variance filter on each
get_clock query so that none of those measurements are ignored.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-02 11:08:02 -04:00
Hywelmartin 07e8011f51
config: Update printer-anycubic-kossel-plus-2017.cfg (#2775)
horizontal_move_z: 20 instead of 5... there has been some support Q about this..

Signed-off-by: Martin Malmqvist <hywelmartin@gmail.com>
2020-05-02 09:31:23 -04:00
Kevin O'Connor 3aacc4d6a2 gcode: Only call position_with_transform() when printer is ready
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-05-02 07:35:23 -04:00
Kevin O'Connor b6ebf5cb09 stm32: Slow ADC frequency to 4.5Mhz
There are reports that SKR mini boards have more stable ADC results
when running the ADC at a slower frequency.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-30 19:47:23 -04:00
Kevin O'Connor 1460e0d6f4 config: Add printer-sovol-sv01-2020.cfg example config
Reported by @lalek54.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-29 21:13:11 -04:00
Kevin O'Connor 5c9551dc72 test: Add printer-tronxy-p802m-2020.cfg to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-29 20:46:29 -04:00
camatthew88 81e71ce8f8
config: Create printer-tronxy-p802m-2020.cfg (#2796)
Signed-off-by: Matthew Blankenbehler <thecoolkids322@gmail.com>
2020-04-29 20:45:19 -04:00
Kevin O'Connor 8c2b62775d test: Fix commands.test so RESTART is run last
Commands after a RESTART aren't properly run on a test case, so only
run it last.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-28 22:53:12 -04:00
Kevin O'Connor bf6f84b82d docs: Note that printer.heater got changed to printer.heaters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-26 17:30:57 -04:00
Kevin O'Connor ced389f4f6 pid_calibrate: Fix module import
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:49:50 -04:00
Kevin O'Connor 17123889f6 heaters: Make heater.py an "extras" module
The heater logic is an independent module that does not need to be
treated as part of the "core" klipper code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:26:45 -04:00
Kevin O'Connor d858498a53 heater: Move M105 command handling from gcode.py to heater.py
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 14:26:28 -04:00
Kevin O'Connor 44f868a802 klippy: Add an is_shutdown() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:41:44 -04:00
Kevin O'Connor 86a99cf38e gcode_button: Simplify script execution
It's no longer necessary to queue gcode scripts - gcode.run_script()
now does that automatically.

Also, make release_gcode config optional.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:11:49 -04:00
Kevin O'Connor c590bf7643 probe: Rename probe_prepare/finalize to probe_prepare/finish
The probe_finalize() name is used for callbacks in both the
PrinterProbe and ProbePointsHelper classes.  Rename the PrinterProbe
callback to avoid confusion.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-25 12:01:52 -04:00
Kevin O'Connor 64031ab3d7 gcode: Rename respond() to respond_raw()
Rename the method to make it more clear that it is a low-level call
that should be rarely used.

Also, change gcode_button.py, hall_filament_width_sensor.py, and
tsl1401cl_filament_width_sensor.py to use respond_info() instead of
respond_raw().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 15:54:18 -04:00
Kevin O'Connor 61524542d2 gcode: Don't export respond_error()
Don't export the respond_error() method as callers should raise a
gcode.error() instead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:59:25 -04:00
Kevin O'Connor 568a0da50e virtual_sdcard: No need to call gcode.respond_error() on disk error
Report low-level disk errors via the log and use the normal sdcard
mechanism to report end of sdcard print to gcode users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:54:13 -04:00
Kevin O'Connor ed3e6b42c7 gcode: Raise a gcode.error() from G20 command
It's important to raise an error (instead of calling respond_error() )
so that a G20 will stop a virtual_sdcard print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 14:53:41 -04:00
Kevin O'Connor 9730be8e17 respond: Simplify M118 handling
No need to check for '#original' in params - it's always there.
Properly handle a lower case m118 command.  Don't register a help text
for the legacy M118 g-code command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 10:11:37 -04:00
Kevin O'Connor 3990d997de z_tilt: Raise a gcode.error() instead of directly calling respond_error()
Raising an error (instead of reporting an error) is important as only
a raised error will stop a print from virtual_sdcard.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-24 10:10:33 -04:00
Kevin O'Connor 43fa41c1af gcode_arcs: Disable E moves in absolute extrude mode
Commit 402110f6 didn't actually fix absolute extrude mode.  For now,
report an error if an extrude move is requested in absolute extrude
mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-23 10:05:05 -04:00
Kevin O'Connor fc627ec470 gcode_arcs: Minor cleanup of planArc()
Fix linear_travel optimization.  Use "2*pi" instead of "radians(360)".
Always emit at least one segment and always end at the final target
coordinates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 17:58:10 -04:00
Kevin O'Connor 402110f655 gcode_arcs: Fix Z moves and E moves
Fix Z moves so that the movement is spaced out among the arc movements.

Fix extrude moves when in absolute extrude mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 16:30:02 -04:00