🔧 Assert Probe Temp Comp requirements (#24468)
This commit is contained in:
parent
39863d54b0
commit
0a4aa0978d
|
@ -556,16 +556,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Probe Temperature Compensation
|
|
||||||
#if !TEMP_SENSOR_PROBE
|
|
||||||
#undef PTC_PROBE
|
|
||||||
#endif
|
|
||||||
#if !TEMP_SENSOR_BED
|
|
||||||
#undef PTC_BED
|
|
||||||
#endif
|
|
||||||
#if !HAS_EXTRUDERS
|
|
||||||
#undef PTC_HOTEND
|
|
||||||
#endif
|
|
||||||
#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND)
|
#if ANY(PTC_PROBE, PTC_BED, PTC_HOTEND)
|
||||||
#define HAS_PTC 1
|
#define HAS_PTC 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -664,6 +664,10 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(PTC_PROBE)
|
||||||
|
#if !TEMP_SENSOR_PROBE
|
||||||
|
#error "PTC_PROBE requires a probe with a thermistor."
|
||||||
|
#endif
|
||||||
#ifdef PTC_PROBE_START
|
#ifdef PTC_PROBE_START
|
||||||
constexpr auto _ptc_sample_start = PTC_PROBE_START;
|
constexpr auto _ptc_sample_start = PTC_PROBE_START;
|
||||||
constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f;
|
constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f;
|
||||||
|
@ -674,6 +678,17 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f;
|
constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f;
|
||||||
static_assert(_test_ptc_sample_res != 12.3f, "PTC_PROBE_RES must be a whole number.");
|
static_assert(_test_ptc_sample_res != 12.3f, "PTC_PROBE_RES must be a whole number.");
|
||||||
#endif
|
#endif
|
||||||
|
#if ENABLED(PTC_BED) && defined(PTC_PROBE_TEMP)
|
||||||
|
constexpr auto _btc_probe_temp = PTC_PROBE_TEMP;
|
||||||
|
constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f;
|
||||||
|
static_assert(_test_btc_probe_temp != 12.3f, "PTC_PROBE_TEMP must be a whole number.");
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(PTC_BED)
|
||||||
|
#if !TEMP_SENSOR_BED
|
||||||
|
#error "PTC_BED requires a bed with a thermistor."
|
||||||
|
#endif
|
||||||
#ifdef PTC_BED_START
|
#ifdef PTC_BED_START
|
||||||
constexpr auto _btc_sample_start = PTC_BED_START;
|
constexpr auto _btc_sample_start = PTC_BED_START;
|
||||||
constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f;
|
constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f;
|
||||||
|
@ -684,14 +699,11 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f;
|
constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f;
|
||||||
static_assert(_test_btc_sample_res != 12.3f, "PTC_BED_RES must be a whole number.");
|
static_assert(_test_btc_sample_res != 12.3f, "PTC_BED_RES must be a whole number.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef PTC_PROBE_TEMP
|
|
||||||
constexpr auto _btc_probe_temp = PTC_PROBE_TEMP;
|
|
||||||
constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f;
|
|
||||||
static_assert(_test_btc_probe_temp != 12.3f, "PTC_PROBE_TEMP must be a whole number.");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PTC_HOTEND)
|
#if ENABLED(PTC_HOTEND)
|
||||||
#if EXTRUDERS != 1
|
#if EXTRUDERS != 1
|
||||||
#error "PTC_HOTEND only works with a single extruder."
|
#error "PTC_HOTEND requires a single extruder."
|
||||||
#endif
|
#endif
|
||||||
#ifdef PTC_HOTEND_START
|
#ifdef PTC_HOTEND_START
|
||||||
constexpr auto _etc_sample_start = PTC_HOTEND_START;
|
constexpr auto _etc_sample_start = PTC_HOTEND_START;
|
||||||
|
|
Loading…
Reference in a new issue