Skip to content

Commit 1189202

Browse files
committed
simplify
1 parent 458fc54 commit 1189202

File tree

2 files changed

+30
-38
lines changed

2 files changed

+30
-38
lines changed

Marlin/Configuration_adv.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
#define COOLER_MAXTEMP 26 // (°C)
203203
#define COOLER_DEFAULT_TEMP 16 // (°C)
204204
#define TEMP_COOLER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target
205-
#define COOLER_PIN 8 // Laser cooler on/off pin used to control power to the cooling element e.g. TEC, External chiller via relay
205+
#define COOLER_PIN 8 // Laser cooler on/off pin used to control power to the cooling element (e.g., TEC, External chiller via relay)
206206
#define COOLER_INVERTING false
207207
#define TEMP_COOLER_PIN 15 // Laser/Cooler temperature sensor pin. ADC is required.
208208
#define COOLER_FAN // Enable a fan on the cooler, Fan# 0,1,2,3 etc.
@@ -1961,21 +1961,21 @@
19611961
//#define USE_TEMP_EXT_COMPENSATION
19621962

19631963
// Probe temperature calibration generates a table of values starting at PTC_SAMPLE_START
1964-
// (e.g. 30), in steps of PTC_SAMPLE_RES (e.g. 5) with PTC_SAMPLE_COUNT (e.g. 10) samples.
1964+
// (e.g., 30), in steps of PTC_SAMPLE_RES (e.g., 5) with PTC_SAMPLE_COUNT (e.g., 10) samples.
19651965

1966-
//#define PTC_SAMPLE_START 30
1967-
//#define PTC_SAMPLE_RES 5
1966+
//#define PTC_SAMPLE_START 30 // (°C)
1967+
//#define PTC_SAMPLE_RES 5 // (°C)
19681968
//#define PTC_SAMPLE_COUNT 10
19691969

19701970
// Bed temperature calibration builds a similar table.
19711971

1972-
//#define BTC_SAMPLE_START 60
1973-
//#define BTC_SAMPLE_RES 5
1972+
//#define BTC_SAMPLE_START 60 // (°C)
1973+
//#define BTC_SAMPLE_RES 5 // (°C)
19741974
//#define BTC_SAMPLE_COUNT 10
19751975

19761976
// The temperature the probe should be at while taking measurements during bed temperature
19771977
// calibration.
1978-
//#define BTC_PROBE_TEMP 30
1978+
//#define BTC_PROBE_TEMP 30 // (°C)
19791979

19801980
// Height above Z=0.0f to raise the nozzle. Lowering this can help the probe to heat faster.
19811981
// Note: the Z=0.0f offset is determined by the probe offset which can be set using M851.
@@ -2099,7 +2099,7 @@
20992099
// @section motion
21002100

21012101
// The number of linear moves that can be in the planner at once.
2102-
// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g. 8, 16, 32)
2102+
// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32)
21032103
#if BOTH(SDSUPPORT, DIRECT_STEPPING)
21042104
#define BLOCK_BUFFER_SIZE 8
21052105
#elif ENABLED(SDSUPPORT)

Marlin/src/inc/SanityCheck.h

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -577,39 +577,10 @@
577577
constexpr float arm[] = AXIS_RELATIVE_MODES;
578578
static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
579579

580-
#ifdef PTC_SAMPLE_START
581-
auto _ptc_sample_start = PTC_SAMPLE_START;
582-
constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f;
583-
static_assert( _test_ptc_sample_start != 12.3f , "PTC_SAMPLE_START should not be a float; use whole numbers only.");
584-
#endif
585-
586-
#ifdef PTC_SAMPLE_RES
587-
auto _ptc_sample_res = PTC_SAMPLE_END;
588-
constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f;
589-
static_assert( _test_ptc_sample_res != 12.3f , "PTC_SAMPLE_RES should not be a float; use whole numbers only.");
590-
#endif
591-
592-
#ifdef BTC_SAMPLE_START
593-
auto _btc_sample_start = BTC_SAMPLE_START;
594-
constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f;
595-
static_assert( _test_btc_sample_start != 12.3f , "BTC_SAMPLE_START should not be a float; use whole numbers only.");
596-
#endif
597-
598-
#ifdef BTC_SAMPLE_RES
599-
auto _btc_sample_res = BTC_SAMPLE_END;
600-
constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f;
601-
static_assert( _test_btc_sample_res != 12.3f , "BTC_SAMPLE_RES should not be a float; use whole numbers only.");
602-
#endif
603-
604-
#ifdef BTC_PROBE_TEMP
605-
auto _btc_probe_temp = BTC_PROBE_TEMP;
606-
constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f;
607-
static_assert( _test_btc_probe_temp != 12.3f , "BTC_SAMPLE_RES should not be a float; use whole numbers only.");
608-
#endif
609-
610580
/**
611581
* Probe temp compensation requirements
612582
*/
583+
613584
#if ENABLED(PROBE_TEMP_COMPENSATION)
614585
#if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z)
615586
#error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)."
@@ -620,6 +591,27 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
620591
#elif !defined(PTC_PROBE_POS)
621592
#error "PROBE_TEMP_COMPENSATION requires PTC_PROBE_POS."
622593
#endif
594+
595+
#ifdef PTC_SAMPLE_START
596+
constexpr int _ptc_sample_start = PTC_SAMPLE_START;
597+
static_assert(_test_ptc_sample_start != PTC_SAMPLE_START, "PTC_SAMPLE_START must be a whole number.");
598+
#endif
599+
#ifdef PTC_SAMPLE_RES
600+
constexpr int _ptc_sample_res = PTC_SAMPLE_END;
601+
static_assert(_test_ptc_sample_res != PTC_SAMPLE_END, "PTC_SAMPLE_RES must be a whole number.");
602+
#endif
603+
#ifdef BTC_SAMPLE_START
604+
constexpr int _btc_sample_start = BTC_SAMPLE_START;
605+
static_assert(_test_btc_sample_start != BTC_SAMPLE_START, "BTC_SAMPLE_START must be a whole number.");
606+
#endif
607+
#ifdef BTC_SAMPLE_RES
608+
constexpr int _btc_sample_res = BTC_SAMPLE_END;
609+
static_assert(_test_btc_sample_res != BTC_SAMPLE_END, "BTC_SAMPLE_RES must be a whole number.");
610+
#endif
611+
#ifdef BTC_PROBE_TEMP
612+
constexpr int _btc_probe_temp = BTC_PROBE_TEMP;
613+
static_assert(_test_btc_probe_temp != BTC_PROBE_TEMP, "BTC_PROBE_TEMP must be a whole number.");
614+
#endif
623615
#endif
624616

625617
/**

0 commit comments

Comments
 (0)