Fixed MAX6675
This commit is contained in:
parent
325f0651ac
commit
cf7c8c458f
1 changed files with 5 additions and 3 deletions
|
@ -154,6 +154,8 @@ void PID_autotune(float temp)
|
||||||
|
|
||||||
SERIAL_ECHOLN("PID Autotune start");
|
SERIAL_ECHOLN("PID Autotune start");
|
||||||
|
|
||||||
|
disable_heater(); // switch off all heaters.
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
||||||
if(temp_meas_ready == true) { // temp sample ready
|
if(temp_meas_ready == true) { // temp sample ready
|
||||||
|
@ -921,14 +923,14 @@ ISR(TIMER0_COMPB_vect)
|
||||||
|
|
||||||
if(temp_count >= 16) // 8 ms * 16 = 128ms.
|
if(temp_count >= 16) // 8 ms * 16 = 128ms.
|
||||||
{
|
{
|
||||||
#ifdef HEATER_0_USES_AD595
|
#ifdef HEATER_0_USES_AD595 || defined HEATER_0_USES_MAX6675
|
||||||
current_raw[0] = raw_temp_0_value;
|
current_raw[0] = raw_temp_0_value;
|
||||||
#else
|
#else
|
||||||
current_raw[0] = 16383 - raw_temp_0_value;
|
current_raw[0] = 16383 - raw_temp_0_value;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EXTRUDERS > 1
|
#if EXTRUDERS > 1
|
||||||
#ifdef HEATER_1_USES_AD595 || defined HEATER_0_USES_MAX6675
|
#ifdef HEATER_1_USES_AD595
|
||||||
current_raw[1] = raw_temp_1_value;
|
current_raw[1] = raw_temp_1_value;
|
||||||
#else
|
#else
|
||||||
current_raw[1] = 16383 - raw_temp_1_value;
|
current_raw[1] = 16383 - raw_temp_1_value;
|
||||||
|
|
Reference in a new issue