Merge pull request #345 from tecan/master

add M118 support
pull/409/head
Luc 2019-04-24 07:25:01 +02:00 zatwierdzone przez GitHub
commit 8988a887a4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
6 zmienionych plików z 17 dodań i 4 usunięć

Wyświetl plik

@ -1308,6 +1308,12 @@ void Commands::processMCode(GCode *com)
UI_STATUS_UPD_RAM(com->text);
}
break;
case 118: // M118 message to host
if(com->hasString())
{
Com::printFLN(com->text);
}
break;
case 119: // M119
Commands::waitUntilEndOfAllMoves();
#if (X_MIN_PIN > -1) && MIN_HARDWARE_ENDSTOP_X

Wyświetl plik

@ -91,6 +91,7 @@ Custom M Codes
- M115- Capabilities string
- M116 - Wait for all temperatures in a +/- 1 degree range
- M117 <message> - Write message in status row on lcd
- M118 <message> - Write message to host
- M119 - Report endstop status
- M140 S<temp> F1 - Set bed target temp, F1 makes a beep when temperature is reached the first time
- M163 S<extruderNum> P<weight> - Set weight for this mixing extruder drive

Wyświetl plik

@ -665,7 +665,7 @@ bool GCode::parseAscii(char *line,bool fromSerial)
params |=2;
if(M > 255) params |= 4096;
// handle non standard text arguments that some M codes have
if (M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 117)
if (M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 117 || M == 118)
{
// after M command we got a filename or text
char digit;
@ -683,7 +683,7 @@ bool GCode::parseAscii(char *line,bool fromSerial)
text = pos;
while (*pos)
{
if((M != 117 && *pos==' ') || *pos=='*') break;
if((M != 117 && M != 20 && M != 118 && *pos==' ') || *pos=='*') break;
pos++; // find a space as file name end
}
*pos = 0; // truncate filename by erasing space with nul, also skips checksum

Wyświetl plik

@ -2052,6 +2052,11 @@ void Commands::processMCode(GCode *com) {
UI_STATUS_UPD_RAM(com->text);
}
break;
case 118: // M118 message to host
if(com->hasString()) {
Com::printFLN(com->text);
}
break;
case 119: // M119
Commands::waitUntilEndOfAllMoves();
Endstops::update();

Wyświetl plik

@ -124,6 +124,7 @@ Custom M Codes
- M115- Capabilities string
- M116 - Wait for all temperatures in a +/- 1 degree range
- M117 <message> - Write message in status row on lcd
- M118 <message> - Write message to host
- M119 - Report endstop status
- M120 - Report beeper status
- M121 - Report sensors status

Wyświetl plik

@ -773,7 +773,7 @@ bool GCode::parseAscii(char *line,bool fromSerial)
params |= 2;
if(M > 255) params |= 4096;
// handle non standard text arguments that some M codes have
if (M == 20 || M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 36 || M == 117)
if (M == 20 || M == 23 || M == 28 || M == 29 || M == 30 || M == 32 || M == 36 || M == 117 || M == 118)
{
// after M command we got a filename or text
char digit;
@ -791,7 +791,7 @@ bool GCode::parseAscii(char *line,bool fromSerial)
text = pos;
while (*pos)
{
if((M != 117 && M != 20 && *pos==' ') || *pos=='*') break;
if((M != 117 && M != 20 && M != 118 && *pos==' ') || *pos=='*') break;
pos++; // find a space as file name end
}
*pos = 0; // truncate filename by erasing space with null, also skips checksum