Prusa-Firmware-MMU/src/modules
Yuri D'Elia 888cdf7cd5 Introduce compile-time axis unit type checks and conversions
Introduces:

- config::Unit: base class for physical quantities
- motion::AxisUnit: type-checked steps type

"config/unit.h" defines basic physical quantities, which are not
normally used elsewhere besides config.h.

"modules/axisunit.h" extends the modules::motion namespace with
Axis-aware units, with one type per axis per unit.

P_pos_t defines step positions for the pulley, I_pos_t for the idler,
etc. These are defined through the literar operators which are
similarly named and automatically convert a physical quantity to an
AxisUnit at compile time:

P_pos_t pulley_pos = 10.0_P_mm;

Besides type-checking, AxisUnit are otherwise identical to raw step
counts and are intended to be used along with the updated Motion API.

PlanMove/PlanMoveTo has been extended to support moves using these units
or physical quantities. Again, conversion is performed at compile time.
2021-07-25 16:39:54 +02:00
..
CMakeLists.txt Merge remote-tracking branch 'upstream/main' into motion_wip 2021-07-12 10:25:06 +02:00
axisunit.h Introduce compile-time axis unit type checks and conversions 2021-07-25 16:39:54 +02:00
buttons.cpp Change buttons' ADC limits into an array 2021-07-05 18:07:54 +02:00
buttons.h Change buttons' ADC limits into an array 2021-07-05 18:07:54 +02:00
debouncer.cpp Greatly improve unload filament unit test 2021-06-30 07:39:31 +02:00
debouncer.h Introduce Doxyfile + fix modules documentation 2021-06-30 07:39:31 +02:00
finda.cpp Start using config.h 2021-07-05 18:07:54 +02:00
finda.h Start using config.h 2021-07-05 18:07:54 +02:00
fsensor.cpp Introduce Timebase module, refactor timing code + unit tests 2021-06-21 10:22:17 +02:00
fsensor.h Start using config.h 2021-07-05 18:07:54 +02:00
globals.cpp Fix compilation 2021-06-16 06:43:20 +02:00
globals.h Introduce Doxyfile + fix modules documentation 2021-06-30 07:39:31 +02:00
idler.cpp Rename Motion::CurrentPos to Position() 2021-07-13 01:03:03 +02:00
idler.h Parametrize Idler and Selector in common config.h 2021-07-05 18:07:54 +02:00
leds.cpp Qualify leds::Mode in LED to fix build 2021-06-29 08:58:37 +02:00
leds.h Start using config.h 2021-07-05 18:07:54 +02:00
math.h Add modules::math for specialized math functions 2021-07-07 16:59:04 +02:00
motion.cpp Motion: implement InitAxis 2021-07-13 20:44:09 +02:00
motion.h Introduce compile-time axis unit type checks and conversions 2021-07-25 16:39:54 +02:00
permanent_storage.cpp Start using config.h 2021-07-05 18:07:54 +02:00
permanent_storage.h Introduce Doxyfile + fix modules documentation 2021-06-30 07:39:31 +02:00
protocol.cpp Reformat sources to fit the new namespace formatting rules 2021-05-25 12:24:19 +02:00
protocol.h Introduce Doxyfile + fix modules documentation 2021-06-30 07:39:31 +02:00
pulse_gen.cpp PulseGen: typos in comments 2021-07-13 00:54:03 +02:00
pulse_gen.h Add getters/setters for Jerk in Motion/PulseGen 2021-07-25 01:24:40 +02:00
selector.cpp Rename Motion::CurrentPos to Position() 2021-07-13 01:03:03 +02:00
selector.h Parametrize Idler and Selector in common config.h 2021-07-05 18:07:54 +02:00
speed_table.cpp Add initial Axis configuration static structs 2021-07-07 16:59:04 +02:00
speed_table.h Move cpuFrequencyDivider to config::stepTimerFrequencyDivider 2021-07-11 21:17:08 +02:00
timebase.cpp Define the global Timebase instance 2021-06-29 08:59:16 +02:00
timebase.h Introduce Doxyfile + fix modules documentation 2021-06-30 07:39:31 +02:00
user_input.cpp Rebase onto upstream/main, adapt to cleaned-up circular buffer interface 2021-06-30 07:39:31 +02:00
user_input.h Rebase onto upstream/main, adapt to cleaned-up circular buffer interface 2021-06-30 07:39:31 +02:00