Using the setup_start_value() method avoids the PWM output line
transitioning to an intermediate state prior to setting the initial
value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add user-configurable contrast, vcomh (affects "smearing"), and invert options for SSD1306/SH1106 type OLED displays.
Signed-off-by: James Esau <james_esau@hotmail.com>
Input shaping can help to reduce printer vibrations due to resonances
and eliminate or reduce ghosting in prints.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Register API endpoints for "pause_resume/pause", "pause_resume/resume" and "pause_resume/cancel".
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If a shutdown occurs during a PID_CALIBRATE command (eg, due to a
heater problem) then exit cleanly instead of throwing an internal
error.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change write_graphics() from taking one pixel row of n characters to
taking all the rows and columns for one character cell.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit allows to modify the icons (or glyphs) in the displays that
support it. Existing icons can be modified and new icons can be added via
a [display_glyph] section in the config.
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
Rework extruder.get_trapq() into extruder.sync_stepper() so that
extruder_stepper.py does not need to directly access the extruder
internals.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Option for using the current diameter instead of nominal while the first measurement isn't in place
Signed-off-by: Matthias Pabel <matthias.pabel@hs-augsburg.de>
This reverts commit 43fa41c1af.
The above commit disabled absolute extrude moves because it was
unclear if the code would work properly when an M221 extrude factor or
G92 offset was in use. However, since the calculation is done
relative to the raw E position and is sent as a raw E position to
gcode.cmd_G1() these modes should not matter.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Make it clear that gcode.get_status() to be called without an
eventtime by defaulting eventtime=None.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Store a reference to the gcode class in self.code. Obtain the
z_offset once and use for both the oldval and newval calculation.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 9530373c introduced a minimum value of zero for the g-code z
position. Unfortunately, that would likely cause the tuning tower to
not emit a command at the start of a test because the initial dummy z
position is set to a negative value. The minimum bound should not be
needed so remove it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This gives it parity with heater_fan. Also change the default speed from
max_power to 1.0, since it is already scaled by max_power in set_speed.
Signed-off-by: Adrian Keet <arkeet@gmail.com>
round to only 6 decimal places of precision. prevents doing extra retry
from small variations due to floating point math.
Signed-off-by: John "Fess" Fessenden <fess@fess.org>
Always disable the PWM after each command sent. Automatically trim
the command duration so the PWM disable doesn't increase the total
pulse time (when the duration is 200ms or greater).
Track the ideal command end time separately from the pwm transmit time
and only delay toolhead moves to this ideal time.
Update verify_state() to automatically schedule the check using the
time of the last sent command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename try_load_module() so that it uses consistent naming for
"printer objects". Change the function to raise an error by default
if the specified module does not exist.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of passing a dictionary to the command handlers, create a
wrapper class and pass that class to the command handlers. This can
simplify the command handler code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The beagleboard TI kernel 4.14 and 4.19 contain a commit which change
the device names ("pwm: Create device class for pwm channels") from
pwmN to pwm-${chip}:N. This commit was never merged into the upstream
kernel.
Decrease the number of pwm channels to a more reasonable 16. Increase
the number of pwm chips to 8 since the replicape servo pwm outputs are
on pwmchip4.
Update replicape code to detect appropriate channel.
Signed-off-by: Janne Grunau <janne-gh@jannau.net>
The heater logic is an independent module that does not need to be
treated as part of the "core" klipper code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It's no longer necessary to queue gcode scripts - gcode.run_script()
now does that automatically.
Also, make release_gcode config optional.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The probe_finalize() name is used for callbacks in both the
PrinterProbe and ProbePointsHelper classes. Rename the PrinterProbe
callback to avoid confusion.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the method to make it more clear that it is a low-level call
that should be rarely used.
Also, change gcode_button.py, hall_filament_width_sensor.py, and
tsl1401cl_filament_width_sensor.py to use respond_info() instead of
respond_raw().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Report low-level disk errors via the log and use the normal sdcard
mechanism to report end of sdcard print to gcode users.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
No need to check for '#original' in params - it's always there.
Properly handle a lower case m118 command. Don't register a help text
for the legacy M118 g-code command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Raising an error (instead of reporting an error) is important as only
a raised error will stop a print from virtual_sdcard.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 402110f6 didn't actually fix absolute extrude mode. For now,
report an error if an extrude move is requested in absolute extrude
mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Fix linear_travel optimization. Use "2*pi" instead of "radians(360)".
Always emit at least one segment and always end at the final target
coordinates.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Fix Z moves so that the movement is spaced out among the arc movements.
Fix extrude moves when in absolute extrude mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use the normal gcode.get_float() mechanism for extracting parameters
from the g-code command.
Don't register descriptions for the G2/G3 commands as the convention
is to only use descriptions for "extended g-code commands".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This reverts commit 5c8d15bbee.
The lower_probe() code was already manually optimizing the timing of
the pwm disable, and that conflicted with the optimization in commit
5c8d15bb.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some clones don't raise the pin on a reset and the ANTClabs BL-Touch
sometimes doesn't raise the pin either.
Rework the (infrequently called) sensor test code to always issue a
pin_up command before the touch command. Also, perform a reset and
retry if the sensor test fails.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Be sure to fully raise the probe prior to starting any future toolhead
movements in the multi_probe_end() case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If an error is found during the pin_up_not_triggered check, then apply
the reset command for a full second (instead of just 100ms). This
gives the bltouch more time to check its internal state.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Return the triggered state from verify_state() and update the callers
to raise the error (if needed).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It is likely only developers will be interested in testing the menu
system, so no need to have it in the default menu.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Disable support for customizing the main lcd display content via the
menu system. Advise users to use the new display_data config sections
as a replacement.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce a new config based system for specifying the on-screen
contents of an lcd screen. The default screen configuration (found in
klippy/extras/display/display.cfg) is the same as the previous
hard-coded display, so this should not change behavior for existing
users.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use new mcu.lookup_query_command() for all commands that query
information from the micro-controller.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>