Chamber temperature monitoring and auto fan control.
This is an initial cut for feedback, updated for 2.0.x. Chamber temperature is currently reported along with hot end and bed temperatures to serial. The format is just like that used for hot end and bed temperatures, but using 'C' prefix. As there is no heater, target is always 0. Is this appropriate, is there a better way to report chamber temperatures? Chamber temperatures are not reported on the LCD in any way. When auto chamber fan is enabled, it currently just uses the same temperature threshold as the other auto controlled fans. As the chamber temperature is not connected to any heater, it doesn't undergo mintemp/maxtemp monitoring. This would need to change in the future if chamber heating became a feature.
This commit is contained in:
@ -74,6 +74,10 @@ enum ADCSensorState : char {
|
||||
PrepareTemp_BED,
|
||||
MeasureTemp_BED,
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
PrepareTemp_CHAMBER,
|
||||
MeasureTemp_CHAMBER,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
Prepare_FILWIDTH,
|
||||
Measure_FILWIDTH,
|
||||
@ -113,9 +117,11 @@ class Temperature {
|
||||
public:
|
||||
|
||||
static float current_temperature[HOTENDS],
|
||||
current_temperature_chamber,
|
||||
current_temperature_bed;
|
||||
static int16_t current_temperature_raw[HOTENDS],
|
||||
target_temperature[HOTENDS],
|
||||
current_temperature_chamber_raw,
|
||||
current_temperature_bed_raw;
|
||||
|
||||
#if ENABLED(AUTO_POWER_E_FANS)
|
||||
@ -244,6 +250,7 @@ class Temperature {
|
||||
#endif
|
||||
|
||||
static uint16_t raw_temp_value[MAX_EXTRUDERS],
|
||||
raw_temp_chamber_value,
|
||||
raw_temp_bed_value;
|
||||
|
||||
// Init min and max temp with extreme values to prevent false errors during startup
|
||||
@ -315,6 +322,9 @@ class Temperature {
|
||||
#if HAS_TEMP_BED
|
||||
static float analog2tempBed(const int raw);
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
static float analog2tempChamber(const int raw);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Called from the Temperature ISR
|
||||
@ -369,6 +379,7 @@ class Temperature {
|
||||
return current_temperature[HOTEND_INDEX];
|
||||
}
|
||||
FORCE_INLINE static float degBed() { return current_temperature_bed; }
|
||||
FORCE_INLINE static float degChamber() { return current_temperature_chamber; }
|
||||
|
||||
#if ENABLED(SHOW_TEMP_ADC_VALUES)
|
||||
FORCE_INLINE static int16_t rawHotendTemp(const uint8_t e) {
|
||||
@ -378,6 +389,7 @@ class Temperature {
|
||||
return current_temperature_raw[HOTEND_INDEX];
|
||||
}
|
||||
FORCE_INLINE static int16_t rawBedTemp() { return current_temperature_bed_raw; }
|
||||
FORCE_INLINE static int16_t rawChamberTemp() { return current_temperature_chamber_raw; }
|
||||
#endif
|
||||
|
||||
FORCE_INLINE static int16_t degTargetHotend(const uint8_t e) {
|
||||
|
Reference in New Issue
Block a user