Commit Graph

1336 Commits

Author SHA1 Message Date
Kevin O'Connor d3afe4f1d8 trapq: Initial support for building a queue of trapezoidal velocity moves
Add support for building a list of moves in the trapq.c code.  Update
the toolhead code so that moves generated from the look-ahead code are
added to that list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor c06f6943a6 list: Add additional list helper functions
Add list_is_first, list_is_last, list_last_entry, and list_prev_entry
helper functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor fdbdb3c707 trapq: Add new trapq.c file with code for trapezoidal velocity handling
Move the "struct move" code from itersolve.c to new file trapq.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 374eb98765 polar: Implement bed angle wrapping adjustments in chelper code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 92993c062b itersolve: Rename calc_position to calc_position_cb
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 9945cc0f46 itersolve: Fix possible infinite loop in itersolve_gen_steps()
If the kinematic position calculation function had an error in it (if
it produces sudden position changes) then it could lead to an infinite
loop in itersolve_gen_steps().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 15:51:51 -05:00
Kevin O'Connor 5eb5841eaf mcu: Contact and identify all the mcus prior to configuring them
Break up the connect phase into two phases - mcu_identify and connect.
The first phase will contact all the micro-controllers and obtain the
"identify" data dictionaries for them.  Once all the micro-controllers
have been contacted, then they can be configured.  This fixes an issue
with FIRMWARE_RESTART not working correctly on multi-mcu setups that
use restart_method=command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-11-06 10:35:24 -05:00
Kevin O'Connor 430ad0b658 virtual_sdcard: Only return from M25 after print confirmed paused
Wait in the M25 command handler until the work_handler() background
timer fully exits.  This ensures that subsequent g-code commands (such
as M27 or M24) will correctly report a paused state.

Reported by @foosel.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-31 11:36:35 -04:00
Kevin O'Connor 40e2c64c82 clocksync: Fix typo in pause() call at connect time
The initial clock measurement wasn't properly implementing a small
delay between clock queries.  Fix the pause() call so there is a small
delay between queries.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-31 11:36:35 -04:00
Kevin O'Connor 0ba5819370 tmc_uart: Don't try to configure analog pins to -1 value
Commit 6f5f2a3b incorrectly altered the analog mux pin config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-26 11:33:30 -04:00
Kevin O'Connor 6f5f2a3bc7 tmc_uart: Make sure to set analog mux pins after a restart
Don't assume the analog mux pins are in a low state at startup.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-24 22:00:58 -04:00
Arksine dd12c981ef temperature_fan: add get_status() function
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-10-22 22:10:13 -04:00
Arksine d85b395a9c bed_mesh: fix error reporting
Fix invalid string formatting in the parse_pair() helper.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-10-22 22:09:33 -04:00
Geoff Shannon 789659599c adc_temperature: add support for AD849x thermocouple amplifiers (#1994)
Signed-off-by: Geoff Shannon <geoffpshannon@gmail.com>
2019-10-10 20:11:34 -04:00
Kevin O'Connor 6d7d079bab tuning_tower: Only cancel tuning tower test if extrude at notably lower z
Some print start scripts may extrude at a position slightly higher
than the first z layer height.  Tweak the backwards z test to reduce
the chance of the tuning test ending prematurely.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-04 20:10:12 -04:00
Master92 2b553a8108 safe_z_home: Fix unintended change in default behavior
PR #1970 introduced a new parameter, controlling the default behavior of the safe_z_home-module. To avoid unexpected changes, the default of the move_to_previous is now defaulted to False.

Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-10-03 18:06:08 -04:00
Jason S. McMullan 7605244fa0 safe_z_home: Fix issue where 'home_xy_position: 0,0' did not position at 0,0
If '[stepper_x]' and/or '[stepper_y]' have a 'position_min' that is
non-zero, and '[safe_z_home] home_xy_position' is '0,0'; then the 'G28'
command will _not_ move to '0,0'; but stay at 'position_min' during the
Z endstop test.

This fix corrects this issue.

Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
2019-10-03 18:05:21 -04:00
Nicholas Seckar 004edb9613 fan: Add off_below option for fans (#1897)
Below off_below the fan will be turned off. When configured correctly this
can prevent stalling, which may lead to overheating and failed fans. To
simplify calibration and use of this setting, off_below is applied in the
input duty cycle domain, prior to any scaling due to e.g. max_power.

Signed-off-by: Nicholas Seckar <nseckar@gmail.com>
2019-10-03 17:59:03 -04:00
Kevin O'Connor 698159921f tuning_tower: Tool for tuning parameters based on print Z height
This adds a testing tool that can run a command on each Z layer of a
print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-10-01 14:46:24 -04:00
Julien Lirochon 0c247e55e6 probe: Add range to probe accuracy results (#2015)
Signed-off-by: Julien Lirochon <julien@lirochon.net>
2019-09-29 16:56:46 -04:00
Kevin O'Connor 9fcd3e75cd toolhead: Fix velocity jumps in accel_to_decel lookahead processing
When reducing the maximum speed due to the max_accel_to_decel setting,
move velocity limits must still be propagated.  Otherwise, the
trapezoid move planner may produce moves with velocity jumps.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-26 11:10:36 -04:00
Petri Honkala f8f0c3f142 z-tilt: Unresolved symbol fixed
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
2019-09-24 12:17:03 -04:00
Piotr Usewicz a92bdf1d54 gcode_arcs: Use is operator for Null comparison (#1989)
Signed-off-by: Piotr Usewicz <piotr@layer22.com>
2019-09-23 16:49:52 -04:00
Piotr Usewicz 6b2b8f31ee gcode_arcs: Remove unused variables (#1988)
Signed-off-by: Piotr Usewicz <piotr@layer22.com>
2019-09-23 16:49:17 -04:00
achmed20 fce98c5519 gcode_arcs: use z-height defined in f2/3 code, if present
Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com>
2019-09-18 11:57:16 -04:00
Kevin O'Connor 8c69e1bcfe gcode: Allow M105 to produce output if called from a macro
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-18 09:58:16 -04:00
Master92 3a37d4a208 safe_z_home: Hop only if necessary and add option to move xy back
Once a hop is performed, it will only be re-issued if the z-axis has been
moved in the meantime. Usually it is only moved by a z-homing so doing so
will cause safe_z_home to do the hop on the next homing action.

When z-axis is homed, x and y positions are known. When setting this
boolean option, these are set back to their last positions.

Whenever a hop is specified it is re-issued after the Z axis has been
homed. This is especially necessary when a pressure-based probe is used.
Also, the module decides if a hop is necessary, based on either a known
Z position or a flag that is set whenever the motors are disabled.

Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-18 09:37:33 -04:00
John Jardine 020ca5ac2c samd_sercom: fix pin enumeration error when mcu is specified
Previously, when a sercom pin specified the mcu (myname:PIN), it would result in a pin enumeration error.

Signed-off-by: John Jardine <john@gprime.net>
2019-09-17 13:28:57 -04:00
Master92 fd2f17f847 controller_fan: Replace else followed by single if with elif
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-17 11:52:03 -04:00
Master92 4e09cacece controller_fan: Use keyword arguments to improve readability
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-17 11:52:03 -04:00
Master92 4fab93a8b0 controller_fan: Use snake-case for all variables and function-names
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-17 11:52:03 -04:00
Master92 6333dc2069 controller_fan: Use _ to declare discarded return value
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-17 11:52:03 -04:00
Master92 6250157397 controller_fan: Declare instance-attribute in __init__
Signed-off-by: Nils Friedchen <Nils.Friedchen@googlemail.com>
2019-09-17 11:52:03 -04:00
Kevin O'Connor 43103929e3 temperature_fan: Allow min_speed to be set to zero
Reported by @meteyou.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-14 15:35:09 -04:00
Kevin O'Connor 63311b2348 bltouch: Improve handling of low pin_move_time configuration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-14 15:16:26 -04:00
Aleksej Vasiljkovic 7d8c70363a gcode_arcs: Add support for G2/G3 commands
R Still missing, also might be somewhat dirty since code is converted
into G1 commands.

Signed-off-by: Aleksej Vasiljkovic <achmed21@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-13 11:57:54 -04:00
Arksine 49779f13a2 filament_switch_sensor: Add a delay between dispatch of pause and execution of pause gcode
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2019-09-08 20:42:43 -04:00
Julien Lirochon 12feb6d7fb configfile: Fix the exception raised when an included file is missing (#1931)
Signed-off-by: Julien Lirochon <julien@lirochon.net>
2019-09-01 18:28:18 -04:00
Kevin O'Connor 05edd556c3 toolhead: Fix homing moves not apply kinematic acceleration limits
During a "drip feed" move, both the move's maximum speed and maximum
acceleration may be limited by the kinematics.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-01 18:21:05 -04:00
Kevin O'Connor 296ab7d402 klippy: Warn if starting klippy with logging disabled
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-09-01 18:09:20 -04:00
Kevin O'Connor 1b454c0943 mcu: Prevent "math domain errors" in stats calculation
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-30 13:57:07 -04:00
Kevin O'Connor a67451fa36 console: Update for PinResolver changes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 23:52:02 -04:00
Kevin O'Connor b4280fdfe0 board_pins: Improve config error checking
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 21:58:11 -04:00
Kevin O'Connor bfbcb90751 board_pins: Add a new "extras" module to support per-board pin aliases
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 12:57:59 -04:00
Kevin O'Connor 395429be14 pins: Move reserved pin handling into PinResolver class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 12:57:59 -04:00
Kevin O'Connor a482ddf582 tmc2209: Add support for sensorless homing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 12:05:09 -04:00
Kevin O'Connor 96fdb6ef36 uc1701: Add support for a reset line on SSD1306 displays
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-17 22:14:02 -04:00
Kevin O'Connor 05bb5484b4 bus: Add MCU_bus_digital_out helper class
Add a helper class for tracking gpio outputs that are synchronized to
bus updates on a particular command queue.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-17 22:14:02 -04:00
Kevin O'Connor a3980cebcc neopixel: Add support for WS2811 RGB pixel color order
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-09 20:58:49 -04:00
Florian Heilmann 3d38211b8a extra: Add Safe Z home extra
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2019-08-09 20:49:17 -04:00