Cheap mechanical servos have small flickering. When this servo stay on one position, this flickering slowly destroy internal potentiometer and make servo unusable. Many mechanisms need servo only to change position. Therefore I create this minor path to enable/disable servo. It stop pulses for this servo, that's all.
Corresponding G-code is:
SET_SERVO SERVO=config_name [WIDTH=] [ENABLE=<0|1>]
SET_SERVO SERVO=config_name [ANGLE=] [ENABLE=<0|1>]
For example:
SET_SERVO SERVO=touch ANGLE=80 ENABLE=1 ; enable servo and set position
G4 P200 ; wait 200ms
SET_SERVO SERVO=touch ENABLE=0 ; disable servo
This patch add one option to servo configuration:
enable: <False/True> # default True
It not have impact to user code existing already because it is optional parameter and default value is same as original behavior.
Signed-off-by: Jiri Dobry <jdobry@centrum.cz>
This allows SX1509 pins to be used as temperature fans and heater fans. Heaters are still disallowed.
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
The atmega328p is basically the same as the atmega328 - add explicit
support for it so that avrdude doesn't complain while flashing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update the process_batch() method so that it will not interleave
commands read from the input fd with the batched commands.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 459e5219 added a special case to the boundary checks to permit
homing moves. In some cases, the second home retract could also be
outside the normal boundary checks - extend the special case to also
permit that move.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The gitdir previously could be absent and produce a version of "" in
spite of checks for it. Fixed.
Parent directories with shlex-interpreted characters in their names
could be misinterpreted. Removed shlex parsing.
Packagers may want to remove the git history to slim down the package
size, so add an option for using a file 'version' in the klippy
directory to set version without using git.
Signed-Off-By: Lucas Fink <software@lfcode.ca>
Some users increase max_extrude_cross_section to avoid issues with
some slicers. However, increasing that value also increases the
defaults for the max_extrude_only parameters which is not obvious.
Base the max_extrude_only defaults only on the configured nozzle
diameter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The Trinamic stepper motor drivers are capable of reporting the
stepper phase - add support for using that capability to the
enddstop_phases module.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The Python 2.x ConfigParser doesn't support stripping of trailing '#'
style comments. Do that manually before parsing the config.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Only clear the internal sync_print_time flag if the code performs a
regular "lazy" flush of the look-ahead queue. This helps build the
look-ahead queue even when running internal scripts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that "Klipper state" messages are proactively sent, it is
redundant to send the "preparing to restart" message.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
When a delta printer has different arm lengths or different endstop
positions then the homing position falls outside of the normal
printable area. Add a special check to the range checking code to
permit this move instead of homing to a position near the actual
homing position.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the logic for performing the second home from the kinematics
classes to the generic homing code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit b0d859f2 introduced a second_homing_speed parameter, and it
also changed the retract speed. Revert the retract speed change (use
homing_speed when the head retracts).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit b0d859f2 introduced a second_homing_speed parameter; that
parameter needs to also be constrained to the max_z_velocity.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use the xor capability of the display to animate the glyphs, which
reduces the number of glyphs needed from 4 to 2. This should make it
easier to add future animations if desired.
Suggested by @marcio-ao.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Based on replies from Issue 652 (https://github.com/KevinOConnor/klipper/issues/652) only Extruder, Bed and Fan icons are changed. Feedrate icon stays untouched.
Signed-off-by: Alexander Fadeev <alfsoft@gmail.com>
The max_accel_to_decel variable must not be greater than the max_accel
variable. Make sure to check this when M204 changes max_accel.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't require (or permit) the user to specify a stepper_z
position_endstop when using the probe:z_virtual_offset mechanism. In
that case the position_endstop should always equal the probe's
z_offset - so no need to have the user specify it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Remove the code to calculate and track the z_offset via
position_endstop updates. It's simpler to always save and restore the
calculated z_adjust.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't require the config file to specify manual probing. Instead,
allow the user to select manual probing on each ProbePointsHelper
invocation.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that all the callers of ProbePointsHelper take a cartesian
coordinate for the probe locations, it's possible to perform averaging
of multi-sample probes within the class. This simplifies the callers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Only call cmd_NEXT() for manual probing. This simplifies the code as
the automatic probing and manual probing have slightly different
probing mechanisms.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that all users of ProbePointsHelper use the same
get_probed_position() code, it is possible to implement that locally
within the ProbePointsHelper class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It's possible (and a little simpler) to use cartesian coordinates when
calculating a stable position.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Configure the tmc2208 during the 'connect' phase so that a problem
during configuration is properly raised as a config error. Catch
errors during DUMP_TMC and raise them as g-code errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't log a heater verification error if that error is due to the
printer being shutdown for some other reason. Those spurious error
reports can be confusing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
No need to report an error if the M73 is not between 0 and 100 - just
display the nearest valid value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support using SAVE_CONFIG to store the results of DELTA_CALIBRATE to
the printer config file. Store the low level probe measurements in
the config as well.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the "stable position" logic from the delta.py kinematics code to
the delta_calibrate.py calibration code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for writing back the main printer config file with
additional calibration data stored in it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add write_glyph() support to hd44780.py. Update uc1701.py and
st7920.py to support writing single character glyphs via
write_glyph().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the st7920 icon rendering optimizations from display.py to
st7920.py. This simplifies the code for other displays.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>