Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» More IntelliSense-friendly declares
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 18, 2023
1 parent c914761 commit f50603f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
16 changes: 12 additions & 4 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
// Init min and max temp with extreme values to prevent false errors during startup
raw_adc_t Temperature::mintemp_raw_BED = TEMP_SENSOR_BED_RAW_LO_TEMP,
Temperature::maxtemp_raw_BED = TEMP_SENSOR_BED_RAW_HI_TEMP;
TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 }
IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms);
#if WATCH_BED
bed_watch_t Temperature::watch_bed; // = { 0 }
#endif
#if DISABLED(PIDTEMPBED)
millis_t Temperature::next_bed_check_ms;
#endif
#endif

#if HAS_TEMP_CHAMBER
Expand All @@ -519,8 +523,12 @@ PGMSTR(str_t_heating_failed, STR_T_HEATING_FAILED);
celsius_float_t old_temp = 9999;
raw_adc_t Temperature::mintemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_LO_TEMP,
Temperature::maxtemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_HI_TEMP;
TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0});
IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms);
#if WATCH_CHAMBER
chamber_watch_t Temperature::watch_chamber; // = { 0 }
#endif
#if DISABLED(PIDTEMPCHAMBER)
millis_t Temperature::next_chamber_check_ms;
#endif
#endif
#endif

Expand Down
14 changes: 9 additions & 5 deletions Marlin/src/module/temperature.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,23 +725,27 @@ class Temperature {
#endif

#if HAS_HEATED_BED
#if ENABLED(WATCH_BED)
#if WATCH_BED
static bed_watch_t watch_bed;
#endif
IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms);
#if DISABLED(PIDTEMPBED)
static millis_t next_bed_check_ms;
#endif
static raw_adc_t mintemp_raw_BED, maxtemp_raw_BED;
#endif

#if HAS_HEATED_CHAMBER
#if ENABLED(WATCH_CHAMBER)
#if WATCH_CHAMBER
static chamber_watch_t watch_chamber;
#endif
TERN(PIDTEMPCHAMBER,,static millis_t next_chamber_check_ms);
#if DISABLED(PIDTEMPCHAMBER)
static millis_t next_chamber_check_ms;
#endif
static raw_adc_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER;
#endif

#if HAS_COOLER
#if ENABLED(WATCH_COOLER)
#if WATCH_COOLER
static cooler_watch_t watch_cooler;
#endif
static millis_t next_cooler_check_ms, cooler_fan_flush_ms;
Expand Down

0 comments on commit f50603f

Please sign in to comment.