Added Heated Bed Support
Signed-off-by: plasmator <public@plasmatoruniversi.com> Signed-off-by: Michael Moon <triffid.hunter@gmail.com>
This commit is contained in:
parent
7b29beb127
commit
80e98e9b22
|
|
@ -273,7 +273,7 @@ struct {
|
|||
|
||||
// number of heaters- for GEN3, set to zero as extruder manages the heater by itself
|
||||
#define NUM_HEATERS 0
|
||||
|
||||
#define BED_HEATER 3 //Set to 0 if no bed heater
|
||||
// check if heater responds to changes in target temperature, disable and spit errors if not
|
||||
// #define HEATER_SANITY_CHECK
|
||||
|
||||
|
|
|
|||
|
|
@ -360,6 +360,16 @@ void process_gcode_command() {
|
|||
if (next_target.seen_S)
|
||||
heater_set(next_target.P, next_target.S);
|
||||
break;
|
||||
|
||||
case 140: //Set heated bed temperature
|
||||
temp_set(BED_HEATER, next_target.S);
|
||||
if (next_target.S) {
|
||||
power_on();
|
||||
}
|
||||
else {
|
||||
disable_heater();
|
||||
}
|
||||
break;
|
||||
#endif /* NUM_HEATERS > 0 */
|
||||
|
||||
// M190- power on
|
||||
|
|
|
|||
10
temp.c
10
temp.c
|
|
@ -284,7 +284,15 @@ void temp_print(uint8_t index) {
|
|||
uint8_t c = 0;
|
||||
|
||||
c = (temp_sensors_runtime[index].last_read_temp & 3) * 25;
|
||||
|
||||
#if BED_HEATER > 0
|
||||
uint8_t b = 0;
|
||||
b = (temp_sensors_runtime[BED_HEATER - 1].last_read_temp & 3) * 25;
|
||||
|
||||
sersendf_P(PSTR("T:%u.%u\n"), temp_sensors_runtime[index].last_read_temp >> 2, c);
|
||||
sersendf_P(PSTR("T:%u.%u B:%u.%u\n"), temp_sensors_runtime[index].last_read_temp >> 2, c, temp_sensors_runtime[BED_HEATER - 1].last_read_temp >> 2 , b);
|
||||
#else
|
||||
sersendf_P(PSTR("T:%u.%u"), temp_sensors_runtime[index].last_read_temp >> 2, c);
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue