diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md index 6b5df5595..e8a61068c 100644 --- a/docs/Code_Overview.md +++ b/docs/Code_Overview.md @@ -190,18 +190,19 @@ provides further information on the mechanics of moves. stepper movements produced by the extruder class will be in sync with head movement even though the code is kept separate. -* Klipper uses an - [iterative solver](https://en.wikipedia.org/wiki/Root-finding_algorithm) - to generate the step times for each stepper. For efficiency reasons, - the stepper pulse times are generated in C code in a thread per - stepper motor. The threads are notified of new activity by the - motion_queuing module (klippy/extras/motion_queuing.py): +* For efficiency reasons, stepper motion is generated in the C code in + a thread per stepper motor. The threads are notified when steps + should be generated by the motion_queuing module + (klippy/extras/motion_queuing.py): `PrinterMotionQueuing._flush_handler() -> PrinterMotionQueuing._advance_move_time() -> - steppersync_start_gen_steps() -> - stepcompress_start_gen_steps()`. The step times are then generated - from that thread (klippy/chelper/stepcompress.c): - `sc_background_thread() -> stepcompress_generate_steps() -> + steppersyncmgr_gen_steps() -> se_start_gen_steps()`. + +* Klipper uses an + [iterative solver](https://en.wikipedia.org/wiki/Root-finding_algorithm) + to generate the step times for each stepper. The step times are + generated from the background thread (klippy/chelper/steppersync.c): + `se_background_thread() -> se_generate_steps() -> itersolve_generate_steps() -> itersolve_gen_steps_range()` (in klippy/chelper/itersolve.c). The goal of the iterative solver is to find step times given a function that calculates a stepper position @@ -228,7 +229,7 @@ provides further information on the mechanics of moves. commands that correspond to the list of stepper step times built in the previous stage. These "queue_step" commands are then queued, prioritized, and sent to the micro-controller (via - stepcompress.c:steppersync and serialqueue.c:serialqueue). + steppersync.c:steppersync and serialqueue.c:serialqueue). * Processing of the queue_step commands on the micro-controller starts in src/command.c which parses the command and calls