@@ -394,6 +394,10 @@ void AnycubicTouchscreenClass::Setup() {
394394 else
395395 sprintf_P (cvalue, PSTR (" G1 Y%sF%i" ), ftostr42_52 (y_start - i * laser_printer_st.pic_pixel_distance ), ftemp);
396396
397+ // Execute Y movement before processing the row
398+ queue.enqueue_one_now (cvalue);
399+ while (commandsInQueue ()) idle ();
400+
397401 // Even rows: scan left to right
398402 if (i % 2 == 0 ) {
399403 for (j = 0 ; j < x_max; j++) {
@@ -434,12 +438,12 @@ void AnycubicTouchscreenClass::Setup() {
434438 }
435439 else {
436440 for (j = 0 ; j < x_max; j++) {
437- read_bmp (&Y, i, x_max - j);
441+ read_bmp (&Y, i, x_max - j - 1 );
438442 if (Y > MIN_GRAY_VLAUE && j != 0 ) {
439443 if (laser_printer_st.pic_x_mirror == 1 )
440444 sprintf_P (cvalue, PSTR (" G1 X%sF%i" ), ftostr42_52 (x_end + j * laser_printer_st.pic_pixel_distance ), ftemp);
441445 else
442- sprintf_P (cvalue, PSTR (" G1 X%.1fF %i" ), ftostr42_52 (x_end - j * laser_printer_st.pic_pixel_distance ), ftemp);
446+ sprintf_P (cvalue, PSTR (" G1 X%sF %i" ), ftostr42_52 (x_end - j * laser_printer_st.pic_pixel_distance ), ftemp);
443447 queue.enqueue_one_now (cvalue);
444448 while (commandsInQueue ()) idle ();
445449 WRITE (HEATER_0_PIN, 1 );
0 commit comments