From 5f587126b92c6ab9324f61f394e8705786192919 Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Wed, 11 Jul 2018 17:42:23 -0400 Subject: [PATCH] Loosen static assertion guarding overflow in SCAN_THERMISTOR_TABLE (#11240) Bisect search merged in #10882 actually works fine for thermistor tables with up to 255 entries with no overflow, due to C++ integer promotion rules. Closes issue #11220. --- Marlin/thermistortables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/thermistortables.h b/Marlin/thermistortables.h index 462337778..a65d3eb50 100644 --- a/Marlin/thermistortables.h +++ b/Marlin/thermistortables.h @@ -204,8 +204,8 @@ #endif // The SCAN_THERMISTOR_TABLE macro needs alteration? -static_assert(HEATER_0_TEMPTABLE_LEN < 128 && HEATER_1_TEMPTABLE_LEN < 128 && HEATER_2_TEMPTABLE_LEN < 128 && HEATER_3_TEMPTABLE_LEN < 128 && HEATER_4_TEMPTABLE_LEN < 128 && BEDTEMPTABLE_LEN < 128 && CHAMBERTEMPTABLE_LEN < 128, - "Temperature conversion tables over 127 entries need special consideration." +static_assert(HEATER_0_TEMPTABLE_LEN < 256 && HEATER_1_TEMPTABLE_LEN < 256 && HEATER_2_TEMPTABLE_LEN < 256 && HEATER_3_TEMPTABLE_LEN < 256 && HEATER_4_TEMPTABLE_LEN < 256 && BEDTEMPTABLE_LEN < 256 && CHAMBERTEMPTABLE_LEN < 256, + "Temperature conversion tables over 255 entries need special consideration." ); // Set the high and low raw values for the heaters