Some mcu implementations don't like it when the pwm pin is configured
twice, so use the normal schedule_pwm_out implementation to update on
a restart.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Try to invoke a shutdown on an unhandled exception from reactor.run().
If that fails, try to do a clean exit.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update callers to use the printer.command_error reference instead of
directly using homing.CommandError() when raising or catching errors.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There's no reason to distinguish between an EndstopError and a
CommandError, so just use CommandError.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The optimized version is only available if it's the only axis used.
This fixes input_shaper on corexz.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Combine the shaper pulses and count of those pulses into a `struct
shaper_pulses`. Allocate space for the maximum number of pulses in
`struct input_shaper`.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Increase the maximum redraw rate from 4 times per second to 10 times
per second. Some users have reported slower rendering times as a
result of 8fa1c977.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Split up the main GCodeParser class into GCodeDispatch and GCodeMove
classes. The GCodeMove class is now available using the "gcode_move"
printer object name. This split simplifies the gcode.py code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The "status" and "printing_time" are now available in the
"idle_timeout" module, so no need to report them from toolhead.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename printer.gcode.action_emergency_stop() to
action_emergency_stop(), printer.gcode.action_respond_info() to
action_respond_info(), and printer.gcode.action_respond_error() to
action_raise_error() in command templates.
This simplifies the get_status() interface, as returning callable
functions from that interface was confusing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a helper function for submitting relative movements. This
function will also automatically ensure gcode.reset_last_position() is
called.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Generate a "toolhead:set_position" event on a call to
toolhead.set_position() and use that event to automatically call
gcode.reset_last_position().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a request_redraw() method and call it when a key menu event
occurs. Limit these proactive screen redraws to no more than 4 per
second.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
After reading the first item of self.filament_array, filament_width is updated back to self.nominal_filament_dia or self.diameter instead of retaining the value until next pending_position.
Updated Filament Menu Template.
Signed-off-by: Nicola Falciani <nicola.fal@gmail.com>
- don't populate all items at once
- populate items when container is pushed to stack
- precreate List back item, don't create it during populate.
- don't update items during populate
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Clients can now subscribe to the webhooks get_status() info to
determine if the printer state changes. It is no longer needed to
send a message to all clients on a shutdown transition.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>