|
|
@ -119,6 +119,7 @@
|
|
|
|
// M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
|
|
|
|
// M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
|
|
|
|
// Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
|
|
|
|
// Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
|
|
|
|
// IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
|
|
|
// IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
|
|
|
|
|
|
|
|
// M112 - Emergency stop
|
|
|
|
// M114 - Output current position to serial port
|
|
|
|
// M114 - Output current position to serial port
|
|
|
|
// M115 - Capabilities string
|
|
|
|
// M115 - Capabilities string
|
|
|
|
// M117 - display message
|
|
|
|
// M117 - display message
|
|
|
@ -673,6 +674,11 @@ void get_command()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//If command was e-stop process now
|
|
|
|
|
|
|
|
if(strcmp(cmdbuffer[bufindw], "M112") == 0)
|
|
|
|
|
|
|
|
kill();
|
|
|
|
|
|
|
|
|
|
|
|
bufindw = (bufindw + 1)%BUFSIZE;
|
|
|
|
bufindw = (bufindw + 1)%BUFSIZE;
|
|
|
|
buflen += 1;
|
|
|
|
buflen += 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1177,19 +1183,21 @@ void process_commands()
|
|
|
|
//ClearToSend();
|
|
|
|
//ClearToSend();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//break;
|
|
|
|
break;
|
|
|
|
case 2: // G2 - CW ARC
|
|
|
|
case 2: // G2 - CW ARC
|
|
|
|
if(Stopped == false) {
|
|
|
|
if(Stopped == false) {
|
|
|
|
get_arc_coordinates();
|
|
|
|
get_arc_coordinates();
|
|
|
|
prepare_arc_move(true);
|
|
|
|
prepare_arc_move(true);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 3: // G3 - CCW ARC
|
|
|
|
case 3: // G3 - CCW ARC
|
|
|
|
if(Stopped == false) {
|
|
|
|
if(Stopped == false) {
|
|
|
|
get_arc_coordinates();
|
|
|
|
get_arc_coordinates();
|
|
|
|
prepare_arc_move(false);
|
|
|
|
prepare_arc_move(false);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 4: // G4 dwell
|
|
|
|
case 4: // G4 dwell
|
|
|
|
LCD_MESSAGEPGM(MSG_DWELL);
|
|
|
|
LCD_MESSAGEPGM(MSG_DWELL);
|
|
|
|
codenum = 0;
|
|
|
|
codenum = 0;
|
|
|
@ -1799,7 +1807,7 @@ void process_commands()
|
|
|
|
int pin_number = LED_PIN;
|
|
|
|
int pin_number = LED_PIN;
|
|
|
|
if (code_seen('P') && pin_status >= 0 && pin_status <= 255)
|
|
|
|
if (code_seen('P') && pin_status >= 0 && pin_status <= 255)
|
|
|
|
pin_number = code_value();
|
|
|
|
pin_number = code_value();
|
|
|
|
for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
|
|
|
|
for(int8_t i = 0; i < (int8_t)(sizeof(sensitive_pins)/sizeof(int)); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sensitive_pins[i] == pin_number)
|
|
|
|
if (sensitive_pins[i] == pin_number)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1830,6 +1838,9 @@ void process_commands()
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
setWatch();
|
|
|
|
setWatch();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 112: // M112 -Emergency Stop
|
|
|
|
|
|
|
|
kill();
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 140: // M140 set bed temp
|
|
|
|
case 140: // M140 set bed temp
|
|
|
|
if (code_seen('S')) setTargetBed(code_value());
|
|
|
|
if (code_seen('S')) setTargetBed(code_value());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -2153,8 +2164,9 @@ void process_commands()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 85: // M85
|
|
|
|
case 85: // M85
|
|
|
|
code_seen('S');
|
|
|
|
if(code_seen('S')) {
|
|
|
|
max_inactive_time = code_value() * 1000;
|
|
|
|
max_inactive_time = code_value() * 1000;
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 92: // M92
|
|
|
|
case 92: // M92
|
|
|
|
for(int8_t i=0; i < NUM_AXIS; i++)
|
|
|
|
for(int8_t i=0; i < NUM_AXIS; i++)
|
|
|
@ -2275,6 +2287,7 @@ void process_commands()
|
|
|
|
if(tmp_extruder >= EXTRUDERS) {
|
|
|
|
if(tmp_extruder >= EXTRUDERS) {
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO(MSG_M200_INVALID_EXTRUDER);
|
|
|
|
SERIAL_ECHO(MSG_M200_INVALID_EXTRUDER);
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
volumetric_multiplier[tmp_extruder] = 1 / area;
|
|
|
|
volumetric_multiplier[tmp_extruder] = 1 / area;
|
|
|
@ -2466,7 +2479,7 @@ void process_commands()
|
|
|
|
|
|
|
|
|
|
|
|
if(pin_state >= -1 && pin_state <= 1){
|
|
|
|
if(pin_state >= -1 && pin_state <= 1){
|
|
|
|
|
|
|
|
|
|
|
|
for(int8_t i = 0; i < (int8_t)sizeof(sensitive_pins); i++)
|
|
|
|
for(int8_t i = 0; i < (int8_t)(sizeof(sensitive_pins)/sizeof(int)); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sensitive_pins[i] == pin_number)
|
|
|
|
if (sensitive_pins[i] == pin_number)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -3424,6 +3437,9 @@ void handle_status_leds(void) {
|
|
|
|
|
|
|
|
|
|
|
|
void manage_inactivity()
|
|
|
|
void manage_inactivity()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(buflen < (BUFSIZE-1))
|
|
|
|
|
|
|
|
get_command();
|
|
|
|
|
|
|
|
|
|
|
|
if( (millis() - previous_millis_cmd) > max_inactive_time )
|
|
|
|
if( (millis() - previous_millis_cmd) > max_inactive_time )
|
|
|
|
if(max_inactive_time)
|
|
|
|
if(max_inactive_time)
|
|
|
|
kill();
|
|
|
|
kill();
|
|
|
|