Commit Graph

856 Commits

Author SHA1 Message Date
Kevin O'Connor 1d21bf66c6 homing: Handle speed rounding when homing speed greater than max_velocity
Commit 002dc0df added rounding to the homing speed, but it did not
work if the configured homing speed was less than the printer's
maximum velocity.  Move the speed rounding from stepper.py to
homing.py and make sure the rounded speed is less than the maximum
speed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-20 14:41:20 -05:00
Kevin O'Connor 1b07505973 chipmisc: Add multi_pin capability
Add the ability to alias multiple output pins from a single pin alias.
This makes it possible to support some cases where a single logical
output is driven by multiple output pins.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 21:00:06 -05:00
Kevin O'Connor 3c5649219f chipmisc: Add support for output pins set at runtime
Add the ability to define output pins that may be set at runtime with
a new SET_PIN extended g-code command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 20:59:07 -05:00
Kevin O'Connor 68d03e4a3e mcu: Allow both shutdown and startup values to be set for output pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 20:45:00 -05:00
Kevin O'Connor e6e0a21b06 toolhead: Allow junction_deviation to be set to zero
Allow lookahead to be effectively disabled by setting
junction_deviation to zero.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 20:44:59 -05:00
Kevin O'Connor 0e0780a460 logextract: Update file comment
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-18 12:14:10 -05:00
Kevin O'Connor 9a4425c85a docs: Update square test print to contain notches on inside of square
Add additional notches and move them to the inside of the square where
they will not impact the outside perimeter test.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-17 12:18:25 -05:00
Kevin O'Connor 57c27f75ae gpiocmds: Clear SPF_NEXT_* flags on new schedule_soft_pwm_out
Properly handle the (unlikely) case that a schedule_soft_pwm_out
command is received before a previous command is fully processed,

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-16 20:21:38 -05:00
Kevin O'Connor 8d62318c5f clocksync: The clock estimate should add the rtt time not subtract it
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-16 20:21:38 -05:00
Kevin O'Connor add528532e logextract: Rename extractconfig.py to logextract.py and add shutdown parsing
Add initial support for extracting out shutdown information from a
klippy.log file.  The shutdown dump will be reordered into the
sequence that they occurred, and timestamps/sequence numbers in the
mcu message dump will be expanded.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-16 20:21:34 -05:00
Kevin O'Connor 8944e2104d docs: Add FAQ item on AVR watchdog restart failures
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-11 18:17:14 -05:00
Kevin O'Connor 319221ee23 docs: Provide additional information on "make flash" failures
Add some additional information on "make flash" problems.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-11 17:33:29 -05:00
Kevin O'Connor 4a5801bb2e pins: Fix atmega168/328 mappings
The atmega168 and atmega328 need to define PE0 and PE1 in order to
support the 2 extra analog pins.

Also, support the arduino mappings for the atmega328.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-09 11:48:26 -05:00
Kevin O'Connor f8acf0f54f delta: Default stepper_b/c position_endstop to stepper_a's
If the position_endstop is not set for stepper_b or stepper_c then use
the value from stepper_a.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-08 18:20:04 -05:00
Kevin O'Connor bc5d900e61 delta: Support different arm lengths for each tower
Change the config file so that the delta arm length is specified
per-tower.  This makes it possible to support advanced calibration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-08 18:20:04 -05:00
Kevin O'Connor efb4a5daa1 delta: Rework actuator_to_cartesian() using trilateration
Use the formulas for trilateration (instead of the circumcenter
formulas) when calculating the position of the nozzle from the
position of the carriages.  The trilateration formula is more general
and it allows each tower to have a different arm length.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-08 18:09:19 -05:00
Kevin O'Connor e0c947e188 mcu: Store MCU_stepper commanded_pos as a float
It's valid to consider the stepper at a position that is not on a step
interval - only the "mcu position" needs to be an integer.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-07 18:14:50 -05:00
Kevin O'Connor 3ffab763c0 stepper: Only align the stepper motor to a full step when requested
Add a new config option 'homing_endstop_align_zero' to enable the
alignment of the endstop to a stepper full step.  It's possible one
may wish to specify a homing_endstop_phase while not aligning the
endstop.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-07 17:35:19 -05:00
Kevin O'Connor ef09ac5a7f extractconfig: Add helper script that extracts config files from a log
Add a helper script that can read a klippy.log file and extract the
printer.cfg files from it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 21:23:24 -05:00
Kevin O'Connor f6d4284d5c homing: Directly interact with the kinematic class on query_endstops()
Move the query_endstop logic out of toolhead.py and into homing.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:54 -05:00
Kevin O'Connor 8d9ca6f2dd homing: Directly interact with the kinematic class when homing
Move the homing logic out of toolhead.py and into homing.py.  This
simplifies the toolhead logic and centralizes the homing code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:54 -05:00
Kevin O'Connor 1d6af72de5 mcu: Remove unneeded MCU_digital_out.get_last_setting() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:54 -05:00
Kevin O'Connor 2a8dd5c51f mcu: Reset the stepper step clock on init - not after each motor on
Reset the last step clock during the init phase and after each home -
this simplifies the runtime code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:54 -05:00
Kevin O'Connor c78f66b8e8 mcu: Be sure all moves are completed before raising a home timeout
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:54 -05:00
Kevin O'Connor b340fdcc4a homing: Make sure to clean up homing state even if homing fails
Make sure to always call MCU_endstop.home_wait() if
MCU_endstop.home_start() is invoked.  Rename
MCU_stepper.note_homing_triggered() to note_homing_end() and make sure
it is always called if MCU_stepper.note_homing_start() is invoked.

With these changes, MCU_endstop.home_finalize() is no longer needed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 19:13:53 -05:00
Kevin O'Connor 7785d3a87d homing: Pass list of endstops (not steppers) to the homing code
The homing code wants the list of endstops to enable during a homing
operation - it's confusing to pass the steppers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:49:14 -05:00
Kevin O'Connor 31db4cc772 mcu: Make sure steppers added to an endstop are on the same mcu
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor 7932de11a7 mcu: Make sure all endstop objects are disabled on a reconnect
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor bc9cbc8133 gcode: Move SET_SERVO command from gcode.py to chipmisc.py
Now that commands can be registered dynamically, move the code for
SET_SERVO from gcode.py to the PrinterServo() class in chipmisc.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor b5a41d0dd1 gcode: Rework gcode handler setup to allow dynamic command registration
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor 64a091fb98 gcode: Add a get_str() method
Add a get_str() method that can extract a required parameter from a
g-code command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor 80f23441dd gcode: Simplify exception handling
Translate caught exceptions into a gcode.error() exception.  This way
there is one standard place to invoke respond_error().  Also, always
reset the last_position on a handled error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:51 -05:00
Kevin O'Connor 3a2d16abb3 gcode: Always allow M112 command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-06 18:35:49 -05:00
Kevin O'Connor c70cc8fadb klippy: Always recommend a FIRMWARE_RESTART on a shutdown event
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-03 19:52:25 -05:00
Kevin O'Connor 10e11950ae stepper: get_homed_offset() should return a float
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-12-03 19:48:47 -05:00
Kevin O'Connor 37788c1e55 docs: Add a FAQ document
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-30 15:19:40 -05:00
Kevin O'Connor 6d6638826c stepcompress: Fix proactive queue flushing on move with 64K+ steps
Commit e05c6354 changed the internal step compress queue from 64bit
integers to 32bit integers.  However, that commit broke the proactive
flushing of moves that could produce more than 64K steps.  This could
lead to large memory allocations and cpu slow downs on printers that
had a very large Z axis - possibly leading to a "Timer too close" mcu
shutdown.  Correct the code so that it properly generates a 64bit
flush clock.

Also, be sure to only expand / memmove the queue when there is no room
for a new element at the end.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-29 20:24:50 -05:00
Kevin O'Connor 6930a7de8d homing: Base homing cpu delay on estimated number of steps needed
Instead of adding 250ms to each homing operation add a time relative
to the number of estimated steps that are to be generated.  This
scales the delay to really large axes without adding a delay for
normal users.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-29 19:55:25 -05:00
Kevin O'Connor 6bbb84326d docs: Add further details on how to report a bug
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-21 18:27:22 -05:00
Kevin O'Connor 8c2fa2e2d6 stepper: Support for multiple steppers controlling a single axis
Allow multiple steppers to be defined for a single cartesian axis.
This adds support for dual-z setups.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:37:04 -05:00
Kevin O'Connor 38643f52c9 stepper: Add get_endstops() / set_position wrappers
Add wrappers around mcu_endstop and mcu_stepper so that the kinematic
classes do not need to directly access these low-level classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:36:45 -05:00
Kevin O'Connor eecf3b6ea8 stepper: Store pointers to step_const and step_delta in PrinterStepper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:29:23 -05:00
Kevin O'Connor fc1d690d75 stepper: Remove unused variables from PrinterStepper class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:29:23 -05:00
Kevin O'Connor d10380e73f stepper: Additional code comments
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:29:23 -05:00
Kevin O'Connor aaeda540b6 stepper: Calculate the stepper name directly from the config section
There is no need to pass the name to the PrinterStepper class as it
can determine the name itself.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-18 17:29:22 -05:00
Kevin O'Connor fda988889b heater: Avoid math errors on extreme ADC readings
Avoid log(0) and divide by zero errors in the thermistor calc_temp()
method.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-13 11:07:20 -05:00
Kevin O'Connor b58a897b70 config: List E1 micro-step pins in order in generic-rambo.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-11-08 11:14:37 -05:00
Kevin O'Connor 84d8cf9b7e config: Add a generic-printrboard.cfg file
Add an example config file for the Printrboard board.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-30 10:56:08 -04:00
Kevin O'Connor 8463a83324 graphstats: Fix graphing script
Update the graphstats.py graphing script so that it works with recent
stats changes - the stats can now contain groups that end with a ':'
and the print_time is no longer reset to zero on a new print.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-29 20:36:33 -04:00
Kevin O'Connor fc0e016a6d docs: Note version 0.5.0 release
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-10-25 11:27:20 -04:00