Use the field names from the trinamic specification. This makes the
field similar to all the other driver_XXX config options.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
sense_resistor is now a mandatory parameter for tmc2660 blocks. Duet2 users should use a value of 0.051
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
Don't immediately raise an error if the heating_gain check fails.
Instead, just transition to the normal max_error check. This should
make the code less likely to raise an error should the heater have a
slow approach to the target temperature.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow the first check_gain_time interval to only require a
heating_gain relative to the lowest observed temperature during that
interval. This makes the code less likely to raise a spurious error
when the heater is enabled while the heater temperature is dropping.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't reset the error counter if the reported temperature is
significantly above the target temperature. This may help catch cases
where the temperature sensor reports random values.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This implementation includes a BaseSensor class that all underlying sensor implementations should subclass.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Support reading a "gcode_id" parameter from heater/sensor config
sections.
Signed-off-by: Douglas Hammond <wizhippo@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of directly turning off motors, heaters, and fans from
gcode.py, raise a new event and allow the heater, fan, and toolhead to
handle the event as needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit cf6c5e6f did not fix the shared heater case - a set_temp()
request takes the extruder id, not the heater id (nor the gcode sensor
id).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The gcode.py code should not peek into the heater classes to obtain
the gcode_id. Instead, introduce a new get_gcode_sensors() so that
the gcode.py code does not need to.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When setting a temperature, lookup the heater via
self.heaters.lookup_heater() and do not use the gcode ids. This fixes
temperature setting when multiple extruders share the same heater.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The 'bed_shape' option has been removed. The user will enter a 'bed_radius' if they have a round be, otherwise they should enter 'min_point' and 'max_point'. When the bed is round the user should supply a 'round_probe_count' option, otherwise just 'probe_count'.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use the field helper to simplify the bit manipulation in the driver.
This also enables the extended DUMP_TMC output.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Raise a printer.config_error() on an invalid register_command() call.
This error is easier to handle for the vast majority of callers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implementation of "PROBE_ACCURACY" to measure the maximum, minimum,
average and standard deviation of a probe.
Signed-off-by: Rui Caridade <rui.mcbc@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support added for filament diameter sensor. Sample configuration parameters added to example-extras.cfg.
Signed-off-by: Mustafa YILDIZ <mydiz@hotmail.com>
Adds the ability to register a custom/generic heater through a new extra called heater_generic.
This takes a gcode_id that is reported by M105. Adds a new command to set the temperature for any heater using the syntax:
SET_HEATER_TEMPERATURE HEATER=<heater_name> TARGET=<target_temp>
Signed-off-by: John Jardine <john@gprime.net>
- When using absolute extrusion the gcode position e-axis position is now captured on PAUSE and restored in RESUME with a call to the G92 handler.
- Add a get_status() function that returns a dictionary with an 'is_paused' key.
- Do not allow consective calls to PAUSE or RESUME to exectue. Also do not allow a RESUME to executed without a previous PAUSE.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Commit f4d323ad changed the handling of the self.speed variable, and
it inadvertently changed the default startup speed. Return to the
default of 25mm/s.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
In the normal case, a regular pin_up command should be sufficient to
raise the probe. (Should the regular pin_up fail, the code can issue
a "reset" command during the retry.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit c3efcd9c moved the config_spi setup to a build_config callback.
It's also necessary to move the config_thermocouple to a build_config
callback as well.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add helper function for reading current, microsteps, and stealthchop
settings from the config file. Use these helpers in both the tmc2130
and tmc2208 modules.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move these helper functions to the FieldHelper class so that they can
be used by other Trinamic drivers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Report values of TMC2208 register fields in DUMP_TMC command to help in
tuning and diagnostics.
This also adds functions to refer to register fields by name for TMC drivers
and register mappings for TMC2208.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Dmitry Frolov <dmitry.frolov@gmail.com>