Loop index can be unsigned

Saves 4 bytes of flash memory
This commit is contained in:
Guðni Már Gilbert 2022-01-29 15:08:10 +00:00
parent 49693a9fb3
commit c081e1a5ae

View file

@ -11130,7 +11130,7 @@ void uvlo_()
eeprom_update_dword((uint32_t*)(EEPROM_FILE_POSITION), sd_position);
// Store the mesh bed leveling offsets. This is 2*7*7=98 bytes, which takes 98*3.4us=333us in worst case.
for (int8_t mesh_point = 0; mesh_point < MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS; ++ mesh_point) {
for (uint8_t mesh_point = 0; mesh_point < MESH_NUM_X_POINTS * MESH_NUM_Y_POINTS; ++ mesh_point) {
uint8_t ix = mesh_point % MESH_NUM_X_POINTS; // from 0 to MESH_NUM_X_POINTS - 1
uint8_t iy = mesh_point / MESH_NUM_X_POINTS;
// Scale the z value to 1u resolution.