Prusa-Firmware-MMU/src
Yuri D'Elia e43b4fc13b Motion/PulseGen: implement move chaining and end-speed control
Allow to chain moves by adding one extra parameter to the PlanMove[to]
functions: ending speed.

A move will always be accelerated from the last speed towards end ending
speed. The following:

  PlanMove(100._mm, 50._mm_s, 50._mm_s);
  PlanMove(200._mm, 100._mm_s);

Will first move the axis 100mm, accelerating towards 50mm/s, then
accelerate again to 100mm/s. The move will for then decelerate towards a
full stop after reaching 300mm in total.

Acceleration can be changed for each segment, so that a custom
acceleration curve can be created:

  SetAcceleration(10._mm_s2);
  PlanMove(100._mm, 50._mm_s, 50._mm_s);
  SetAcceleration(100._mm_s2);
  PlanMove(100._mm, 50._mm_s, 50._mm_s);

The ending speed might not always be reached, depending on the current
acceleration settings. The new function "Rate()" will return the ending
feedrate of the last move, if necessary.

AbortPlannedMoves accepts a new "halt" parameter to control how moves
will be chanined when interrupting the current move. By default
(halt=true) the move is completely interrupted.

When halt=false is requested, a subsequent move will be chained starting
at the currently aborted velocity. This allows to chain moves in reponse
to events, for example to accelerate the pulley without stopping as soon
as the FINDA is triggered, it's sufficient to interrupt the current move
followed by a new one:

  PlanMove(maximum_loading_lenght, slow_feedrate);
  ... wait for PINDA trigger ...
  AbortPlannedMoves(true);
  PlanMove(bowden_lenght, fast_feedrate);

will seamlessy continue loading and transition to the fast feedrate.

Jerk control has been simplified. It now handles only the maximal
velocity change of the last segment, which doesn't require reverse
planning.
2021-08-30 07:29:20 +02:00
..
config Update motor currents 2021-08-30 07:12:24 +02:00
hal Fix gpio::TogglePin on AVR 2021-08-30 07:06:28 +02:00
logic Reset the error code for reusal of logic state machines 2021-08-12 10:30:40 +02:00
modules Motion/PulseGen: implement move chaining and end-speed control 2021-08-30 07:29:20 +02:00
CMakeLists.txt Split the main CMakeLists.txt into more files within subdirectories 2021-07-12 09:09:21 +02:00
cmath.h Also fix min/max outside of AVR by using the standard std::min/max 2021-08-30 07:07:19 +02:00
limits.h Shim <limits> on AVR 2021-07-12 09:02:05 +02:00
main.cpp Implement an initial Motion ISR for AVR 2021-08-27 10:13:23 +02:00
main.dox Improve documentation of the startup process 2021-08-12 11:08:09 +02:00
pins.h Correct motor pins 2021-08-23 08:16:15 +02:00
unit.h Allow units to be scaled by an unitless quantity 2021-08-02 07:41:26 +02:00
version.c Add sending of response messages 2021-07-13 17:53:31 +02:00
version.h Add sending of response messages 2021-07-13 17:53:31 +02:00