gcode_process.c: make the extruder optional and ...
... default to the first available device if the intended device isn't available.
This commit is contained in:
parent
a0997fcee1
commit
49b76d6e25
|
|
@ -478,8 +478,11 @@ void process_gcode_command() {
|
||||||
//?
|
//?
|
||||||
if ( ! next_target.seen_S)
|
if ( ! next_target.seen_S)
|
||||||
break;
|
break;
|
||||||
if ( ! next_target.seen_P)
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
if ( ! next_target.seen_P)
|
||||||
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
// else use the first available device
|
||||||
|
#endif
|
||||||
temp_set(next_target.P, next_target.S);
|
temp_set(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -524,9 +527,7 @@ void process_gcode_command() {
|
||||||
#ifdef HEATER_FAN
|
#ifdef HEATER_FAN
|
||||||
if ( ! next_target.seen_P)
|
if ( ! next_target.seen_P)
|
||||||
next_target.P = HEATER_FAN;
|
next_target.P = HEATER_FAN;
|
||||||
#else
|
// else use the first available device
|
||||||
if ( ! next_target.seen_P)
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
if ( ! next_target.seen_S)
|
if ( ! next_target.seen_S)
|
||||||
break;
|
break;
|
||||||
|
|
@ -636,8 +637,11 @@ void process_gcode_command() {
|
||||||
case 130:
|
case 130:
|
||||||
//? --- M130: heater P factor ---
|
//? --- M130: heater P factor ---
|
||||||
//? Undocumented.
|
//? Undocumented.
|
||||||
if ( ! next_target.seen_P)
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
if ( ! next_target.seen_P)
|
||||||
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
// else use the first available device
|
||||||
|
#endif
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
pid_set_p(next_target.P, next_target.S);
|
pid_set_p(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
|
|
@ -645,8 +649,10 @@ void process_gcode_command() {
|
||||||
case 131:
|
case 131:
|
||||||
//? --- M131: heater I factor ---
|
//? --- M131: heater I factor ---
|
||||||
//? Undocumented.
|
//? Undocumented.
|
||||||
if ( ! next_target.seen_P)
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
if ( ! next_target.seen_P)
|
||||||
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
#endif
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
pid_set_i(next_target.P, next_target.S);
|
pid_set_i(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
|
|
@ -654,8 +660,10 @@ void process_gcode_command() {
|
||||||
case 132:
|
case 132:
|
||||||
//? --- M132: heater D factor ---
|
//? --- M132: heater D factor ---
|
||||||
//? Undocumented.
|
//? Undocumented.
|
||||||
if ( ! next_target.seen_P)
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
if ( ! next_target.seen_P)
|
||||||
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
#endif
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
pid_set_d(next_target.P, next_target.S);
|
pid_set_d(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
|
|
@ -663,8 +671,10 @@ void process_gcode_command() {
|
||||||
case 133:
|
case 133:
|
||||||
//? --- M133: heater I limit ---
|
//? --- M133: heater I limit ---
|
||||||
//? Undocumented.
|
//? Undocumented.
|
||||||
if ( ! next_target.seen_P)
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
if ( ! next_target.seen_P)
|
||||||
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
#endif
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
pid_set_i_limit(next_target.P, next_target.S);
|
pid_set_i_limit(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue