Prusa MINI Firmware overview
|
#include <temperature.h>
◆ tooColdToExtrude()
◆ targetTooColdToExtrude()
◆ hotEnoughToExtrude()
◆ targetHotEnoughToExtrude()
◆ init()
void Temperature::init |
( |
| ) |
|
Instance Methods
Initialize the temperature manager The manager is implemented by periodic calls to manage_heater()
1548 #define _AD(N) (ANY(HEATER_##N##_USES_AD595, HEATER_##N##_USES_AD8495))
1549 #if _AD(0) || _AD(1) || _AD(2) || _AD(3) || _AD(4) || _AD(5) || _AD(BED) || _AD(CHAMBER)
1556 #if BOTH(PIDTEMP, PID_EXTRUSION_SCALING)
1557 last_e_position = 0;
1592 #if HAS_HEATED_CHAMBER
1605 #if ENABLED(USE_CONTROLLER_FAN)
1609 #if MAX6675_SEPARATE_SPI
1622 #if ENABLED(HEATER_1_USES_MAX6675)
1661 #if HAS_TEMP_CHAMBER
1664 #if ENABLED(FILAMENT_WIDTH_SENSOR)
1677 #if HAS_AUTO_FAN_1 && !_EFANOVERLAP(1,0)
1680 #if HAS_AUTO_FAN_2 && !(_EFANOVERLAP(2,0) || _EFANOVERLAP(2,1))
1683 #if HAS_AUTO_FAN_3 && !(_EFANOVERLAP(3,0) || _EFANOVERLAP(3,1) || _EFANOVERLAP(3,2))
1686 #if HAS_AUTO_FAN_4 && !(_EFANOVERLAP(4,0) || _EFANOVERLAP(4,1) || _EFANOVERLAP(4,2) || _EFANOVERLAP(4,3))
1689 #if HAS_AUTO_FAN_5 && !(_EFANOVERLAP(5,0) || _EFANOVERLAP(5,1) || _EFANOVERLAP(5,2) || _EFANOVERLAP(5,3) || _EFANOVERLAP(5,4))
1692 #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E
1701 #define _TEMP_MIN_E(NR) do{ \
1702 temp_range[NR].mintemp = HEATER_ ##NR## _MINTEMP; \
1703 while (analog_to_celsius_hotend(temp_range[NR].raw_min, NR) < HEATER_ ##NR## _MINTEMP) \
1704 temp_range[NR].raw_min += TEMPDIR(NR) * (OVERSAMPLENR); \
1706 #define _TEMP_MAX_E(NR) do{ \
1707 temp_range[NR].maxtemp = HEATER_ ##NR## _MAXTEMP; \
1708 while (analog_to_celsius_hotend(temp_range[NR].raw_max, NR) > HEATER_ ##NR## _MAXTEMP) \
1709 temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \
1712 #ifdef HEATER_0_MINTEMP
1715 #ifdef HEATER_0_MAXTEMP
1719 #ifdef HEATER_1_MINTEMP
1722 #ifdef HEATER_1_MAXTEMP
1726 #ifdef HEATER_2_MINTEMP
1729 #ifdef HEATER_2_MAXTEMP
1733 #ifdef HEATER_3_MINTEMP
1736 #ifdef HEATER_3_MAXTEMP
1740 #ifdef HEATER_4_MINTEMP
1743 #ifdef HEATER_4_MAXTEMP
1747 #ifdef HEATER_5_MINTEMP
1750 #ifdef HEATER_5_MAXTEMP
1753 #endif // HOTENDS > 5
1754 #endif // HOTENDS > 4
1755 #endif // HOTENDS > 3
1756 #endif // HOTENDS > 2
1757 #endif // HOTENDS > 1
1768 #endif // HAS_HEATED_BED
1770 #if HAS_HEATED_CHAMBER
1771 #ifdef CHAMBER_MINTEMP
1774 #ifdef CHAMBER_MAXTEMP
1779 #if ENABLED(PROBING_HEATERS_OFF)
◆ zero_fan_speeds()
static void Temperature::zero_fan_speeds |
( |
| ) |
|
|
static |
Static (class) methods
508 FANS_LOOP(
i) set_fan_speed(
i, 0);
◆ readings_ready()
void Temperature::readings_ready |
( |
| ) |
|
|
static |
Called from the Temperature ISR
2185 if (!temp_meas_ready) set_current_temp_raw();
2188 #if ENABLED(FILAMENT_WIDTH_SENSOR)
2194 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
2195 temp_hotend[1].reset();
2203 #if HAS_TEMP_CHAMBER
2204 temp_chamber.reset();
2219 static constexpr int8_t temp_dir[] = {
2220 #if ENABLED(HEATER_0_USES_MAX6675)
2226 #if ENABLED(HEATER_1_USES_MAX6675)
2239 #endif // HOTENDS > 5
2240 #endif // HOTENDS > 4
2241 #endif // HOTENDS > 3
2242 #endif // HOTENDS > 2
2243 #endif // HOTENDS > 1
2247 const int8_t tdir = temp_dir[e];
2249 const int16_t rawtemp = temp_hotend[e].raw * tdir;
2250 const bool heater_on = (temp_hotend[e].target > 0
2251 #if ENABLED(PIDTEMP)
2252 || temp_hotend[e].soft_pwm_amount > 0
2255 if (rawtemp > temp_range[e].raw_max * tdir) max_temp_error((
heater_ind_t)e);
2256 if (heater_on && rawtemp < temp_range[e].raw_min * tdir && !
is_preheating(e)) {
2257 #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
2258 if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED)
2262 #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
2264 consecutive_low_temperature_error[e] = 0;
2272 #if TEMPDIR(BED) < 0
2273 #define BEDCMP(A,B) ((A)<=(B))
2275 #define BEDCMP(A,B) ((A)>=(B))
2277 const bool bed_on = (temp_bed.target > 0)
2279 || (temp_bed.soft_pwm_amount > 0)
2282 if (BEDCMP(temp_bed.raw, maxtemp_raw_BED)) max_temp_error(
H_BED);
2283 if (bed_on && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(
H_BED);
2286 #if HAS_HEATED_CHAMBER
2287 #if TEMPDIR(CHAMBER) < 0
2288 #define CHAMBERCMP(A,B) ((A)<=(B))
2290 #define CHAMBERCMP(A,B) ((A)>=(B))
2292 const bool chamber_on = (temp_chamber.target > 0);
2293 if (CHAMBERCMP(temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(
H_CHAMBER);
2294 if (chamber_on && CHAMBERCMP(mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(
H_CHAMBER);
◆ isr()
void Temperature::isr |
( |
| ) |
|
|
static |
Standard heater PWM modulation
One sensor is sampled on every other call of the ISR. Each sensor is read 16 (OVERSAMPLENR) times, taking the average.
On each Prepare pass, ADC is started for a sensor pin. On the next pass, the ADC value is read and accumulated.
This gives each ADC 0.9765ms to charge up.
2348 static int8_t temp_count = -1;
2352 uint8_t pwm_count_tmp = pwm_count;
2355 static unsigned int raw_ADCKey_value = 0;
2356 static bool ADCKey_pressed =
false;
2367 #if HAS_HEATED_CHAMBER
2368 static SoftPWM soft_pwm_chamber;
2371 #if DISABLED(SLOW_PWM_HEATERS)
2373 #if HOTENDS || HAS_HEATED_BED || HAS_HEATED_CHAMBER
2375 #if ENABLED(SOFT_PWM_DITHER)
2381 #define _PWM_MOD(N,S,T) do{ \
2382 const bool on = S.add(pwm_mask, T.soft_pwm_amount); \
2383 WRITE_HEATER_##N(on); \
2390 if (pwm_count_tmp >= 127) {
2391 pwm_count_tmp -= 127;
2394 #define _PWM_MOD_E(N) _PWM_MOD(N,soft_pwm_hotend[N],temp_hotend[N])
2406 #endif // HOTENDS > 5
2407 #endif // HOTENDS > 4
2408 #endif // HOTENDS > 3
2409 #endif // HOTENDS > 2
2410 #endif // HOTENDS > 1
2414 _PWM_MOD(BED,soft_pwm_bed,temp_bed);
2417 #if HAS_HEATED_CHAMBER
2418 _PWM_MOD(CHAMBER,soft_pwm_chamber,temp_chamber);
2421 #if ENABLED(FAN_SOFT_PWM)
2422 #define _FAN_PWM(N) do{ \
2423 uint8_t &spcf = soft_pwm_count_fan[N]; \
2424 spcf = (spcf & pwm_mask) + (soft_pwm_amount_fan[N] >> 1); \
2425 WRITE_FAN(N, spcf > pwm_mask ? HIGH : LOW); \
2439 #define _PWM_LOW(N,S) do{ if (S.count <= pwm_count_tmp) WRITE_HEATER_##N(LOW); }while(0)
2441 #define _PWM_LOW_E(N) _PWM_LOW(N, soft_pwm_hotend[N])
2453 #endif // HOTENDS > 5
2454 #endif // HOTENDS > 4
2455 #endif // HOTENDS > 3
2456 #endif // HOTENDS > 2
2457 #endif // HOTENDS > 1
2464 #if HAS_HEATED_CHAMBER
2465 _PWM_LOW(CHAMBER, soft_pwm_chamber);
2468 #if ENABLED(FAN_SOFT_PWM)
2470 if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0,
LOW);
2473 if (soft_pwm_count_fan[1] <= pwm_count_tmp) WRITE_FAN(1,
LOW);
2476 if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN(2,
LOW);
2491 #else // SLOW_PWM_HEATERS
2498 #define _SLOW_SET(NR,PWM,V) do{ if (PWM.ready(V)) WRITE_HEATER_##NR(V); }while(0)
2499 #define _SLOW_PWM(NR,PWM,SRC) do{ PWM.count = SRC.soft_pwm_amount; _SLOW_SET(NR,PWM,(PWM.count > 0)); }while(0)
2500 #define _PWM_OFF(NR,PWM) do{ if (PWM.count < slow_pwm_count) _SLOW_SET(NR,PWM,0); }while(0)
2502 static uint8_t slow_pwm_count = 0;
2504 if (slow_pwm_count == 0) {
2507 #define _SLOW_PWM_E(N) _SLOW_PWM(N, soft_pwm_hotend[N], temp_hotend[N])
2519 #endif // HOTENDS > 5
2520 #endif // HOTENDS > 4
2521 #endif // HOTENDS > 3
2522 #endif // HOTENDS > 2
2523 #endif // HOTENDS > 1
2527 _SLOW_PWM(BED, soft_pwm_bed, temp_bed);
2533 #define _PWM_OFF_E(N) _PWM_OFF(N, soft_pwm_hotend[N]);
2545 #endif // HOTENDS > 5
2546 #endif // HOTENDS > 4
2547 #endif // HOTENDS > 3
2548 #endif // HOTENDS > 2
2549 #endif // HOTENDS > 1
2553 _PWM_OFF(BED, soft_pwm_bed);
2556 #if ENABLED(FAN_SOFT_PWM)
2557 if (pwm_count_tmp >= 127) {
2559 #define _PWM_FAN(N) do{ \
2560 soft_pwm_count_fan[N] = soft_pwm_amount_fan[N] >> 1; \
2561 WRITE_FAN(N, soft_pwm_count_fan[N] > 0 ? HIGH : LOW); \
2574 if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0,
LOW);
2577 if (soft_pwm_count_fan[1] <= pwm_count_tmp) WRITE_FAN(1,
LOW);
2580 if (soft_pwm_count_fan[2] <= pwm_count_tmp) WRITE_FAN(2,
LOW);
2582 #endif // FAN_SOFT_PWM
2598 slow_pwm_count &= 0x7F;
2601 soft_pwm_hotend[0].dec();
2603 soft_pwm_hotend[1].dec();
2605 soft_pwm_hotend[2].dec();
2607 soft_pwm_hotend[3].dec();
2609 soft_pwm_hotend[4].dec();
2611 soft_pwm_hotend[5].dec();
2612 #endif // HOTENDS > 5
2613 #endif // HOTENDS > 4
2614 #endif // HOTENDS > 3
2615 #endif // HOTENDS > 2
2616 #endif // HOTENDS > 1
2623 #endif // SLOW_PWM_HEATERS
2628 static bool do_buttons;
2629 if ((do_buttons ^=
true))
ui.update_buttons();
2640 #define ACCUMULATE_ADC(obj) do{ \
2641 if (!HAL_ADC_READY()) next_sensor_state = adc_sensor_state; \
2642 else obj.sample(HAL_READ_ADC()); \
2647 switch (adc_sensor_state) {
2653 static uint8_t delay_count = 0;
2654 if (extra_loops > 0) {
2655 if (delay_count == 0) delay_count = extra_loops;
2683 #if HAS_TEMP_CHAMBER
2713 #if ENABLED(FILAMENT_WIDTH_SENSOR)
2715 case Measure_FILWIDTH:
2717 next_sensor_state = adc_sensor_state;
2740 case Measure_ADC_KEY:
2742 next_sensor_state = adc_sensor_state;
2743 else if (ADCKey_count < 16) {
2745 if (raw_ADCKey_value <= 900) {
2746 NOMORE(current_ADCKey_raw, raw_ADCKey_value);
2750 if (ADCKey_count > 0) ADCKey_count++;
else ADCKey_pressed =
false;
2751 if (ADCKey_pressed) {
2753 current_ADCKey_raw = 1024;
2757 if (ADCKey_count == 16) ADCKey_pressed =
true;
2759 #endif // ADC_KEYPAD
2766 adc_sensor_state = next_sensor_state;
2772 #if ENABLED(BABYSTEPPING)
◆ manage_heater()
void Temperature::manage_heater |
( |
| ) |
|
|
static |
Call periodically to manage heaters
Manage heating activities for extruder hot-ends and a heated bed
- Acquire updated temperature readings
- Also resets the watchdog timer
- Invoke thermal runaway protection
- Manage extruder auto-fan
- Apply filament width to the extrusion rate (may move)
- Update the heated bed PID output value
982 #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
983 static bool last_pause_state;
986 #if ENABLED(EMERGENCY_PARSER)
990 if (!temp_meas_ready)
return;
992 updateTemperaturesFromRawValues();
994 #if ENABLED(HEATER_0_USES_MAX6675)
999 #if ENABLED(HEATER_1_USES_MAX6675)
1009 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
1010 if (
degHotend(e) > temp_range[e].maxtemp)
1014 #if HEATER_IDLE_HANDLER
1018 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
1020 thermal_runaway_protection(tr_state_machine[e], temp_hotend[e].celsius, temp_hotend[e].target, (
heater_ind_t)e, THERMAL_PROTECTION_PERIOD, THERMAL_PROTECTION_HYSTERESIS);
1023 temp_hotend[e].soft_pwm_amount = (temp_hotend[e].celsius > temp_range[e].mintemp ||
is_preheating(e)) && temp_hotend[e].celsius < temp_range[e].maxtemp ? (
int)get_pid_output_hotend(e) >> 1 : 0;
1027 if (watch_hotend[e].next_ms &&
ELAPSED(ms, watch_hotend[e].next_ms)) {
1028 if (
degHotend(e) < watch_hotend[e].target)
1035 #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
1046 if (
ELAPSED(ms, next_auto_fan_check_ms)) {
1047 checkExtruderAutoFans();
1048 next_auto_fan_check_ms = ms + 2500UL;
1052 #if ENABLED(FILAMENT_WIDTH_SENSOR)
1062 #if ENABLED(THERMAL_PROTECTION_BED)
1069 if (watch_bed.elapsed(ms)) {
1070 if (degBed() < watch_bed.target)
1073 start_watching_bed();
1079 #if DISABLED(PIDTEMPBED)
1080 if (
PENDING(ms, next_bed_check_ms)
1081 #
if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
1082 && paused == last_pause_state
1085 next_bed_check_ms = ms + BED_CHECK_INTERVAL;
1086 #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING)
1087 last_pause_state = paused;
1091 #if HEATER_IDLE_HANDLER
1095 #if HAS_THERMALLY_PROTECTED_BED
1096 thermal_runaway_protection(tr_state_machine_bed, temp_bed.celsius, temp_bed.target,
H_BED, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS);
1099 #if HEATER_IDLE_HANDLER
1101 temp_bed.soft_pwm_amount = 0;
1102 #if DISABLED(PIDTEMPBED)
1103 WRITE_HEATER_BED(
LOW);
1109 #if ENABLED(PIDTEMPBED)
1114 #if ENABLED(BED_LIMIT_SWITCHING)
1115 if (temp_bed.celsius >= temp_bed.target + BED_HYSTERESIS)
1116 temp_bed.soft_pwm_amount = 0;
1117 else if (temp_bed.celsius <= temp_bed.target - (BED_HYSTERESIS))
1120 temp_bed.soft_pwm_amount = temp_bed.celsius < temp_bed.target ?
MAX_BED_POWER >> 1 : 0;
1124 temp_bed.soft_pwm_amount = 0;
1125 WRITE_HEATER_BED(
LOW);
1132 #endif // HAS_HEATED_BED
1134 #if HAS_HEATED_CHAMBER
1136 #ifndef CHAMBER_CHECK_INTERVAL
1137 #define CHAMBER_CHECK_INTERVAL 1000UL
1140 #if ENABLED(THERMAL_PROTECTION_CHAMBER)
1147 if (watch_chamber.elapsed(ms)) {
1148 if (degChamber() < watch_chamber.target)
1155 if (
ELAPSED(ms, next_chamber_check_ms)) {
1156 next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL;
1159 #if ENABLED(CHAMBER_LIMIT_SWITCHING)
1161 temp_chamber.soft_pwm_amount = 0;
1163 temp_chamber.soft_pwm_amount = MAX_CHAMBER_POWER >> 1;
1165 temp_chamber.soft_pwm_amount = temp_chamber.celsius < temp_chamber.target ? MAX_CHAMBER_POWER >> 1 : 0;
1169 temp_chamber.soft_pwm_amount = 0;
1170 WRITE_HEATER_CHAMBER(
LOW);
1173 #if ENABLED(THERMAL_PROTECTION_CHAMBER)
1174 thermal_runaway_protection(tr_state_machine_chamber, temp_chamber.celsius, temp_chamber.target,
H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS);
1181 #endif // HAS_HEATED_CHAMBER
◆ degHotend()
◆ degTargetHotend()
◆ start_watching_hotend()
◆ start_watching_chamber()
static void Temperature::start_watching_chamber |
( |
| ) |
|
|
static |
◆ getHeaterPower()
The software PWM power for a heater
Class and Instance Methods
610 case H_BED:
return temp_bed.soft_pwm_amount;
612 #if HAS_HEATED_CHAMBER
613 case H_CHAMBER:
return temp_chamber.soft_pwm_amount;
617 return temp_hotend[heater_id].soft_pwm_amount;
◆ disable_all_heaters()
void Temperature::disable_all_heaters |
( |
| ) |
|
|
static |
Switch off all heaters, set all target temperatures to 0
1928 #if ENABLED(AUTOTEMP)
1929 planner.autotemp_enabled =
false;
1940 #if HAS_HEATED_CHAMBER
1941 setTargetChamber(0);
1945 #if ENABLED(PROBING_HEATERS_OFF)
1949 #define DISABLE_HEATER(NR) { \
1950 setTargetHotend(0, NR); \
1951 temp_hotend[NR].soft_pwm_amount = 0; \
1952 WRITE_HEATER_ ##NR (LOW); \
1967 #endif // HOTENDS > 5
1968 #endif // HOTENDS > 4
1969 #endif // HOTENDS > 3
1970 #endif // HOTENDS > 2
1971 #endif // HOTENDS > 1
1975 temp_bed.target = 0;
1976 temp_bed.soft_pwm_amount = 0;
1977 WRITE_HEATER_BED(
LOW);
1980 #if HAS_HEATED_CHAMBER
1981 temp_chamber.target = 0;
1982 temp_chamber.soft_pwm_amount = 0;
1983 WRITE_HEATER_CHAMBER(
LOW);
◆ PID_autotune()
Perform auto-tuning for hotend or bed in response to M303
◆ reset_heater_idle_timer()
Update the temp manager when PID values change
◆ reset_bed_idle_timer()
static void Temperature::reset_bed_idle_timer |
( |
| ) |
|
|
static |
736 start_watching_bed();
◆ print_heater_states()
◆ in_temp_isr
volatile bool Temperature::in_temp_isr |
|
static |
◆ hotend_idle
◆ bed_idle
◆ chamber_idle
#define ACCUMULATE_ADC(obj)
#define WITHIN(N, L, H)
Definition: macros.h:195
#define PENDING(NOW, SOON)
Definition: millis_t.h:28
#define GET_TEXT(MSG)
Definition: multi_language.h:72
static FORCE_INLINE bool tooColdToExtrude(const uint8_t)
Definition: temperature.h:314
#define MAX_BED_POWER
Definition: Configuration_A3ides_2209_MINI.h:481
#define HEATER_BED_PIN
Definition: pins_ESP32.h:83
#define CHAMBER_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:397
#define TEMPDIR(N)
Definition: temperature.cpp:267
void update(const millis_t &ms)
Definition: temperature.h:201
#define FAN1_PIN
Definition: pins_AZSMZ_MINI.h:87
Definition: temperature.h:134
#define PIDTEMPBED
Definition: Configuration_A3ides_2209_MINI.h:471
#define OUT_WRITE(IO, V)
Definition: fastio.h:108
#define INIT_CHAMBER_AUTO_FAN_PIN(P)
Definition: temperature.cpp:1530
#define HEATER_CHAMBER_PIN
Definition: Configuration_A3ides_2209_MINI.h:355
#define E0_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:285
#define HEATER_1_MINTEMP
Definition: Configuration_A3ides_2209_MINI.h:379
#define FAN2_PIN
Definition: pins_CHEAPTRONICv2.h:92
#define LOW
Definition: wiring_constants.h:70
void reset()
Definition: temperature.h:203
#define HAL_READ_ADC()
Definition: HAL.h:360
#define INIT_FAN_PIN(P)
Definition: temperature.cpp:1523
#define _MAX(V...)
Definition: macros.h:346
#define E1_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:286
#define HEATER_0_MINTEMP
Definition: Configuration_A3ides_2209_MINI.h:378
#define TEMP_TIMER_NUM
Definition: HAL.h:128
uint8_t i
Definition: screen_test_graph.c:72
#define _MIN(V...)
Definition: macros.h:333
#define MIN_ADC_ISR_LOOPS
Definition: temperature.h:140
#define TEMP_BED_PIN
Definition: pins_ESP32.h:76
#define BED_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:396
void kill(PGM_P const lcd_error, PGM_P const lcd_component, const bool steppers_off)
Definition: Marlin.cpp:718
uint32_t millis(void)
Definition: wiring_time.c:29
Definition: temperature.h:93
#define TEMP_2_PIN
Definition: pins_MKS_SBASE.h:96
static bool killed_by_M112
Definition: emergency_parser.h:65
static FORCE_INLINE float degHotend(const uint8_t E_NAME)
Definition: temperature.h:544
FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t)
Definition: HAL.h:149
ADCSensorState
Definition: temperature.h:92
static void poll()
Definition: endstops.cpp:272
EmergencyParser emergency_parser
#define OUT_WRITE_OD(IO, V)
Definition: fastio.h:115
#define HAL_ADC_READY()
Definition: HAL.h:361
#define HEATER_2_PIN
Definition: pins_COHESION3D_REMIX.h:116
#define NOMORE(v, n)
Definition: macros.h:133
#define FAN_PIN
Definition: pins_ESP32.h:82
#define SET_INPUT_PULLUP(IO)
Definition: fastio.h:100
#define ABS(a)
Definition: macros.h:266
#define E2_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:287
#define HEATER_0_PIN
Definition: pins_ESP32.h:81
#define HEATER_3_PIN
Definition: pins_CNCONTROLS_11.h:68
Definition: temperature.h:133
#define TEMP_TIMER_FREQUENCY
Definition: HAL.h:131
#define PSTR(str)
Definition: pgmspace.h:31
#define E4_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:289
static FORCE_INLINE bool targetTooColdToExtrude(const uint8_t)
Definition: temperature.h:315
#define FILWIDTH_PIN
Definition: pins_RAMPS_LINUX.h:211
#define ENABLE_TEMPERATURE_INTERRUPT()
Definition: HAL.h:145
Definition: temperature.h:52
#define COUNT(a)
Definition: macros.h:200
FilamentWidthSensor filwidth
#define TEMP_CHAMBER_PIN
Definition: pins_CNCONTROLS_15.h:54
#define HAL_START_ADC(pin)
Definition: HAL.h:357
#define HEATER_5_PIN
Definition: pins.h:757
static heater_idle_t hotend_idle[HOTENDS]
Definition: temperature.h:322
static void update_volumetric()
Definition: filwidth.h:108
#define HEATER_0_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:390
#define E3_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:288
static void accumulate(const uint16_t adc)
Definition: filwidth.h:63
#define MISO_PIN
Definition: spi_pins.h:58
#define HEATER_1_PIN
Definition: pins_RAMPS_LINUX.h:196
bool timed_out
Definition: temperature.h:200
#define HOTEND_LOOP()
Definition: Conditionals_LCD.h:436
Definition: temperature.h:51
#define TEMP_CHAMBER_HYSTERESIS
Definition: Configuration_A3ides_2209_MINI.h:374
#define ELAPSED(NOW, SOON)
Definition: millis_t.h:29
#define HEATER_4_PIN
Definition: pins.h:754
#define MAX6675_SS2_PIN
Definition: pins_MIGHTYBOARD_REVE.h:142
const uint8_t[]
Definition: 404_html.c:3
#define TEMP_3_PIN
Definition: pins_RAMPS_RE_ARM.h:169
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF
Definition: Configuration_A3ides_2209_MINI.h:364
#define _PWM_MOD(N, S, T)
static void reading_ready()
Definition: filwidth.h:74
#define SCK_PIN
Definition: spi_pins.h:55
#define _BV(bit)
Definition: wiring_constants.h:99
void HAL_adc_init()
Definition: HAL.h:345
Definition: temperature.h:51
void delay(uint32_t ms)
Definition: wiring_time.c:42
#define HAL_ANALOG_SELECT(pin)
Definition: HAL.h:342
#define MSG_REDUNDANCY
Definition: language.h:292
#define INIT_E_AUTO_FAN_PIN(P)
Definition: temperature.cpp:1525
#define OVERSAMPLENR
Definition: thermistors.h:26
#define E5_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:290
#define MOSI_PIN
Definition: spi_pins.h:61
static void start_watching_hotend(const uint8_t=0)
Definition: temperature.h:573
#define CHAMBER_MINTEMP
Definition: Configuration_A3ides_2209_MINI.h:385
static heater_idle_t bed_idle
Definition: temperature.h:324
#define HEATER_1_MAXTEMP
Definition: Configuration_A3ides_2209_MINI.h:391
#define HIGH
Definition: wiring_constants.h:71
#define DISABLE_HEATER(NR)
static void start_watching_chamber()
Definition: temperature.h:670
#define MAX6675_SS_PIN
Definition: pins_RAMPS_LINUX.h:138
#define TEMP_1_PIN
Definition: pins_RAMPS_LINUX.h:131
#define CHAMBER_AUTO_FAN_PIN
Definition: Configuration_A3ides_2209_MINI_adv.h:291
#define BED_MINTEMP
Definition: Configuration_A3ides_2209_MINI.h:384
int
Definition: createSpeedLookupTable.py:15
#define HOTENDS
Definition: Conditionals_LCD.h:425
#define TEMP_5_PIN
Definition: pins.h:779
#define BOTH(V1, V2)
Definition: macros.h:183
Definition: temperature.h:52
#define TEMP_0_PIN
Definition: pins_ESP32.h:75
#define SS_PIN
Definition: spi_pins.h:64
static void readings_ready()
Definition: temperature.cpp:2182
#define is_preheating(n)
Definition: temperature.h:537
static void tick()
Definition: planner.h:750
#define _PWM_FAN
Definition: hwio_a3ides.h:43
#define MSG_T_THERMAL_RUNAWAY
Definition: language.h:294
#define UNUSED(X)
Definition: stm32f4xx_hal_def.h:74
Endstops endstops
Definition: endstops.cpp:51
void watchdog_refresh()
Definition: HAL.h:28
uint32_t millis_t
Definition: millis_t.h:26
#define CONTROLLER_FAN_PIN
Definition: pins_MEGACONTROLLER.h:121
#define TEMP_4_PIN
Definition: pins.h:776
Definition: temperature.cpp:2325
heater_ind_t
Definition: temperature.h:49
#define MSG_T_HEATING_FAILED
Definition: language.h:293
#define ENABLED(V...)
Definition: macros.h:177
Planner planner
Definition: planner.cpp:111
#define HOTEND_INDEX
Definition: temperature.h:41
#define SOFT_PWM_SCALE
Definition: Configuration_A3ides_2209_MINI.h:1986