Move the "motor_off_timeout" tracking to a new module in the extras/
directory. This makes it easier to customize the idle timeout
behavior.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The junction_deviation configuration parameter has a number of quirks
that make it difficult to configure. Replace it with a
"square_corner_velocity" configuration parameter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It's rare to have all the Z stepper locations directly under the
printable surface, so using z_positions for points is not a good
default.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allocate the stepper_kinematics directly in mcu.py - that way the
kinematic classes don't have to interact with the chelper code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move extruder.py, cartesian.py, corexy.py, and delta.py to a new
kinematics/ sub-directory. This is intended to make adding new
kinematics a little easier.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't issue a get_config command after building the config as the
built config may contain time sensitive initialization commands.
Instead, send the config and init commands immediately after invoking
the build_config() callbacks. This avoids some rare "timer too close"
errors during configuration.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Switch the host code from the CLOCK_MONOTONIC clock to the Linux
specific CLOCK_MONOTONIC_RAW clock. It's common for ntp to slew the
CLOCK_MONOTONIC clock to account for drift, and that can break the
host's ability to make accurate predictions of the micro-controller
clock. This could lead to "move queue empty" errors. The
CLOCK_MONOTONIC_RAW clock is not slewed and thus should not have this
problem.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add M117 and M73 to the list of supported G-Codes.
Also, remove M117 from the list of commands reported by the HELP
command as that command is typically only used to list "extended
g-code" commands.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add generic temperature smoothing to the Heater class. This is useful
to avoid min_extrude_temp and verify_heater errors due to measurement
noise.
Rename the pid_deriv_time config option to smooth_time so that the
smoothing amount need only be specified once.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Extend the ADC out of range check so that it is possible to sample
multiple times before going into a shutdown state. This reduces the
chance that measurement noise will cause an error. In an actual over
temperature (or under temperature event) it is expected that the
sensor will consistently report the problem, so extra checks for an
additional second or two should not substantially increase risk.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add mcu support for periodically polling for a button press. Add host
code support for registering buttons and invoking callbacks for them.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add the ability to register callbacks - both asynchronous (ie, from
another thread) and synchronous.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add an ability to run a series of g-code commands from a reactor
callback that isn't part of the normal g-code command processing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Font from fntcol16.zip package:
ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
(c) Joseph Gil
Font is public domain
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Update the target temperature during the pid calibration. This gives
additional feedback to the user and it makes it less likely that a
verify_heater error will be raised during calibration.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the display code into its own directory. This is in preparation
for splitting it up into its own modules.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When M117 is followed by an empty string, the display will reset to
Klipper's default.
Internal modules may look up the display and directly call
set_message(), with a timeout if desired.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
- Add M73 support for HD44780
- Include HD44780 USB and SD glyphs to differentiate progress type
- Fix bug that prevented M73 from updated when virtual_sd is enabled
- Add 5 second timeout to reset display when not Printing
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It appears the st7920 requires a longer delay when switching from
command to data mode (and vice-versa). Slower MCUs don't show a
problem because the klipper command processing time results in a
sufficient delay. However, some of the faster MCUs can process
klipper commands fast enough that the next st7920 transfer is sent too
fast. Add an additional delay to account for this.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The different uses of get_position() can be confusing, so choose a
different name for the ProbePointsHelper callback.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the trilateration algorithm to mathutil.py. It may be useful
outside of delta kinematics, and it complicates the delta code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>