From 2116262845e9100b575ccf23c17ba3de59cfa45f Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 12 Jul 2018 18:46:12 +0200 Subject: [PATCH] Fix *_MAX_ACCEL integer overflow. --- Firmware/temperature.cpp | 2 +- Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h | 4 ++-- Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 83ead13b..0d7c6a3b 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -1473,7 +1473,7 @@ void bed_min_temp_error(void) { } #ifndef BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE Stop(); -#endif*/ +#endif } #ifdef HEATER_0_USES_MAX6675 diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index 2889c4e7..b89b668c 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -96,12 +96,12 @@ #define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min) //Silent mode limits -#define SILENT_MAX_ACCEL 960 // max axxeleration in silent mode in mm/s^2 +#define SILENT_MAX_ACCEL 960ul // max axxeleration in silent mode in mm/s^2 #define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2 #define SILENT_MAX_FEEDRATE 172 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min) //Normal mode limits -#define NORMAL_MAX_ACCEL 2500 // Y-axis max axxeleration in normal mode in mm/s^2 +#define NORMAL_MAX_ACCEL 2500ul // Y-axis max axxeleration in normal mode in mm/s^2 #define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2 #define NORMAL_MAX_FEEDRATE 200 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min) diff --git a/Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h index f57c6da1..88f0075c 100644 --- a/Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h @@ -97,12 +97,12 @@ #define MANUAL_FEEDRATE {2700, 2700, 1000, 100} // set the speeds for manual moves (mm/min) //Silent mode limits -#define SILENT_MAX_ACCEL 960 // max axxeleration in silent mode in mm/s^2 +#define SILENT_MAX_ACCEL 960ul // max axxeleration in silent mode in mm/s^2 #define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2 #define SILENT_MAX_FEEDRATE 172 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min) //Normal mode limits -#define NORMAL_MAX_ACCEL 2500 // Y-axis max axxeleration in normal mode in mm/s^2 +#define NORMAL_MAX_ACCEL 2500ul // Y-axis max axxeleration in normal mode in mm/s^2 #define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2 #define NORMAL_MAX_FEEDRATE 200 //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)