aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/klippy.py
Commit message (Collapse)AuthorAgeFilesLines
...
* gcode: Add a "STATUS" commandKevin O'Connor2016-12-211-1/+1
| | | | | | Add a status command that will report the current printer status. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Update config error message - use "RESTART" when ready to continueKevin O'Connor2016-12-211-2/+3
| | | | | | | It is possible to restart the host software with a RESTART command after manually resetting the micro-controller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: stats() method must check that mcu and toolhead classes existKevin O'Connor2016-12-011-5/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Fix typo causing missing stats on 'exit_eof' caseKevin O'Connor2016-12-011-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Add support for CLEAR_SHUTDOWN commandKevin O'Connor2016-12-011-3/+3
| | | | | | 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-13/+30
| | | | | | | 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>
* mcu: Detect if the communication channel to the firmware is lostKevin O'Connor2016-11-301-0/+4
| | | | | | 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-0/+7
| | | | | | | | 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: Validate that options in the config file existKevin O'Connor2016-11-301-0/+17
| | | | | | | | Check that all options specified in the config file are valid. This catches possible typos and spelling errors in variable names that have a default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Add ConfigWrapper.getchoice methodKevin O'Connor2016-11-301-0/+7
| | | | | | | | Add helper function that ensures a config option is one of several choices. This helps ensure that a proper error is raised if an invalid choice is made. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Throw an exception if any required config parameter is missingKevin O'Connor2016-11-301-15/+22
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Raise a config error on an invalid pin name in the config fileKevin O'Connor2016-11-301-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Report an error if the config file does not existKevin O'Connor2016-11-301-1/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Improve error reporting during connectKevin O'Connor2016-11-301-10/+56
| | | | | | | 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-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: separate initial config file load into load_config() methodKevin O'Connor2016-11-301-19/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Create the /tmp/printer pseudo tty before opening config fileKevin O'Connor2016-11-301-13/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Defer calling mcu.connect_file() to connect() methodKevin O'Connor2016-11-301-5/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Make SerialReader.connect() blockingKevin O'Connor2016-11-291-3/+0
| | | | | | | Use the greenlet mechanism to wait for the connection to come up in the serial connect() method. This simplifies the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Run the MCU connect code within the reactorKevin O'Connor2016-11-291-10/+13
| | | | | | | | 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>
* klippy: Eliminate write_dictionary command line optionKevin O'Connor2016-11-291-9/+0
| | | | | | | The feature is not necessary and it will be difficult to maintain in the future. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Remove support for DummyMCU classKevin O'Connor2016-11-161-4/+0
| | | | | | | It's easier to test with the file output mechanism and the DummyMCU code has grown stale. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* queuelogger: Add support for background log writingKevin O'Connor2016-11-121-4/+6
| | | | | | | | | | | | | | Writing to the debug log can cause an unbounded delay due to disk IO. This is particularly so on embedded machines such as the Raspberry Pi that run on SD cards. These log writing delays can cause problems for the main processing threads. The new "queuelogger" code forwards all the main thread log messages to a queue, and a background thread writes the log messages from the queue to the destination file. This eliminates the IO delay from the main threads. 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-4/+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>
* toolhead: Split toolhead code from cartesian.py to new file toolhead.pyKevin O'Connor2016-07-101-2/+2
| | | | | | Separate out the toolhead logic to its own python file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* cartesian: Rename CartKinematics class to ToolHeadKevin O'Connor2016-07-101-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+163
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>