Move temp errors calling kill() out of ISR (#21832)

This commit is contained in:
Scott Lahteine
2021-05-08 17:34:21 -05:00
parent f95f18c8e5
commit 42a2b5c3ec
2 changed files with 94 additions and 91 deletions

View File

@@ -419,8 +419,6 @@ class Temperature {
private:
static volatile bool raw_temps_ready;
#if ENABLED(WATCH_HOTENDS)
static hotend_watch_t watch_hotend[HOTENDS];
#endif
@@ -880,9 +878,19 @@ class Temperature {
#endif
private:
// Reading raw temperatures and converting to Celsius when ready
static volatile bool raw_temps_ready;
static void update_raw_temperatures();
static void updateTemperaturesFromRawValues();
static inline bool updateTemperaturesIfReady() {
if (!raw_temps_ready) return false;
updateTemperaturesFromRawValues();
raw_temps_ready = false;
return true;
}
// MAX Thermocouples
#if HAS_MAX_TC
#define MAX_TC_COUNT 1 + BOTH(TEMP_SENSOR_0_IS_MAX_TC, TEMP_SENSOR_1_IS_MAX_TC)
#if MAX_TC_COUNT > 1