| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Don't modify dictionaries while iterating them and be careful to use
// when doing an integer divide.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Use the newer syntax for python exceptions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Raise an error if the move speed is set to a zero or negative value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
The set_printer_ready() can be called from a background thread on a
shutdown event, so don't try to lookup the printer components in that
case. Simplify build_handlers() so that it no longer tests for
components being available - test for component availability in the
command handlers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
No need to recommend users disable "SD card support" in octoprint -
instead, just ignore the M21 command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Advice users to issue a FIRMWARE_RESTART command on a printer shutdown
event, and remove support for CLEAR_SHUTDOWN. A full mcu reset is
preferable and it simplifies the interface.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Don't force a firmware shutdown on a simple gcode parse error.
Instead, report the error back to the user and otherwise ignore the
command.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Lookup the printer components during the set_printer_ready() callback.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Add initial support for micro-controller resets via the Arduino reset
mechanism. Also, automatically attempt a firmware restart if the
printer CRC does not match.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Raise an error if the user requests a temperate outside the configured
min/max_temp range.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
If the user requests a restart and the machine appears to be otherwise
functioning normally, then attempt to stop the heaters and fans prior
to restarting the host. This prevents the firmware from going into a
shutdown state when the heater is on and the host restarts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Move the motor off time checking to its own code. This simplifies the
main flush handler.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The normal system clock can have sudden jumps if the system clock is
changed. Use the system monotonic clock to avoid these sudden changes
in time.
It appears the Raspbian OS (which is used by OctoPi) is setup to
update the system clock upon network connectivity. This could cause
sudden system clock changes which could lead to Klippy processing
errors. Using the monotonic clock eliminates these issues.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
When testing via a gcode input file, it's easier to debug problems if
the program exits upon the first exception.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Support querying the firmware type and version.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Add ability to fully stall the input until all moves are complete.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Add a status command that will report the current printer status.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
If a speed is never specified then default to 25mm/s (up from 1 mm/s).
If a user accidentally issues a move without setting the speed, the
default speed shouldn't be so slow that it takes minutes to finish the
move.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Also try to support the command if it is sent out of order.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Add ability to clear the MCU shutdown flag from the console.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add a "restart" gcode command that will cause the host "klippy"
software to reload its config and restart.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Support human readable commands (eg, "help"). Add a "help" command to
list these extended commands.
Also, add support for declaring command aliases, command help, and
command availability next to the handlers themselves.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Detect a comms loss and report it to the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The set_printer_ready() method can be called from a background thread.
Have the main Printer class call a new dump_debug() method in the main
thread on a shutdown event.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Catch exceptions during the connect phase and report them via the
gcode interface to the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Setup the reactor and run the MCU connection code as a timer within
the reactor. The connection code will make use of reactor greenlets
so that it can wait for events during the connection phase.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Don't expose the ADC initialization to the gcode and heater code -
instead, register a callback within the MCU_adc class and call it
directly from the MCU class after configuration completes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Instead of checking the endstop trigger directly after a retract move,
verify some distance is traveled during the following homing
operation. This reduces the amount of synchronization between mcu and
host during homing.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Should a homing move complete without hitting the endstop, then
disable motors, disable the endstop checking, and report the error to
the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Create the Homing class in the gcode handler instead of in the
kinematic classes. This will make it easier to pass error messages
back to the user.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Create the QueryEndstops in the gcode handler instead of in the
kinematic classes. This simplifies the gcode handler as it can
directly register its response callback.
Also, store the stepper name in the stepper class. Also, propagate
the print_time of the query request to the mcu_endstop class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
If the printer is commanded to an invalid location, reset the current
position to the last successfully commanded position.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Verify that each move command is within range of the configured
minimum and maximum for each axis.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Check for unhandled exceptions and force the MCU to shutdown in that
case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Rework the code so that the kinematic class (currently just
cartesian.py) has more control over the homing process.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|