File tree Expand file tree Collapse file tree
Marlin/src/feature/bedlevel/ubl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,13 +367,13 @@ void unified_bed_leveling::G29() {
367367
368368 case 1 :
369369 LOOP_L_N (x, GRID_MAX_POINTS_X) { // Create a diagonal line several Mesh cells thick that is raised
370+ const uint8_t x2 = x + (x < (GRID_MAX_POINTS_Y) - 1 ? 1 : -1 );
370371 z_values[x][x] += 9 .999f ;
371- z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1 ) ? 1 : - 1 ] += 9 .999f ; // We want the altered line several mesh points thick
372+ z_values[x][x2 ] += 9 .999f ; // We want the altered line several mesh points thick
372373 #if ENABLED(EXTENSIBLE_UI)
373374 ExtUI::onMeshUpdate (x, x, z_values[x][x]);
374- ExtUI::onMeshUpdate (x, (x + (x < (GRID_MAX_POINTS_Y) - 1 ) ? 1 : - 1 ) , z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1 ) ? 1 : - 1 ]);
375+ ExtUI::onMeshUpdate (x, (x2) , z_values[x][x2 ]);
375376 #endif
376-
377377 }
378378 break ;
379379
You can’t perform that action at this time.
0 commit comments