Fix temp init, loosen ADC grace period
This commit is contained in:
parent
a4c24511f7
commit
9853331b34
|
@ -147,8 +147,8 @@ using FilteredADC = LPC176x::ADC<ADC_LOWPASS_K_VALUE, ADC_MEDIAN_FILTER_SIZE>;
|
||||||
#define HAL_READ_ADC() FilteredADC::get_result()
|
#define HAL_READ_ADC() FilteredADC::get_result()
|
||||||
#define HAL_ADC_READY() FilteredADC::finished_conversion()
|
#define HAL_ADC_READY() FilteredADC::finished_conversion()
|
||||||
|
|
||||||
// A grace period for the ADC readings to stabilize before they start causing thermal protection errors.
|
// A grace period to allow ADC readings to stabilize, preventing false alarms
|
||||||
#define THERMAL_PROTECTION_GRACE_PERIOD 800
|
#define THERMAL_PROTECTION_GRACE_PERIOD 1000
|
||||||
|
|
||||||
// Parse a G-code word into a pin index
|
// Parse a G-code word into a pin index
|
||||||
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
|
||||||
|
|
|
@ -1531,7 +1531,7 @@ void Temperature::init() {
|
||||||
}while(0)
|
}while(0)
|
||||||
#define _TEMP_MAX_E(NR) do{ \
|
#define _TEMP_MAX_E(NR) do{ \
|
||||||
temp_range[NR].maxtemp = HEATER_ ##NR## _MAXTEMP; \
|
temp_range[NR].maxtemp = HEATER_ ##NR## _MAXTEMP; \
|
||||||
while (analog_to_celsius_hotend(temp_range[NR].raw_min, NR) > HEATER_ ##NR## _MAXTEMP) \
|
while (analog_to_celsius_hotend(temp_range[NR].raw_max, NR) > HEATER_ ##NR## _MAXTEMP) \
|
||||||
temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \
|
temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \
|
||||||
}while(0)
|
}while(0)
|
||||||
|
|
||||||
|
@ -1589,7 +1589,7 @@ void Temperature::init() {
|
||||||
while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR);
|
while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BED_MAXTEMP
|
#ifdef BED_MAXTEMP
|
||||||
while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) mintemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR);
|
while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR);
|
||||||
#endif
|
#endif
|
||||||
#endif // HAS_HEATED_BED
|
#endif // HAS_HEATED_BED
|
||||||
|
|
||||||
|
@ -1598,7 +1598,7 @@ void Temperature::init() {
|
||||||
while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR);
|
while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHAMBER_MAXTEMP
|
#ifdef CHAMBER_MAXTEMP
|
||||||
while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) mintemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR);
|
while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) maxtemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue