✨ Laser Safety Timeout (#24189)
This commit is contained in:
@@ -396,14 +396,20 @@ public:
|
||||
static bool select_coordinate_system(const int8_t _new);
|
||||
#endif
|
||||
|
||||
static millis_t previous_move_ms, max_inactive_time, stepper_inactive_time;
|
||||
FORCE_INLINE static void reset_stepper_timeout(const millis_t ms=millis()) { previous_move_ms = ms; }
|
||||
static millis_t previous_move_ms, max_inactive_time;
|
||||
FORCE_INLINE static bool stepper_max_timed_out(const millis_t ms=millis()) {
|
||||
return max_inactive_time && ELAPSED(ms, previous_move_ms + max_inactive_time);
|
||||
}
|
||||
FORCE_INLINE static bool stepper_inactive_timeout(const millis_t ms=millis()) {
|
||||
return ELAPSED(ms, previous_move_ms + stepper_inactive_time);
|
||||
}
|
||||
FORCE_INLINE static void reset_stepper_timeout(const millis_t ms=millis()) { previous_move_ms = ms; }
|
||||
|
||||
#if HAS_DISABLE_INACTIVE_AXIS
|
||||
static millis_t stepper_inactive_time;
|
||||
FORCE_INLINE static bool stepper_inactive_timeout(const millis_t ms=millis()) {
|
||||
return ELAPSED(ms, previous_move_ms + stepper_inactive_time);
|
||||
}
|
||||
#else
|
||||
static bool stepper_inactive_timeout(const millis_t) { return false; }
|
||||
#endif
|
||||
|
||||
static void report_echo_start(const bool forReplay);
|
||||
static void report_heading(const bool forReplay, FSTR_P const fstr, const bool eol=true);
|
||||
|
||||
Reference in New Issue
Block a user