From 380377db0fcf0c21376a8c639d3e2445a38a2fe5 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Thu, 10 Feb 2022 09:47:37 +0100 Subject: [PATCH] Add static assert --- Firmware/mesh_bed_calibration.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Firmware/mesh_bed_calibration.cpp b/Firmware/mesh_bed_calibration.cpp index 16bfbbde3..4de80504f 100644 --- a/Firmware/mesh_bed_calibration.cpp +++ b/Firmware/mesh_bed_calibration.cpp @@ -2872,6 +2872,7 @@ bool sample_mesh_and_store_reference() } mbl.set_z(0, 0, current_position[Z_AXIS]); } + static_assert(MESH_MEAS_NUM_X_POINTS * MESH_MEAS_NUM_Y_POINTS <= 255, "overflow....."); for (uint8_t mesh_point = 1; mesh_point != MESH_MEAS_NUM_X_POINTS * MESH_MEAS_NUM_Y_POINTS; ++ mesh_point) { // Don't let the manage_inactivity() function remove power from the motors. refresh_cmd_timeout();