Commit Graph

12 Commits (9a5a6d949805433891e241ede901a2f067eeeeb8)

Author SHA1 Message Date
Yuri D'Elia db494722aa motion: Remove the TODO (tests are now complete) 2022-05-11 08:48:53 +02:00
D.R.racer c3aec0bf92 Fix pulse gen unit tests with the larger block buffer 2021-11-03 10:13:03 +01:00
Yuri D'Elia 288e74283d Introduce config::MRes and fix (real) axis units
The parameter config::AxisConfig::uSteps was supposed to be
microstepping resolution, but it's instead being used as the driver's
MRES directly.

To avoid a runtime conversion, rename the field to mRes and define a new
enum listing all the possible (and valid) microstepping resolutions.

This simplifies the code and makes clear the stepsPerUnit scale.

Assign correct stepsPerUnit to all axes as a result, including working
limits.
2021-08-25 09:16:56 +02:00
Yuri D'Elia 16e7f62aee PulseGen: introduce CurPosition() for testing
CurPosition() returns the live axis position, which in this
implementation is inherently expensive to compute.

This shouldn't be required for the MMU, but it /will/ come in handy to
check for the axis position/s in Motion tests.
2021-07-13 00:48:44 +02:00
Yuri D'Elia 9b77623be1 PulseGen: ensure Abort calculates the current remainder correctly
Instead of stepping halfway, step ~1/3 of the way through.

This ensures we can check if the steps performed is correct due to the
internal step subtraction.
2021-07-11 22:19:44 +02:00
Yuri D'Elia 9e935f6a07 Comment Typo 2021-07-11 22:17:04 +02:00
Yuri D'Elia 0c47d8f0d1 PulseGen: add comprehensive tests (no acceleration yet) 2021-07-11 20:52:27 +02:00
Yuri D'Elia 1ff9b81630 Rename PulseGen::Move to PlanMoveTo
Make Motion and PulseGen intentionally very similar.
2021-07-07 16:59:40 +02:00
Yuri D'Elia d87db1ff76 Revised WIP for the Motion API
- Remove the combined PlanMove(a,b,c,rate) call. If we allow the units
  of the various motors to be changed at compile time, the unit of
  rate can vary between axes.
- Build PlanMove on top of the absolute PlanMoveTo.
- Add required stubs for TMC2130.
- Allow each axis mode to be set independently, since we have this
  feature for free anyway.
- Rework internals to use PulseGen data types and structs.
2021-07-07 16:59:39 +02:00
Yuri D'Elia ed04bd02e2 PulseGen/speed_tables: cleanup constants 2021-07-07 16:59:04 +02:00
Yuri D'Elia 006dfd4abc PulseGen: remove all floating point calculations
Work in steps, steps/s, steps/s2 directly.
2021-07-07 16:59:04 +02:00
Yuri D'Elia cf5be5aade PulseGen: initial version of the ramp/pulse generator 2021-07-07 16:59:04 +02:00