Commit Graph

2964 Commits

Author SHA1 Message Date
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
Kevin O'Connor ff28f33967 gcode_arcs: Simplify parameter parsing
Use the normal gcode.get_float() mechanism for extracting parameters
from the g-code command.

Don't register descriptions for the G2/G3 commands as the convention
is to only use descriptions for "extended g-code commands".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 16:19:15 -04:00
Kevin O'Connor 120331f49a safe_z_home: Simplify check for axes to home
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-22 11:55:25 -04:00
Kevin O'Connor 8ac81fed67 lpc176x: Add support for additional i2c buses
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-21 16:11:39 -04:00
Kevin O'Connor c5e7985740 neopixel: Make sure there is a minimum low duration after a long pulse
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-21 13:12:56 -04:00
Kevin O'Connor 9e8c4770ed rotary_delta: The get_status() method should take eventtime parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-20 22:36:00 -04:00
Kevin O'Connor 0b05a38361 config: Add tmc2130 example to generic-bigtreetech-skr-v1.4.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-20 22:19:42 -04:00
Kevin O'Connor 57be62b1ca config: Remove obsolete description of menu_root in example-extras.cfg
Reported by @ld3300.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-19 14:01:20 -04:00
Kevin O'Connor 06846313fd homing: Avoid divide by zero error on PROBE at minimum Z position
Reported by @proto3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-19 12:46:50 -04:00
Kevin O'Connor ee9657bbf6 docs: Note __test menu removed in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-18 12:08:57 -04:00
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
Kevin O'Connor a7f7cc5075 neopixel: Use names for key timing values
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-15 12:11:57 -04:00
Kevin O'Connor c7d6d81a4d test: Fix printer-tronxy-p802e-2020.cfg and add to printers.test
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-14 22:19:08 -04:00
camatthew88 f7d7df0b46
config: Create printer-tronxy-p802e (#2674)
Signed-off-by: Matthew Blankenbehler <mablankenbehler23@whitnall.com>
2020-04-14 22:14:07 -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 03fb7961b4 config: Use restart_method=cheetah in generic-fysetc-cheetah-v1.1.cfg
Reported by @csutcliff.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-08 12:27:01 -04:00
Kevin O'Connor 4ea7b213e2 config: Change uart addresses in generic-fysetc-cheetah-v1.1.cfg
Reported by @mihero and @Magoo0876.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-04-08 12:24:32 -04:00