diff --git a/Code_Overview.html b/Code_Overview.html index 223931422..99891df85 100644 --- a/Code_Overview.html +++ b/Code_Overview.html @@ -1605,19 +1605,36 @@ some functionality in C code.

Initial execution starts in klippy/klippy.py. This reads the command-line arguments, opens the printer config file, instantiates the main printer objects, and starts the serial connection. The main -execution of G-code commands is in the process_commands() method in +execution of G-code commands is in the _process_commands() method in klippy/gcode.py. This code translates the G-code commands into printer object calls, which frequently translate the actions to commands to be executed on the micro-controller (as declared via the DECL_COMMAND macro in the micro-controller code).

-

There are four threads in the Klippy host code. The main thread -handles incoming gcode commands. A second thread (which resides -entirely in the klippy/chelper/serialqueue.c C code) handles -low-level IO with the serial port. The third thread is used to process -response messages from the micro-controller in the Python code (see -klippy/serialhdl.py). The fourth thread writes debug messages to -the log (see klippy/queuelogger.py) so that the other threads -never block on log writes.

+

There are several threads in the Klipper host code:

+

Code flow of a move command

A typical printer movement starts when a "G1" command is sent to the Klippy host and it completes when the corresponding step pulses are @@ -1639,7 +1656,7 @@ provides further information on the mechanics of moves.

the timing of printing actions. The main codepath for a move is: ToolHead.move() -> LookAheadQueue.add_move() -> LookAheadQueue.flush() -> Move.set_junction() -> - ToolHead._process_moves(). + -