aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/stepcompress.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-04-07 20:20:34 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-04-07 20:22:32 -0400
commit1cdddeec3019892c41d75747e5cbf8ac08501f62 (patch)
treef54b8a58cf5f5d037005be884d0af869f27f8834 /klippy/stepcompress.c
parent657c908f88598700985facf9fee37e875fbc276d (diff)
downloadkutter-1cdddeec3019892c41d75747e5cbf8ac08501f62.tar.gz
kutter-1cdddeec3019892c41d75747e5cbf8ac08501f62.tar.xz
kutter-1cdddeec3019892c41d75747e5cbf8ac08501f62.zip
stepcompress: Add comment on common suffixes and units
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/stepcompress.c')
-rw-r--r--klippy/stepcompress.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/klippy/stepcompress.c b/klippy/stepcompress.c
index fcdeb640..6230e751 100644
--- a/klippy/stepcompress.c
+++ b/klippy/stepcompress.c
@@ -463,6 +463,14 @@ stepcompress_push(struct stepcompress *sc, double step_clock, int32_t sdir)
return 0;
}
+// Common suffixes: _sd is step distance (a unit length the same
+// distance the stepper moves on each step), _sv is step velocity (in
+// units of step distance per clock tick), _sd2 is step distance
+// squared, _r is ratio (scalar usually between 0.0 and 1.0). Times
+// are represented as clock ticks (a unit of time determined by a
+// micro-controller tick) and acceleration is in units of step
+// distance per clock ticks squared.
+
// Schedule 'steps' number of steps at constant acceleration. If
// acceleration is zero (ie, constant velocity) it uses the formula:
// step_clock = clock_offset + step_num/start_sv