Rename some temperature members
This commit is contained in:
parent
48098b1675
commit
56cd747c8b
@ -287,7 +287,7 @@ Temperature thermalManager;
|
|||||||
float Temperature::redundant_temperature = 0.0;
|
float Temperature::redundant_temperature = 0.0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
volatile bool Temperature::temp_meas_ready = false;
|
volatile bool Temperature::raw_temps_ready = false;
|
||||||
|
|
||||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||||
int32_t Temperature::last_e_position, Temperature::lpq[LPQ_MAX_LEN];
|
int32_t Temperature::last_e_position, Temperature::lpq[LPQ_MAX_LEN];
|
||||||
@ -435,7 +435,7 @@ volatile bool Temperature::temp_meas_ready = false;
|
|||||||
|
|
||||||
const millis_t ms = millis();
|
const millis_t ms = millis();
|
||||||
|
|
||||||
if (temp_meas_ready) { // temp sample ready
|
if (raw_temps_ready) { // temp sample ready
|
||||||
updateTemperaturesFromRawValues();
|
updateTemperaturesFromRawValues();
|
||||||
|
|
||||||
// Get the current temperature and constrain it
|
// Get the current temperature and constrain it
|
||||||
@ -1053,7 +1053,7 @@ void Temperature::manage_heater() {
|
|||||||
if (emergency_parser.killed_by_M112) kill();
|
if (emergency_parser.killed_by_M112) kill();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!temp_meas_ready) return;
|
if (!raw_temps_ready) return;
|
||||||
|
|
||||||
updateTemperaturesFromRawValues(); // also resets the watchdog
|
updateTemperaturesFromRawValues(); // also resets the watchdog
|
||||||
|
|
||||||
@ -1625,7 +1625,7 @@ void Temperature::updateTemperaturesFromRawValues() {
|
|||||||
// Reset the watchdog on good temperature measurement
|
// Reset the watchdog on good temperature measurement
|
||||||
watchdog_refresh();
|
watchdog_refresh();
|
||||||
|
|
||||||
temp_meas_ready = false;
|
raw_temps_ready = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MAX6675_SEPARATE_SPI
|
#if MAX6675_SEPARATE_SPI
|
||||||
@ -2304,9 +2304,9 @@ void Temperature::disable_all_heaters() {
|
|||||||
#endif // HAS_MAX6675
|
#endif // HAS_MAX6675
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get raw temperatures
|
* Update raw temperatures
|
||||||
*/
|
*/
|
||||||
void Temperature::set_current_temp_raw() {
|
void Temperature::update_raw_temperatures() {
|
||||||
|
|
||||||
#if HAS_TEMP_ADC_0 && DISABLED(HEATER_0_USES_MAX6675)
|
#if HAS_TEMP_ADC_0 && DISABLED(HEATER_0_USES_MAX6675)
|
||||||
temp_hotend[0].update();
|
temp_hotend[0].update();
|
||||||
@ -2360,13 +2360,13 @@ void Temperature::set_current_temp_raw() {
|
|||||||
joystick.z.update();
|
joystick.z.update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
temp_meas_ready = true;
|
raw_temps_ready = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Temperature::readings_ready() {
|
void Temperature::readings_ready() {
|
||||||
|
|
||||||
// Update the raw values if they've been read. Else we could be updating them during reading.
|
// Update the raw values if they've been read. Else we could be updating them during reading.
|
||||||
if (!temp_meas_ready) set_current_temp_raw();
|
if (!raw_temps_ready) update_raw_temperatures();
|
||||||
|
|
||||||
// Filament Sensor - can be read any time since IIR filtering is used
|
// Filament Sensor - can be read any time since IIR filtering is used
|
||||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||||
|
@ -360,7 +360,7 @@ class Temperature {
|
|||||||
static bool inited; // If temperature controller is running
|
static bool inited; // If temperature controller is running
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static volatile bool temp_meas_ready;
|
static volatile bool raw_temps_ready;
|
||||||
|
|
||||||
#if WATCH_HOTENDS
|
#if WATCH_HOTENDS
|
||||||
static heater_watch_t watch_hotend[HOTENDS];
|
static heater_watch_t watch_hotend[HOTENDS];
|
||||||
@ -805,7 +805,7 @@ class Temperature {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void set_current_temp_raw();
|
static void update_raw_temperatures();
|
||||||
static void updateTemperaturesFromRawValues();
|
static void updateTemperaturesFromRawValues();
|
||||||
|
|
||||||
#define HAS_MAX6675 EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675)
|
#define HAS_MAX6675 EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675)
|
||||||
|
Loading…
Reference in New Issue
Block a user