Prusa MINI Firmware overview
Backlash Class Reference

#include <backlash.h>

Collaboration diagram for Backlash:

Public Member Functions

void add_correction_steps (const int32_t &da, const int32_t &db, const int32_t &dc, const uint8_t dm, block_t *const block)
 

Static Public Member Functions

static float get_measurement (const AxisEnum a)
 
static bool has_measurement (const AxisEnum a)
 
static bool has_any_measurement ()
 

Static Public Attributes

static constexpr uint8_t correction = (BACKLASH_CORRECTION) * 0xFF
 
static const xyz_float_t distance_mm
 

Member Function Documentation

◆ get_measurement()

static float Backlash::get_measurement ( const AxisEnum  a)
static
56  {
57  // Return the measurement averaged over all readings
58  return (
59  #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
60  measured_count[a] > 0 ? measured_mm[a] / measured_count[a] :
61  #endif
62  0
63  );
64  #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
65  UNUSED(a);
66  #endif
67  }

◆ has_measurement()

static bool Backlash::has_measurement ( const AxisEnum  a)
static
69  {
70  return (false
71  #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
72  || (measured_count[a] > 0)
73  #endif
74  );
75  #if DISABLED(MEASURE_BACKLASH_WHEN_PROBING)
76  UNUSED(a);
77  #endif
78  }
Here is the caller graph for this function:

◆ has_any_measurement()

static bool Backlash::has_any_measurement ( )
static
80  {
82  }
Here is the call graph for this function:

◆ add_correction_steps()

void Backlash::add_correction_steps ( const int32_t &  da,
const int32_t &  db,
const int32_t &  dc,
const uint8_t  dm,
block_t *const  block 
)
Here is the caller graph for this function:

Member Data Documentation

◆ correction

constexpr uint8_t Backlash::correction = (BACKLASH_CORRECTION) * 0xFF
staticconstexpr

◆ distance_mm

const xyz_float_t Backlash::distance_mm
static
X_AXIS
Definition: types.h:37
createSpeedLookupTable.a
list a
Definition: createSpeedLookupTable.py:29
Y_AXIS
Definition: types.h:38
Z_AXIS
Definition: types.h:39
UNUSED
#define UNUSED(X)
Definition: stm32f4xx_hal_def.h:74
ENABLED
#define ENABLED(V...)
Definition: macros.h:177
Backlash::has_measurement
static bool has_measurement(const AxisEnum a)
Definition: backlash.h:69