Add M136 (DEBUG) to read back PID values, add heater_print function
This commit is contained in:
parent
8540be950a
commit
31634c6a8f
|
|
@ -418,6 +418,12 @@ void process_gcode_command() {
|
||||||
power_on();
|
power_on();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef DEBUG
|
||||||
|
// M136- PRINT PID settings to host
|
||||||
|
case 136:
|
||||||
|
heater_print(next_target.P);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case 140: //Set heated bed temperature
|
case 140: //Set heated bed temperature
|
||||||
#ifdef HEATER_BED
|
#ifdef HEATER_BED
|
||||||
|
|
|
||||||
4
heater.c
4
heater.c
|
|
@ -313,3 +313,7 @@ void pid_set_i_limit(heater_t index, int32_t i_limit) {
|
||||||
heaters_pid[index].i_limit = i_limit;
|
heaters_pid[index].i_limit = i_limit;
|
||||||
#endif /* BANG_BANG */
|
#endif /* BANG_BANG */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void heater_print(uint16_t i) {
|
||||||
|
sersendf_P(PSTR("P:%ld I:%ld D:%ld Ilim:%u crc:%u "), heaters_pid[i].p_factor, heaters_pid[i].i_factor, heaters_pid[i].d_factor, heaters_pid[i].i_limit, crc_block(&heaters_pid[i].p_factor, 14));
|
||||||
|
}
|
||||||
|
|
|
||||||
2
heater.h
2
heater.h
|
|
@ -31,4 +31,6 @@ void pid_set_i(heater_t index, int32_t i);
|
||||||
void pid_set_d(heater_t index, int32_t d);
|
void pid_set_d(heater_t index, int32_t d);
|
||||||
void pid_set_i_limit(heater_t index, int32_t i_limit);
|
void pid_set_i_limit(heater_t index, int32_t i_limit);
|
||||||
|
|
||||||
|
void heater_print(uint16_t i);
|
||||||
|
|
||||||
#endif /* _HEATER_H */
|
#endif /* _HEATER_H */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue