mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
🧑💻 More debug in motion.*
This commit is contained in:
parent
e9f483b480
commit
185961f898
@ -811,6 +811,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
|
|||||||
static float saved_feedrate_mm_s;
|
static float saved_feedrate_mm_s;
|
||||||
static int16_t saved_feedrate_percentage;
|
static int16_t saved_feedrate_percentage;
|
||||||
void remember_feedrate_and_scaling() {
|
void remember_feedrate_and_scaling() {
|
||||||
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("remember_feedrate_and_scaling: fr=", feedrate_mm_s, " ", feedrate_percentage, "%");
|
||||||
saved_feedrate_mm_s = feedrate_mm_s;
|
saved_feedrate_mm_s = feedrate_mm_s;
|
||||||
saved_feedrate_percentage = feedrate_percentage;
|
saved_feedrate_percentage = feedrate_percentage;
|
||||||
}
|
}
|
||||||
@ -821,6 +822,7 @@ void remember_feedrate_scaling_off() {
|
|||||||
void restore_feedrate_and_scaling() {
|
void restore_feedrate_and_scaling() {
|
||||||
feedrate_mm_s = saved_feedrate_mm_s;
|
feedrate_mm_s = saved_feedrate_mm_s;
|
||||||
feedrate_percentage = saved_feedrate_percentage;
|
feedrate_percentage = saved_feedrate_percentage;
|
||||||
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("restore_feedrate_and_scaling: fr=", feedrate_mm_s, " ", feedrate_percentage, "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_SOFTWARE_ENDSTOPS
|
#if HAS_SOFTWARE_ENDSTOPS
|
||||||
|
@ -436,26 +436,21 @@ void set_axis_is_at_home(const AxisEnum axis);
|
|||||||
void set_axis_never_homed(const AxisEnum axis);
|
void set_axis_never_homed(const AxisEnum axis);
|
||||||
main_axes_bits_t axes_should_home(main_axes_bits_t axes_mask=main_axes_mask);
|
main_axes_bits_t axes_should_home(main_axes_bits_t axes_mask=main_axes_mask);
|
||||||
bool homing_needed_error(main_axes_bits_t axes_mask=main_axes_mask);
|
bool homing_needed_error(main_axes_bits_t axes_mask=main_axes_mask);
|
||||||
inline void set_axis_unhomed(const AxisEnum axis) { CBI(axes_homed, axis); }
|
|
||||||
inline void set_axis_untrusted(const AxisEnum axis) { CBI(axes_trusted, axis); }
|
|
||||||
inline void set_all_unhomed() { axes_homed = axes_trusted = 0; }
|
|
||||||
inline void set_axis_homed(const AxisEnum axis) { SBI(axes_homed, axis); }
|
|
||||||
inline void set_axis_trusted(const AxisEnum axis) { SBI(axes_trusted, axis); }
|
|
||||||
inline void set_all_homed() { axes_homed = axes_trusted = main_axes_mask; }
|
|
||||||
#else
|
#else
|
||||||
constexpr main_axes_bits_t axes_homed = main_axes_mask, axes_trusted = main_axes_mask; // Zero-endstop machines are always homed and trusted
|
constexpr main_axes_bits_t axes_homed = main_axes_mask, axes_trusted = main_axes_mask; // Zero-endstop machines are always homed and trusted
|
||||||
inline void homeaxis(const AxisEnum axis) {}
|
inline void homeaxis(const AxisEnum axis) {}
|
||||||
inline void set_axis_never_homed(const AxisEnum) {}
|
inline void set_axis_never_homed(const AxisEnum) {}
|
||||||
inline main_axes_bits_t axes_should_home(main_axes_bits_t=main_axes_mask) { return 0; }
|
inline main_axes_bits_t axes_should_home(main_axes_bits_t=main_axes_mask) { return 0; }
|
||||||
inline bool homing_needed_error(main_axes_bits_t=main_axes_mask) { return false; }
|
inline bool homing_needed_error(main_axes_bits_t=main_axes_mask) { return false; }
|
||||||
inline void set_axis_unhomed(const AxisEnum axis) {}
|
|
||||||
inline void set_axis_untrusted(const AxisEnum axis) {}
|
|
||||||
inline void set_all_unhomed() {}
|
|
||||||
inline void set_axis_homed(const AxisEnum axis) {}
|
|
||||||
inline void set_axis_trusted(const AxisEnum axis) {}
|
|
||||||
inline void set_all_homed() {}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline void set_axis_unhomed(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, CBI(axes_homed, axis)); }
|
||||||
|
inline void set_axis_untrusted(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, CBI(axes_trusted, axis)); }
|
||||||
|
inline void set_all_unhomed() { TERN_(HAS_ENDSTOPS, axes_homed = axes_trusted = 0); }
|
||||||
|
inline void set_axis_homed(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, SBI(axes_homed, axis)); }
|
||||||
|
inline void set_axis_trusted(const AxisEnum axis) { TERN_(HAS_ENDSTOPS, SBI(axes_trusted, axis)); }
|
||||||
|
inline void set_all_homed() { TERN_(HAS_ENDSTOPS, axes_homed = axes_trusted = main_axes_mask); }
|
||||||
|
|
||||||
inline bool axis_was_homed(const AxisEnum axis) { return TEST(axes_homed, axis); }
|
inline bool axis_was_homed(const AxisEnum axis) { return TEST(axes_homed, axis); }
|
||||||
inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axes_trusted, axis); }
|
inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axes_trusted, axis); }
|
||||||
inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; }
|
inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user