Fix sporadic display issues on Anycubic 1.0 display #536
@@ -1841,126 +1841,126 @@ void AnycubicTouchscreenClass::GetCommandFromTFT() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 37:
|
case 37:
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
int coorvalue;
|
int coorvalue;
|
||||||
coorvalue = CodeValueInt();
|
coorvalue = CodeValueInt();
|
||||||
if (coorvalue == 0) {
|
if (coorvalue == 0) {
|
||||||
Laser_printer_st.pic_x_mirror = 0;
|
Laser_printer_st.pic_x_mirror = 0;
|
||||||
} else if (coorvalue == 1) {
|
} else if (coorvalue == 1) {
|
||||||
Laser_printer_st.pic_x_mirror = 1; // x
|
Laser_printer_st.pic_x_mirror = 1; // x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 38:
|
case 38:
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
int coorvalue;
|
int coorvalue;
|
||||||
coorvalue = CodeValueInt();
|
coorvalue = CodeValueInt();
|
||||||
Laser_printer_st.pic_laser_time = coorvalue;
|
Laser_printer_st.pic_laser_time = coorvalue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 39:
|
case 39:
|
||||||
if (CodeSeen('S')) { // A39
|
if (CodeSeen('S')) { // A39
|
||||||
float coorvalue;
|
float coorvalue;
|
||||||
coorvalue = CodeValue();
|
coorvalue = CodeValue();
|
||||||
Laser_printer_st.laser_height = coorvalue;
|
Laser_printer_st.laser_height = coorvalue;
|
||||||
SEND_PGM("laser_height = ");
|
SEND_PGM("laser_height = ");
|
||||||
LCD_SERIAL.print(Laser_printer_st.laser_height);
|
LCD_SERIAL.print(Laser_printer_st.laser_height);
|
||||||
SENDLINE_PGM("");
|
SENDLINE_PGM("");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
if (CodeSeen('S')) { // A40
|
if (CodeSeen('S')) { // A40
|
||||||
float coorvalue;
|
float coorvalue;
|
||||||
coorvalue = CodeValue();
|
coorvalue = CodeValue();
|
||||||
Laser_printer_st.pic_pixel_distance = coorvalue;
|
Laser_printer_st.pic_pixel_distance = coorvalue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
float coorvalue;
|
float coorvalue;
|
||||||
coorvalue = CodeValue();
|
coorvalue = CodeValue();
|
||||||
Laser_printer_st.x_offset = coorvalue;
|
Laser_printer_st.x_offset = coorvalue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 42:
|
case 42:
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
float coorvalue;
|
float coorvalue;
|
||||||
coorvalue = CodeValue();
|
coorvalue = CodeValue();
|
||||||
Laser_printer_st.y_offset = coorvalue;
|
Laser_printer_st.y_offset = coorvalue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 43:
|
case 43:
|
||||||
if (CodeSeen('S')) { // y
|
if (CodeSeen('S')) { // y
|
||||||
int coorvalue;
|
int coorvalue;
|
||||||
coorvalue = CodeValueInt();
|
coorvalue = CodeValueInt();
|
||||||
if (coorvalue == 0) {
|
if (coorvalue == 0) {
|
||||||
Laser_printer_st.pic_y_mirror = 0;
|
Laser_printer_st.pic_y_mirror = 0;
|
||||||
} else if (coorvalue == 1) {
|
} else if (coorvalue == 1) {
|
||||||
Laser_printer_st.pic_y_mirror = 1;
|
Laser_printer_st.pic_y_mirror = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 44:
|
case 44:
|
||||||
send_laser_param();
|
send_laser_param();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 49: // A49
|
case 49: // A49
|
||||||
laser_on_off = 0;
|
laser_on_off = 0;
|
||||||
WRITE(HEATER_0_PIN, 0);
|
WRITE(HEATER_0_PIN, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50: // A50
|
case 50: // A50
|
||||||
if (laser_on_off == 0) {
|
if (laser_on_off == 0) {
|
||||||
laser_on_off = 1;
|
laser_on_off = 1;
|
||||||
} else {
|
} else {
|
||||||
laser_on_off = 0;
|
laser_on_off = 0;
|
||||||
WRITE(HEATER_0_PIN, 0);
|
WRITE(HEATER_0_PIN, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // if ENABLED(KNUTWURST_MEGA_P_LASER)
|
#endif // if ENABLED(KNUTWURST_MEGA_P_LASER)
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_P)
|
#if ENABLED(KNUTWURST_MEGA_P)
|
||||||
case 51:
|
case 51:
|
||||||
if (CodeSeen('H')) {
|
if (CodeSeen('H')) {
|
||||||
injectCommands(F(
|
injectCommands(F(
|
||||||
"G1 Z5 F500\n"
|
"G1 Z5 F500\n"
|
||||||
"G1 X30 Y30 F5000\n"
|
"G1 X30 Y30 F5000\n"
|
||||||
"G1 Z0.15 F300"
|
"G1 Z0.15 F300"
|
||||||
));
|
));
|
||||||
} else if (CodeSeen('I')) {
|
} else if (CodeSeen('I')) {
|
||||||
injectCommands(F(
|
injectCommands(F(
|
||||||
"G1 Z5 F500\n"
|
"G1 Z5 F500\n"
|
||||||
"G1 X190 Y30 F5000\n"
|
"G1 X190 Y30 F5000\n"
|
||||||
"G1 Z0.15 F300"
|
"G1 Z0.15 F300"
|
||||||
));
|
));
|
||||||
} else if (CodeSeen('J')) {
|
} else if (CodeSeen('J')) {
|
||||||
injectCommands(F(
|
injectCommands(F(
|
||||||
"G1 Z5 F500\n"
|
"G1 Z5 F500\n"
|
||||||
"G1 X190 Y190 F5000\n"
|
"G1 X190 Y190 F5000\n"
|
||||||
"G1 Z0.15 F300"
|
"G1 Z0.15 F300"
|
||||||
));
|
));
|
||||||
} else if (CodeSeen('K')) {
|
} else if (CodeSeen('K')) {
|
||||||
injectCommands(F(
|
injectCommands(F(
|
||||||
"G1 Z5 F500\n"
|
"G1 Z5 F500\n"
|
||||||
"G1 X30 Y190 F5000\n"
|
"G1 X30 Y190 F5000\n"
|
||||||
"G1 Z0.15 F300"
|
"G1 Z0.15 F300"
|
||||||
));
|
));
|
||||||
} else if (CodeSeen('L')) {
|
} else if (CodeSeen('L')) {
|
||||||
injectCommands(F("G1 X100 Y100 Z50 F5000"));
|
injectCommands(F("G1 X100 Y100 Z50 F5000"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
} // switch
|
} // switch
|
||||||
}
|
}
|
||||||
TFTbufindw = (TFTbufindw + 1) % TFTBUFSIZE;
|
TFTbufindw = (TFTbufindw + 1) % TFTBUFSIZE;
|
||||||
|
Reference in New Issue
Block a user