add M135- set heater, also remove superfluous code and some whitespace changes
This commit is contained in:
parent
a60a15096d
commit
3e22da35ae
|
|
@ -271,57 +271,58 @@ void process_gcode_command() {
|
||||||
// M130- heater P factor
|
// M130- heater P factor
|
||||||
case 130:
|
case 130:
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
// p_factor = next_target.S;
|
|
||||||
pid_set_p(next_target.P, next_target.S);
|
pid_set_p(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
// M131- heater I factor
|
// M131- heater I factor
|
||||||
case 131:
|
case 131:
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
// i_factor = next_target.S;
|
|
||||||
pid_set_i(next_target.P, next_target.S);
|
pid_set_i(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
// M132- heater D factor
|
// M132- heater D factor
|
||||||
case 132:
|
case 132:
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
// d_factor = next_target.S;
|
|
||||||
pid_set_d(next_target.P, next_target.S);
|
pid_set_d(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
// M133- heater I limit
|
// M133- heater I limit
|
||||||
case 133:
|
case 133:
|
||||||
if (next_target.seen_S)
|
if (next_target.seen_S)
|
||||||
// i_limit = next_target.S;
|
|
||||||
pid_set_i_limit(next_target.P, next_target.S);
|
pid_set_i_limit(next_target.P, next_target.S);
|
||||||
break;
|
break;
|
||||||
// M134- save PID settings to eeprom
|
// M134- save PID settings to eeprom
|
||||||
case 134:
|
case 134:
|
||||||
heater_save_settings();
|
heater_save_settings();
|
||||||
break;
|
break;
|
||||||
|
// M135- set heater output
|
||||||
|
case 135:
|
||||||
|
if (next_target.seen_S)
|
||||||
|
heater_set(next_target.P, next_target.S);
|
||||||
|
break;
|
||||||
#endif /* NUM_HEATERS > 0 */
|
#endif /* NUM_HEATERS > 0 */
|
||||||
|
|
||||||
// M190- power on
|
// M190- power on
|
||||||
case 190:
|
case 190:
|
||||||
power_on();
|
power_on();
|
||||||
#ifdef X_ENABLE_PIN
|
#ifdef X_ENABLE_PIN
|
||||||
WRITE(X_ENABLE_PIN, 0);
|
WRITE(X_ENABLE_PIN, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Y_ENABLE_PIN
|
#ifdef Y_ENABLE_PIN
|
||||||
WRITE(Y_ENABLE_PIN, 0);
|
WRITE(Y_ENABLE_PIN, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Z_ENABLE_PIN
|
#ifdef Z_ENABLE_PIN
|
||||||
WRITE(Z_ENABLE_PIN, 0);
|
WRITE(Z_ENABLE_PIN, 0);
|
||||||
#endif
|
#endif
|
||||||
steptimeout = 0;
|
steptimeout = 0;
|
||||||
break;
|
break;
|
||||||
// M191- power off
|
// M191- power off
|
||||||
case 191:
|
case 191:
|
||||||
#ifdef X_ENABLE_PIN
|
#ifdef X_ENABLE_PIN
|
||||||
WRITE(X_ENABLE_PIN, 1);
|
WRITE(X_ENABLE_PIN, 1);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Y_ENABLE_PIN
|
#ifdef Y_ENABLE_PIN
|
||||||
WRITE(Y_ENABLE_PIN, 1);
|
WRITE(Y_ENABLE_PIN, 1);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Z_ENABLE_PIN
|
#ifdef Z_ENABLE_PIN
|
||||||
WRITE(Z_ENABLE_PIN, 1);
|
WRITE(Z_ENABLE_PIN, 1);
|
||||||
#endif
|
#endif
|
||||||
power_off();
|
power_off();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue