aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/gcode.py
Commit message (Collapse)AuthorAgeFilesLines
...
* gcode: Rework homing to use greenletsKevin O'Connor2016-12-091-8/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rework endstop query to use greenletsKevin O'Connor2016-12-091-4/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Convert wait for temp to use greenletsKevin O'Connor2016-12-081-12/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Convert busy handler from timer to greenletKevin O'Connor2016-12-081-25/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Add support for CLEAR_SHUTDOWN commandKevin O'Connor2016-12-011-1/+9
| | | | | | Add ability to clear the MCU shutdown flag from the console. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add ability to restart the host softwareKevin O'Connor2016-11-301-7/+9
| | | | | | | 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>
* gcode: Support parsing of "extended" gcode commandsKevin O'Connor2016-11-301-24/+38
| | | | | | | | | | 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>
* mcu: Detect if the communication channel to the firmware is lostKevin O'Connor2016-11-301-0/+7
| | | | | | Detect a comms loss and report it to the user. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Don't dump the message log directly from set_printer_ready()Kevin O'Connor2016-11-301-6/+5
| | | | | | | | 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>
* klippy: Improve error reporting during connectKevin O'Connor2016-11-301-6/+11
| | | | | | | 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>
* gcode: Support reading from gcode input before mcu is readyKevin O'Connor2016-11-301-19/+30
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Create the /tmp/printer pseudo tty before opening config fileKevin O'Connor2016-11-301-8/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Run the MCU connect code within the reactorKevin O'Connor2016-11-291-1/+0
| | | | | | | | 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>
* mcu: Handle adc initialization entirely in mcu codeKevin O'Connor2016-11-291-4/+0
| | | | | | | | 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>
* homing: Check homing distance to verify endstop trigger after retractKevin O'Connor2016-11-281-0/+2
| | | | | | | | | 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>
* homing: Check for timeout during homing operationKevin O'Connor2016-11-181-0/+3
| | | | | | | | 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>
* homing: Create Homing class from gcodeKevin O'Connor2016-11-181-5/+6
| | | | | | | | 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>
* homing: Create QueryEndstops class from gcodeKevin O'Connor2016-11-181-10/+4
| | | | | | | | | | | 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>
* gcode: Reset current position after an endstop errorKevin O'Connor2016-10-111-0/+1
| | | | | | | 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>
* cartesian: Enforce endstop min and max boundariesKevin O'Connor2016-09-301-1/+5
| | | | | | | 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>
* gcode: Keep a log of incoming gcode data and report it on a shutdownKevin O'Connor2016-09-301-1/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Support querying the current status of endstopsKevin O'Connor2016-09-221-1/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Force a firmware shutdown on an unhandled exceptionKevin O'Connor2016-09-221-2/+9
| | | | | | | Check for unhandled exceptions and force the MCU to shutdown in that case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Move low-level coordinate manipulation to kinematic classKevin O'Connor2016-07-251-12/+12
| | | | | | | 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>
* gcode: Error on G20 (set units to inches) commandKevin O'Connor2016-07-251-3/+2
| | | | | | | Respond with an error to a G20 command (instead of effectively ignoring the command). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Create a new class and python file to track the printer extruderKevin O'Connor2016-07-101-1/+4
| | | | | | | | | Create a new python file (extruder.py) to control the extruder heater and stepper motors. This separates the extruder control logic from the cartesian robot code - making it easier to customize both the kinematic control of the robot as well as the extruder. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* cartesian: Rename CartKinematics class to ToolHeadKevin O'Connor2016-07-101-16/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+315
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>