Skip to content

Commit

Permalink
Improve docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfVoxel committed Jun 22, 2024
1 parent 7e11f18 commit 9835216
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/fas_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,19 @@
// There are some constraints on the values:
// - `ticks` must be greater or equal to FastAccelStepper::getMaxSpeedInTicks.
// - `ticks*steps` must be greater or equal to MIN_CMD_TICKS
//
// For example:
// A command with ticks=TICKS_PER_S/1000, steps = 3, count_up = true means that:
// 1. The direction pin is set to HIGH.
// 2. One step is generated.
// 3. Exactly 1 ms after the first step, the second step is issued.
// 4. Exactly 1 ms after the second step, the third step is issued.
// 5. The stepper waits for 1 ms.
// 6. The next command is processed.
struct stepper_command_s {
// Number of ticks between each step.
//
// See TICKS_PER_S
// There are `TICKS_PER_S` ticks per second. This may vary between different platforms.
uint16_t ticks;
// Number of steps to send to the stepper motor during this command.
//
Expand Down

0 comments on commit 9835216

Please sign in to comment.