M105 expects get_temp method. Module crashes when gcode_id parameter
is set and M105 called. Add methods as hotfix.
Signed-off-by: Robert Pazdzior <robertp@norbital.com>
Introduce a new handle_fault() method to handle processing of sensor
faults. This simplifies the calc_temp() methods.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Send the fault information explicitly in the query_thermocouple fault
field for max6675, max31855, and max31865.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a tmc driver can't find the stepper config section it reports a
"missing microsteps" error which can be confusing. Provide a more
explicit error message.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Added a SET_DIGIPOT command to the mcp4018 implementation.
Previously the mcp4018 was read only, and set at the time of
configuration. This allows you to change the value during a
print, which is needed for some older printers that need to
lower the stepper current during preheating.
Signed-off-by: Jake Bordens <jake@allaboutjake.com>
Also added status report for extruder_stepper objects with the
current pressure advance parameters values.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Removes a call to gcmd.respond_info which writes 'VARIABLE SAVED' to the
console every time the SAVE_VARIABLE command is called.
Signed-off-by: Andre LeBlanc <mapleleafmakers@gmail.com>
Raised from issue #5645, UTF-8 encoded symbols or other unexpected symbols on the UART raise an exception which causes klipper to stop. This change support UTF-8 encoded characters (from file names) as well as ignoring unexpected bytes.
Signed-off-by: Clifford Roche <clifford.roche@gmail.com>
An mcu device acting as an "mcu bridge" should only be reset after
other normal devices are reset - otherwise the bridge wont be able to
pass along the reset message to the downstream mcus.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Starting with nodeid 4 instead of nodeid 0 can reduce bitstuffing of
the id field in common configurations.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The `logging.basicConfig` does not reconfigure default logger.
This results in printing only warnings/errors to stderr
instead of also info (or debug).
This fixes the issue by setting log level on root logger.
Signed-off-by: Kamil Trzciński <ayufan@ayufan.eu>
Calling python functions can have high overhead. Inline the
twos_complement code in the _extract_samples() inner loop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The MPU9250CommandHelper() class is nearly a duplicate of
ADXL345CommandHelper(). Rename ADXL345QueryHelper() to
AccelCommandHelper and remove user facing references to "adxl345". Use
it directly from mpu9250.py .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The mpu9250.ClockSyncRegression() class is a duplicate of
adxl345.ClockSyncRegression(). Remove the duplicate copy and use the
code from adxl345.py .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The MPU9250QueryHelper() class is a duplicate of ADXL345QueryHelper().
Rename ADXL345QueryHelper() to AccelQueryHelper() and use it directly
from mpu9250.py .
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Adds a save_config_pending_items to the status reported by
configfile reflecting the items and values that a future
SAVE_CONFIG would actually persist.
Signed-off-by: Kurt Haenen <kurt.haenen@gmail.com>
Just log an error on a fault.
Remove the host check for min/max temperature as the micro-controller
code already implements that check.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allows a limited number of DS18B20 read failures
before stopping the printer. This is designed to
tolerate spurious read errors, while still stopping
for serious issues.
The printer will stop when the sensor
fails to report a value five times in a row.
Implementation works as follows:
The MCU reports any read errors using a new "fault"
parameter in its answers.
The Python code tracks the number of errors
and triggers the shutdown. This paves the way for
more sophisticated error handling in the future,
as well as an example for other sensors to follow.
Signed-off-by: Lorenzo Pfeifer <Lorenzo.Pfeifer+github@googlemail.com>
Adding Klipper functionality to support cancelling objects while
printing.
This module keeps track of motion in and out of objects and adjusts
movements as needed. It also tracks object status and provides that to
clients.
The Klipper module is relatively simple, and only provides one piece of
the workflow. Moonraker already supports processing uploaded files to
insert the required gcode markers for cancelling objects, using
https://github.com/kageurufu/cancelobject-preprocessor. This library is
also available as an executable for use in slicers, and pip
installations also include the script as a callable.
Mainsail has integrated support, and code changes for Fluidd are
available. Support in other interfaces is planned, and we've spoken to
several other developers about integrating frontend support in their
projects.
Signed-off-by: Troy Jacobson <troy.d.jacobson@gmail.com>
Co-authored-by: Franklyn Tackitt <git@frank.af>
Co-authored-by: Eric Callahan <arksine.code@gmail.com>
Add PROBE and CHIP to TEST_RESONANCES
Since it's possible to specify more than one chip
in TEST_RESONANCES the CHIP parameter has been
renamed to CHIPS
Signed-off-by: Mikkel Schmidt <mikkel.schmidt@gmail.com>
Make sure whitespace isn't in the pin description. Also make sure an
alias doesn't map to an invalid pin.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor indentation and variable name changes.
Don't remove linebreaks from message_protocol_error lines.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The MCU protocol error message often confuses users, especially after getting bombarded with the config format error line. This PR tries to improve it and has the following goals:
- Put the technical error at the end to prevent confusion and avoid the immediate jump to help channels instead of continuing to read
- Inform the user first what the type of error is (In this case: MCU Protocol error) and not at the end of the long error message
- Give the users a clear instruction what to do (pretty much unchanged), but possibly more approachable because the user is not confused by the technical error anymore
- Shows the version numbers of Klipper separate from all MCU version numbers so that it is more obvious that this is the version of Klipper
- Separates the version numbers between outdated MCUs and up-to-date MCUs, so that it becomes obvious if a MCU flash failed because the MCU doesn't disappear from the outdated list
- Previously, when viewing the errors in a web frontend, additional line breaks made it extremely hard to read the message, sometimes with as little as one word on one line. The error messages are now formatted to not have rogue line breaks, improving readability.
Signed-off-by: Felicia Alexa Hummel <felicia@drachenkatze.org>