From f66244576664730f6787d1700abd750c5b2f7b16 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 13 Sep 2017 08:59:26 -0400 Subject: stepcompress: Implement print time to clock conversion in C code Implement the conversion from print_time to the local mcu's clock within the C code. This simplifies the python code. Signed-off-by: Kevin O'Connor --- docs/Code_Overview.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'docs/Code_Overview.md') diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md index d5292ac5..00a77928 100644 --- a/docs/Code_Overview.md +++ b/docs/Code_Overview.md @@ -148,7 +148,7 @@ provides further information on the mechanics of moves. start/crusing/end velocity, and distance traveled during acceleration/cruising/deceleration. All the information is stored in the Move() class and is in cartesian space in units of millimeters - and seconds. Times are stored relative to the start of the print. + and seconds. The move is then handed off to the kinematics classes: `Move.move() -> kin.move()` @@ -174,14 +174,13 @@ provides further information on the mechanics of moves. stepcompress_push_const()`, or for delta kinematics: `DeltaKinematics.move() -> MCU_Stepper.step_delta() -> stepcompress_push_delta()`. The MCU_Stepper code just performs unit - and axis transformation (seconds to clock ticks and millimeters to - step distances), and calls the C code. The C code calculates the - stepper step times for each movement and fills an array (struct - stepcompress.queue) with the corresponding micro-controller clock - counter times for every step. Here the "micro-controller clock - counter" value directly corresponds to the micro-controller's - hardware counter - it is relative to when the micro-controller was - last powered up. + and axis transformation (millimeters to step distances), and calls + the C code. The C code calculates the stepper step times for each + movement and fills an array (struct stepcompress.queue) with the + corresponding micro-controller clock counter times for every + step. Here the "micro-controller clock counter" value directly + corresponds to the micro-controller's hardware counter - it is + relative to when the micro-controller was last powered up. * The next major step is to compress the steps: `stepcompress_flush() -> compress_bisect_add()` (in stepcompress.c). This code generates -- cgit v1.2.3-70-g09d2