diff --git a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp index 68581aeafd..01a2c4ebcc 100644 --- a/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp +++ b/Marlin/src/lcd/extui/ia_creality/ia_creality_rts.cpp @@ -1655,9 +1655,9 @@ void RTS::handleData() { case AutolevelVal: { uint8_t meshPoint = (recdat.addr - AutolevelVal) / 2, - yPnt = floor(meshPoint / GRID_MAX_POINTS_X), - xPnt = meshPoint - (yPnt * GRID_MAX_POINTS_X); - if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X - 1) - xPnt; // zag row + yPnt = meshPoint / (GRID_MAX_POINTS_X), + xPnt = meshPoint - yPnt * (GRID_MAX_POINTS_X); + if (yPnt % 2 != 0) xPnt = (GRID_MAX_POINTS_X) - 1 - xPnt; // zag row float meshVal = float(recdat.data[0] - (recdat.data[0] >= 32768 ? 65536 : 0)) / 1000; diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index ba1361f922..447f372e63 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -544,9 +544,9 @@ void FTMotion::loadBlockData(block_t * const current_block) { const float T1 = (F_n - f_s) * oneOverAccel, T3 = (F_n - f_e) * oneOverAccel; - N1 = ceil(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency - N2 = ceil(T2 * (FTM_FS)); // Coast - N3 = ceil(T3 * (FTM_FS)); // Decel + N1 = CEIL(T1 * (FTM_FS)); // Accel datapoints based on Hz frequency + N2 = CEIL(T2 * (FTM_FS)); // Coast + N3 = CEIL(T3 * (FTM_FS)); // Decel const float T1_P = N1 * (FTM_TS), // (s) Accel datapoints x timestep resolution T2_P = N2 * (FTM_TS), // (s) Coast diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 9c1668619b..552b7cb34a 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -3161,7 +3161,7 @@ void Stepper::init() { factor2 += -7.58095488 * zeta2; const float zeta3 = zeta2 * zeta; factor2 += 43.073216 * zeta3; - factor2 = floor(factor2); + factor2 = FLOOR(factor2); } const bool was_on = hal.isr_state();