Handle disable_heater()

This commit is contained in:
leptun 2019-10-06 12:43:03 +03:00
parent 570b5989f4
commit 7650e2b60c
3 changed files with 4 additions and 1 deletions

View file

@ -6,6 +6,7 @@
#include "mesh_bed_leveling.h"
#include "stepper.h"
#include "ultralcd.h"
#include "temperature.h"
#ifdef TMC2130
#include "tmc2130.h"
@ -23,7 +24,6 @@ float world2machine_shift[2];
#define WEIGHT_FIRST_ROW_Y_HIGH (0.3f)
#define WEIGHT_FIRST_ROW_Y_LOW (0.0f)
extern bool bedPWMDisabled;
// Scaling of the real machine axes against the programmed dimensions in the firmware.

View file

@ -1394,6 +1394,7 @@ void disable_heater()
target_temperature_bed=0;
soft_pwm_bed=0;
timer02_set_pwm0(soft_pwm_bed << 1);
bedPWMDisabled = 0;
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
//WRITE(HEATER_BED_PIN,LOW);
#endif

View file

@ -79,6 +79,8 @@ extern int current_voltage_raw_bed;
extern unsigned char soft_pwm_bed;
#endif
extern bool bedPWMDisabled;
#ifdef PIDTEMP
extern int pid_cycle, pid_number_of_cycles;
extern float Kc,_Kp,_Ki,_Kd;