- Remove unused error correction in tft code.

- Increase max set temp value of hotend.
- Disable Z raise if below 10mm for heating.
This commit is contained in:
Knutwurst
2021-05-14 10:33:41 +02:00
parent f902d5e827
commit 527fbf1699

View File

@@ -1360,47 +1360,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
TFTcmdbuffer[TFTbufindw][serial3_count] = 0; //terminate string
if(!TFTcomment_mode)
{
/*
// -------- START ERROR CORRECTION ----------
TFTcomment_mode = false; //for new command
if(strchr(TFTcmdbuffer[TFTbufindw], 'N') != NULL)
{
if(strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL)
{
byte checksum = 0;
byte count = 0;
while(TFTcmdbuffer[TFTbufindw][count] != '*') checksum = checksum^TFTcmdbuffer[TFTbufindw][count++];
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], '*');
if( (int)(strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)) != checksum)
{
HARDWARE_SERIAL_ERROR_START;
HardwareSerial.flush();
HARDWARE_SERIAL_ERROR_START;
HardwareSerial.flush();
serial3_count = 0;
return;
}
//if no errors, continue parsing
} else {
HARDWARE_SERIAL_ERROR_START;
HardwareSerial.flush();
serial3_count = 0;
return;
}
//if no errors, continue parsing
} else { // if we don't receive 'N' but still see '*'
if((strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL))
{
HARDWARE_SERIAL_ERROR_START;
serial3_count = 0;
return;
}
}
// -------- FINISH ERROR CORRECTION ----------
*/
{
if((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL))
{
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A');
@@ -1654,18 +1614,18 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
unsigned int tempvalue;
if (CodeSeen('S'))
{
tempvalue = constrain(CodeValue(), 0, 275);
tempvalue = constrain(CodeValue(), 0, 400);
thermalManager.setTargetHotend(tempvalue, 0);
}
else if ((CodeSeen('C')) && (!planner.movesplanned()))
/*else if ((CodeSeen('C')) && (!planner.movesplanned()))
{
if ((current_position[Z_AXIS] < 10))
{
queue.inject_P(PSTR("G1 Z10")); //RASE Z AXIS
}
tempvalue = constrain(CodeValue(), 0, 275);
tempvalue = constrain(CodeValue(), 0, 400);
thermalManager.setTargetHotend(tempvalue, 0);
}
}*/
}
break;
case 17: // A17 set heated bed temp