Browse Source

🐛 Fix PTC/BTC whole number tests (#22255)

vanilla_fb_2.0.x
Katelyn Schiesser 3 years ago
committed by Scott Lahteine
parent
commit
b1c5dd985e
  1. 25
      Marlin/src/inc/SanityCheck.h

25
Marlin/src/inc/SanityCheck.h

@ -593,24 +593,29 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#endif #endif
#ifdef PTC_SAMPLE_START #ifdef PTC_SAMPLE_START
constexpr int _ptc_sample_start = PTC_SAMPLE_START; constexpr auto _ptc_sample_start = PTC_SAMPLE_START;
static_assert(_test_ptc_sample_start != PTC_SAMPLE_START, "PTC_SAMPLE_START must be a whole number."); constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f;
static_assert(_test_ptc_sample_start != 12.3f, "PTC_SAMPLE_START must be a whole number.");
#endif #endif
#ifdef PTC_SAMPLE_RES #ifdef PTC_SAMPLE_RES
constexpr int _ptc_sample_res = PTC_SAMPLE_END; constexpr auto _ptc_sample_res = PTC_SAMPLE_RES;
static_assert(_test_ptc_sample_res != PTC_SAMPLE_END, "PTC_SAMPLE_RES must be a whole number."); constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f;
static_assert(_test_ptc_sample_res != 12.3f, "PTC_SAMPLE_RES must be a whole number.");
#endif #endif
#ifdef BTC_SAMPLE_START #ifdef BTC_SAMPLE_START
constexpr int _btc_sample_start = BTC_SAMPLE_START; constexpr auto _btc_sample_start = BTC_SAMPLE_START;
static_assert(_test_btc_sample_start != BTC_SAMPLE_START, "BTC_SAMPLE_START must be a whole number."); constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f;
static_assert(_test_btc_sample_start != 12.3f, "BTC_SAMPLE_START must be a whole number.");
#endif #endif
#ifdef BTC_SAMPLE_RES #ifdef BTC_SAMPLE_RES
constexpr int _btc_sample_res = BTC_SAMPLE_END; constexpr _btc_sample_res = BTC_SAMPLE_RES;
static_assert(_test_btc_sample_res != BTC_SAMPLE_END, "BTC_SAMPLE_RES must be a whole number."); constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f;
static_assert(_test_btc_sample_res != 12.3f, "BTC_SAMPLE_RES must be a whole number.");
#endif #endif
#ifdef BTC_PROBE_TEMP #ifdef BTC_PROBE_TEMP
constexpr int _btc_probe_temp = BTC_PROBE_TEMP; constexpr auto _btc_probe_temp = BTC_PROBE_TEMP;
static_assert(_test_btc_probe_temp != BTC_PROBE_TEMP, "BTC_PROBE_TEMP must be a whole number."); constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f;
static_assert(_test_btc_probe_temp != 12.3f, "BTC_PROBE_TEMP must be a whole number.");
#endif #endif
#endif #endif

Loading…
Cancel
Save