Follow up fixes to various PRs. (#13334)

- Ensure `MarlinUI:get_progress` is defined for `ExtUI`.
- Fix for `BACKLASH_SMOOTHING` with small segments.
  `BACKLASH_SMOOTHING` with extremely small segments failed to fully correct due to the correction factor being rounded down. Rounding up ensures the entire backlash will converge to zero even for small segments.
- Add pinout for the beta revision `EINSY_RETRO`.
- Update soft endstops with tool offsets (for toolchange et. al. move clamping) (#12568)
This commit is contained in:
Marcio Teixeira
2019-03-08 21:13:24 -07:00
committed by Scott Lahteine
parent c7d618b4d9
commit 00fc43144a
10 changed files with 155 additions and 122 deletions

View File

@ -90,10 +90,6 @@ extern int16_t feedrate_percentage;
constexpr uint8_t active_extruder = 0;
#endif
#if HAS_HOTEND_OFFSET
extern float hotend_offset[XYZ][HOTENDS];
#endif
FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float(p); }
FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte(p); }
@ -115,19 +111,30 @@ XYZ_DEFS(signed char, home_dir, HOME_DIR);
#define update_workspace_offset(x) NOOP
#endif
#if HAS_HOTEND_OFFSET
extern float hotend_offset[XYZ][HOTENDS];
void reset_hotend_offsets();
#else
constexpr float hotend_offset[XYZ][HOTENDS] = { { 0 }, { 0 }, { 0 } };
#endif
#if HAS_SOFTWARE_ENDSTOPS
extern bool soft_endstops_enabled;
extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
void clamp_to_software_endstops(float target[XYZ]);
void update_software_endstops(const AxisEnum axis);
void update_software_endstops(const AxisEnum axis
#if HAS_HOTEND_OFFSET
, const uint8_t old_tool_index=0, const uint8_t new_tool_index=0
#endif
);
#else
constexpr bool soft_endstops_enabled = false;
constexpr float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
soft_endstop_max[XYZ] = { X_MAX_BED, Y_MAX_BED, Z_MAX_POS };
#define clamp_to_software_endstops(x) NOOP
#define update_software_endstops(x) NOOP
constexpr bool soft_endstops_enabled = true;
constexpr float soft_endstop_min[XYZ] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
soft_endstop_max[XYZ] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
#define update_software_endstops(...) NOOP
#endif
void clamp_to_software_endstops(float target[XYZ]);
void report_current_position();
inline void set_current_from_destination() { COPY(current_position, destination); }