Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
axis.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 #include "../unit.h"
5 
6 namespace config {
7 
8 using namespace unit;
9 
11 enum MRes : uint8_t {
12  MRes_256 = 0,
13  MRes_128 = 1,
14  MRes_64 = 2,
15  MRes_32 = 3,
16  MRes_16 = 4,
17  MRes_8 = 5,
18  MRes_4 = 6,
19  MRes_2 = 7,
20  MRes_1 = 8
21 };
22 
24 struct AxisConfig {
25  bool dirOn;
27  uint8_t iRun;
28  uint8_t iHold;
29  bool stealth;
30  long double stepsPerUnit;
31  int8_t sg_thrs;
32 };
33 
35 enum Axis : uint8_t {
36  Pulley,
37  Selector,
38  Idler,
39  _Axis_Last = Idler
40 };
41 
43 static constexpr uint8_t NUM_AXIS = Axis::_Axis_Last + 1;
44 
46 template <UnitBase B>
47 struct AxisLimits {
48  static constexpr UnitBase base = B;
52 };
53 
57 
58 } // namespace config
Define Debug mode to add additional serial output.
Definition: axis.h:6
MRes
Available microstepping resolutions.
Definition: axis.h:11
AxisLimits< Millimeter > SelectorLimits
Selector axis limits.
Definition: axis.h:55
AxisLimits< Degree > IdlerLimits
Idler axis limits.
Definition: axis.h:56
AxisLimits< Millimeter > PulleyLimits
Pulley axis limits.
Definition: axis.h:54
static constexpr uint8_t NUM_AXIS
Number of available axes.
Definition: axis.h:43
Axis
List of available axes.
Definition: axis.h:35
Definition: unit.h:25
UnitBase
Base units for conformability testing.
Definition: unit.h:28
Axis configuration data.
Definition: axis.h:24
bool dirOn
direction ON state (for inversion)
Definition: axis.h:25
bool stealth
Default to Stealth mode.
Definition: axis.h:29
long double stepsPerUnit
steps per unit
Definition: axis.h:30
MRes mRes
microstepping [0-8, where 0 is x256 and 8 is fullstepping]
Definition: axis.h:26
uint8_t iHold
holding current
Definition: axis.h:28
uint8_t iRun
running current
Definition: axis.h:27
Phisical limits for an axis.
Definition: axis.h:47
Unit< long double, B, Lenght > lenght
Longest move that can be performed by the axis.
Definition: axis.h:49
Unit< long double, B, Speed > jerk
Maximum jerk for the axis.
Definition: axis.h:50
Unit< long double, B, Accel > accel
Maximum acceleration for the axis.
Definition: axis.h:51