Drop support for M303 and PID_TUNE, and replace it with a new
PID_CALIBRATE command. Move the logic for this command from heater.py
to a new pid_calibrate.py file in the extras/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the probe_z_offset parameter from delta_calibrate and
bed_tilt_calibrate to a z_offset parameter within the probe config
section. It's easier to understand the z offset setting when it is in
the probe config section.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a z_virtual_endstop is in use, then record the last XY position
that is used when the Z is homed. Use that XY position to report what
change is needed to the z position_endstop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the digital_output, pwm_output, and static_pwm_output config
sections to output_pin and move to a new module in the extras/
directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the code for the static_digital_output config section from
chipmisc.py to a new file in the extras/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It looks like OctoPrint is expecting the result from M114 to be
relative to the last G92 command. Also, introduce GET_POSITION to
report the actual location that the printer is at.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 9bc4239e now emphasizes the first line of a multi-line error
message, so rework startup_message to conform to that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Report the first line of a multi-line error message twice - once as
part of the informational content, and once with the "!!" error
prefix.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a heater falls out of the target range, accumulate the temperature
differences to determine if an error should be raised. This should
make it less likely to report an error for heaters that drift slightly
out of range, and it should make error reporting faster for heaters
that rapidly fall out of range.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
A default of 4 degrees and 10 seconds may be too aggressive - change
the default to 10 degrees and 15 seconds.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for additional carriages on cartesian printers. This is
used by some printers to handle multiple extruders.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Separate out the hd44780 screen drawing from the st7920 code. Use a
layout that takes advantage of the 20 columns. Add custom hd44780
fonts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for displaying basic status information on ST7920 and
HD44780 based LCDs that are attached directly to a micro-controller.
Signed-off-by: Marcio Teixeira <marcio@alephobjects.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support low-priority message transmits. This may be useful for bulk
commands that should be delayed util the comms are otherwise idle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a lookup_command() method to the SerialReader class that provides
a wrapper that stores the serial and commandqueue references. This
makes it easier to run the send() method.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add --always flag to "git describe" command to get a build identifier
even if one checks out the repo with a depth parameter that prunes out
the last tagged version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The multi-mcu clock syncing code relies on the ability to periodically
update the mcu clock adjustments. If a series of very long moves are
submitted then it is possible the adjustments could become unstable.
For example, if an adjustment is made to reduce a clock error over the
next couple of seconds, but it is applied to a longer period because
the next move lasts many seconds, then this would result in a bigger
adjustment for the following move, which would result in an even
bigger error when that move lasts many seconds. This can repeat until
the system destabilizes.
Check for cases where the print_time is far in the future of the
current estimated print time and average over a longer period in that
case. That should reduce the possibility of the adjustment code
becoming unstable.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for directly printing from a local file on the host. This
may be useful if the host cpu is not fast enough to run OctoPrint
well.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The bed_tilt_calibrate command determines the tilt of the bed.
However, we need to report the tilt compensation which is the negative
of the bed tilt.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of using the toolhead class to determine if stats should be
reported, allow every printer object with a stats() callback to
determine if stats are needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Average clock sync times over approximately 30 seconds instead of 120
seconds so that the clock prediction responds to changes faster.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use both load_config() and load_config_prefix() functions when
dynamically loading a module from the extras directory - if the config
section name has parameters in it then use load_config_prefix().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
OctoPrint (and other software) will sometimes send additional commands
even if the previous command has not yet responded with an "ok".
Change the g-code input reading code to keep reading input so that an
M112 can be detected (and processed out-of-order). To avoid the
extreme case where one writes an entire g-code file to the input
without any pacing, disable the input reading if more than 20 commands
are pending.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>