Enforce sensor range for temperature target (#18465)

* Mitigate stepper timeout

* Add CHAMBER PWM code

* Structured thermistor tables

* Fix reversed sensor ranges

* Prevent temps outside sensor range
This commit is contained in:
Scott Lahteine
2020-07-01 16:27:28 -05:00
committed by GitHub
parent 70fa4c9323
commit c43bbcce15
56 changed files with 295 additions and 167 deletions

View File

@@ -334,8 +334,14 @@ public:
static bool select_coordinate_system(const int8_t _new);
#endif
static millis_t previous_move_ms;
FORCE_INLINE static void reset_stepper_timeout() { previous_move_ms = millis(); }
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; }
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);
}
static int8_t get_target_extruder_from_command();
static int8_t get_target_e_stepper_from_command();