Corrected temp variables.

This commit is contained in:
Erik van der Zalm 2011-11-05 20:21:09 +01:00
parent 04d3b5537f
commit 2e8e8878e5
5 changed files with 2052 additions and 2050 deletions

View File

@ -1,245 +1,245 @@
#ifndef CONFIGURATION_H #ifndef CONFIGURATION_H
#define CONFIGURATION_H #define CONFIGURATION_H
//#define DEBUG_STEPS //#define DEBUG_STEPS
// BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration // BASIC SETTINGS: select your board type, thermistor type, axis scaling, and endstop configuration
//// The following define selects which electronics board you have. Please choose the one that matches your setup //// The following define selects which electronics board you have. Please choose the one that matches your setup
// MEGA/RAMPS up to 1.2 = 3, // MEGA/RAMPS up to 1.2 = 3,
// RAMPS 1.3 = 33 // RAMPS 1.3 = 33
// Gen6 = 5, // Gen6 = 5,
// Sanguinololu 1.2 and above = 62 // Sanguinololu 1.2 and above = 62
// Ultimaker = 7, // Ultimaker = 7,
#define MOTHERBOARD 7 #define MOTHERBOARD 7
//#define MOTHERBOARD 5 //#define MOTHERBOARD 5
//// Thermistor settings: //// Thermistor settings:
// 1 is 100k thermistor // 1 is 100k thermistor
// 2 is 200k thermistor // 2 is 200k thermistor
// 3 is mendel-parts thermistor // 3 is mendel-parts thermistor
// 4 is 10k thermistor // 4 is 10k thermistor
// 5 is ParCan supplied 104GT-2 100K // 5 is ParCan supplied 104GT-2 100K
// 6 is EPCOS 100k // 6 is EPCOS 100k
// 7 is 100k Honeywell thermistor 135-104LAG-J01 // 7 is 100k Honeywell thermistor 135-104LAG-J01
#define THERMISTORHEATER_1 3 #define THERMISTORHEATER_1 3
#define THERMISTORHEATER_2 3 #define THERMISTORHEATER_2 3
#define THERMISTORBED 3 #define THERMISTORBED 3
//#define HEATER_0_USES_THERMISTOR //#define HEATER_0_USES_THERMISTOR
//#define HEATER_1_USES_THERMISTOR //#define HEATER_1_USES_THERMISTOR
#define HEATER_0_USES_AD595 #define HEATER_0_USES_AD595
//#define HEATER_1_USES_AD595 //#define HEATER_1_USES_AD595
// Select one of these only to define how the bed temp is read. // Select one of these only to define how the bed temp is read.
//#define BED_USES_THERMISTOR //#define BED_USES_THERMISTOR
//#define BED_USES_AD595 //#define BED_USES_AD595
#define HEATER_CHECK_INTERVAL 50 #define HEATER_CHECK_INTERVAL 50
#define BED_CHECK_INTERVAL 5000 #define BED_CHECK_INTERVAL 5000
//// Endstop Settings //// Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. const bool ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops.
// For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false // For optos H21LOB set to true, for Mendel-Parts newer optos TCST2103 set to false
// This determines the communication speed of the printer // This determines the communication speed of the printer
#define BAUDRATE 250000 #define BAUDRATE 250000
//#define BAUDRATE 115200 //#define BAUDRATE 115200
//#define BAUDRATE 230400 //#define BAUDRATE 230400
// Comment out (using // at the start of the line) to disable SD support: // Comment out (using // at the start of the line) to disable SD support:
// #define ULTRA_LCD //any lcd // #define ULTRA_LCD //any lcd
#define ULTIPANEL #define ULTIPANEL
#define ULTIPANEL #define ULTIPANEL
#ifdef ULTIPANEL #ifdef ULTIPANEL
//#define NEWPANEL //enable this if you have a click-encoder panel //#define NEWPANEL //enable this if you have a click-encoder panel
#define SDSUPPORT #define SDSUPPORT
#define ULTRA_LCD #define ULTRA_LCD
#define LCD_WIDTH 20 #define LCD_WIDTH 20
#define LCD_HEIGHT 4 #define LCD_HEIGHT 4
#else //no panel but just lcd #else //no panel but just lcd
#ifdef ULTRA_LCD #ifdef ULTRA_LCD
#define LCD_WIDTH 16 #define LCD_WIDTH 16
#define LCD_HEIGHT 2 #define LCD_HEIGHT 2
#endif #endif
#endif #endif
//#define SDSUPPORT // Enable SD Card Support in Hardware Console //#define SDSUPPORT // Enable SD Card Support in Hardware Console
const int dropsegments=5; //everything with this number of steps will be ignored as move const int dropsegments=5; //everything with this number of steps will be ignored as move
//// ADVANCED SETTINGS - to tweak parameters //// ADVANCED SETTINGS - to tweak parameters
#include "thermistortables.h" #include "thermistortables.h"
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0 #define X_ENABLE_ON 0
#define Y_ENABLE_ON 0 #define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0 #define Z_ENABLE_ON 0
#define E_ENABLE_ON 0 #define E_ENABLE_ON 0
// Disables axis when it's not being used. // Disables axis when it's not being used.
#define DISABLE_X false #define DISABLE_X false
#define DISABLE_Y false #define DISABLE_Y false
#define DISABLE_Z false #define DISABLE_Z false
#define DISABLE_E false #define DISABLE_E false
// Inverting axis direction // Inverting axis direction
#define INVERT_X_DIR true // for Mendel set to false, for Orca set to true #define INVERT_X_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false #define INVERT_Y_DIR false // for Mendel set to true, for Orca set to false
#define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true #define INVERT_Z_DIR true // for Mendel set to false, for Orca set to true
#define INVERT_E_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false #define INVERT_E_DIR false // for direct drive extruder v9 set to true, for geared extruder set to false
//// ENDSTOP SETTINGS: //// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN // Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1 #define X_HOME_DIR -1
#define Y_HOME_DIR -1 #define Y_HOME_DIR -1
#define Z_HOME_DIR -1 #define Z_HOME_DIR -1
#define min_software_endstops false //If true, axis won't move to coordinates less than zero. #define min_software_endstops false //If true, axis won't move to coordinates less than zero.
#define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below. #define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
#define X_MAX_LENGTH 210 #define X_MAX_LENGTH 210
#define Y_MAX_LENGTH 210 #define Y_MAX_LENGTH 210
#define Z_MAX_LENGTH 210 #define Z_MAX_LENGTH 210
//// MOVEMENT SETTINGS //// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
//note: on bernhards ultimaker 200 200 12 are working well. //note: on bernhards ultimaker 200 200 12 are working well.
#define HOMING_FEEDRATE {50*60, 50*60, 12*60, 0} // set the homing speeds #define HOMING_FEEDRATE {50*60, 50*60, 12*60, 0} // set the homing speeds
//the followint checks if an extrusion is existent in the move. if _not_, the speed of the move is set to the maximum speed. //the followint checks if an extrusion is existent in the move. if _not_, the speed of the move is set to the maximum speed.
//!!!!!!Use only if you know that your printer works at the maximum declared speeds. //!!!!!!Use only if you know that your printer works at the maximum declared speeds.
// works around the skeinforge cool-bug. There all moves are slowed to have a minimum layer time. However slow travel moves= ooze // works around the skeinforge cool-bug. There all moves are slowed to have a minimum layer time. However slow travel moves= ooze
#define TRAVELING_AT_MAXSPEED #define TRAVELING_AT_MAXSPEED
#define AXIS_RELATIVE_MODES {false, false, false, false} #define AXIS_RELATIVE_MODES {false, false, false, false}
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step) #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
// default settings // default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {79.87220447,79.87220447,200*8/3,14} // default steps per unit for ultimaker #define DEFAULT_AXIS_STEPS_PER_UNIT {79.87220447,79.87220447,200*8/3,14} // default steps per unit for ultimaker
#define DEFAULT_MAX_FEEDRATE {160*60, 160*60, 10*60, 500000} #define DEFAULT_MAX_FEEDRATE {160*60, 160*60, 10*60, 500000}
#define DEFAULT_MAX_ACCELERATION {9000,9000,150,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot. #define DEFAULT_MAX_ACCELERATION {9000,9000,150,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves #define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 7000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts #define DEFAULT_RETRACT_ACCELERATION 7000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
#define DEFAULT_MINIMUMFEEDRATE 10 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 10 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 10 #define DEFAULT_MINTRAVELFEEDRATE 10
// minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while printing high speed & high detail. It will slowdown on the detailed stuff. // minimum time in microseconds that a movement needs to take if the buffer is emptied. Increase this number if you see blobs while printing high speed & high detail. It will slowdown on the detailed stuff.
#define DEFAULT_MINSEGMENTTIME 20000 #define DEFAULT_MINSEGMENTTIME 20000
#define DEFAULT_XYJERK 30.0*60 #define DEFAULT_XYJERK 30.0*60
#define DEFAULT_ZJERK 10.0*60 #define DEFAULT_ZJERK 10.0*60
// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
//this enables the watchdog interrupt. //this enables the watchdog interrupt.
#define USE_WATCHDOG #define USE_WATCHDOG
//you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby: //you cannot reboot on a mega2560 due to a bug in he bootloader. Hence, you have to reset manually, and this is done hereby:
#define RESET_MANUAL #define RESET_MANUAL
#define WATCHDOG_TIMEOUT 4 #define WATCHDOG_TIMEOUT 4
//// Experimental watchdog and minimal temp //// Experimental watchdog and minimal temp
// The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature // The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature
// If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109 // If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109
//#define WATCHPERIOD 5000 //5 seconds //#define WATCHPERIOD 5000 //5 seconds
// Actual temperature must be close to target for this long before M109 returns success // Actual temperature must be close to target for this long before M109 returns success
//#define TEMP_RESIDENCY_TIME 20 // (seconds) //#define TEMP_RESIDENCY_TIME 20 // (seconds)
//#define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one //#define TEMP_HYSTERESIS 5 // (C°) range of +/- temperatures considered "close" to the target one
//// The minimal temperature defines the temperature below which the heater will not be enabled //// The minimal temperature defines the temperature below which the heater will not be enabled
#define HEATER_0_MINTEMP 5 #define HEATER_0_MINTEMP 5
//#define HEATER_1_MINTEMP 5 //#define HEATER_1_MINTEMP 5
//#define BED_MINTEMP 5 //#define BED_MINTEMP 5
// When temperature exceeds max temp, your heater will be switched off. // When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure! // This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection. // You should use MINTEMP for thermistor short/failure protection.
#define HEATER_0_MAXTEMP 275 #define HEATER_0_MAXTEMP 275
//#define_HEATER_1_MAXTEMP 275 //#define_HEATER_1_MAXTEMP 275
//#define BED_MAXTEMP 150 //#define BED_MAXTEMP 150
#define PIDTEMP #define PIDTEMP
#ifdef PIDTEMP #ifdef PIDTEMP
/// PID settings: /// PID settings:
// Uncomment the following line to enable PID support. // Uncomment the following line to enable PID support.
//#define SMOOTHING //#define SMOOTHING
//#define SMOOTHFACTOR 5.0 //#define SMOOTHFACTOR 5.0
//float current_raw_average=0; //float current_raw_average=0;
#define K1 0.95 //smoothing of the PID #define K1 0.95 //smoothing of the PID
//#define PID_DEBUG // Sends debug data to the serial port. //#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in % //#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
#define PID_MAX 255 // limits current to nozzle #define PID_MAX 255 // limits current to nozzle
#define PID_INTEGRAL_DRIVE_MAX 255 #define PID_INTEGRAL_DRIVE_MAX 255
#define PID_dT 0.1 #define PID_dT 0.1
//machine with red silicon: 1950:45 second ; with fan fully blowin 3000:47 //machine with red silicon: 1950:45 second ; with fan fully blowin 3000:47
#define PID_CRITIAL_GAIN 3000 #define PID_CRITIAL_GAIN 3000
#define PID_SWING_AT_CRITIAL 45 //seconds #define PID_SWING_AT_CRITIAL 45 //seconds
#define PIDIADD 5 #define PIDIADD 5
/* /*
//PID according to Ziegler-Nichols method //PID according to Ziegler-Nichols method
float Kp = 0.6*PID_CRITIAL_GAIN; float Kp = 0.6*PID_CRITIAL_GAIN;
float Ki =PIDIADD+2*Kp/PID_SWING_AT_CRITIAL*PID_dT; float Ki =PIDIADD+2*Kp/PID_SWING_AT_CRITIAL*PID_dT;
float Kd = Kp*PID_SWING_AT_CRITIAL/8./PID_dT; float Kd = Kp*PID_SWING_AT_CRITIAL/8./PID_dT;
*/ */
//PI according to Ziegler-Nichols method //PI according to Ziegler-Nichols method
#define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2) #define DEFAULT_Kp (PID_CRITIAL_GAIN/2.2)
#define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT) #define DEFAULT_Ki (1.2*Kp/PID_SWING_AT_CRITIAL*PID_dT)
#define DEFAULT_Kd (0) #define DEFAULT_Kd (0)
#define PID_ADD_EXTRUSION_RATE #define PID_ADD_EXTRUSION_RATE
#ifdef PID_ADD_EXTRUSION_RATE #ifdef PID_ADD_EXTRUSION_RATE
#define DEFAULT_Kc (5) //heatingpower=Kc*(e_speed) #define DEFAULT_Kc (5) //heatingpower=Kc*(e_speed)
#endif #endif
#endif // PIDTEMP #endif // PIDTEMP
// extruder advance constant (s2/mm3) // extruder advance constant (s2/mm3)
// //
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2 // advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
// //
// hooke's law says: force = k * distance // hooke's law says: force = k * distance
// bernoulli's priniciple says: v ^ 2 / 2 + g . h + pressure / density = constant // bernoulli's priniciple says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder // so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE //#define ADVANCE
#ifdef ADVANCE #ifdef ADVANCE
#define EXTRUDER_ADVANCE_K .3 #define EXTRUDER_ADVANCE_K .3
#define D_FILAMENT 1.7 #define D_FILAMENT 1.7
#define STEPS_MM_E 65 #define STEPS_MM_E 65
#define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159) #define EXTRUTION_AREA (0.25 * D_FILAMENT * D_FILAMENT * 3.14159)
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA) #define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS]/ EXTRUTION_AREA)
#endif // ADVANCE #endif // ADVANCE
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, e.g. 8,16,32 // THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2, e.g. 8,16,32
#if defined SDSUPPORT #if defined SDSUPPORT
// The number of linear motions that can be in the plan at any give time. // The number of linear motions that can be in the plan at any give time.
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else #else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif #endif
#endif #endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +1,58 @@
/* /*
temperature.h - temperature controller temperature.h - temperature controller
Part of Marlin Part of Marlin
Copyright (c) 2011 Erik van der Zalm Copyright (c) 2011 Erik van der Zalm
Grbl is free software: you can redistribute it and/or modify Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Grbl is distributed in the hope that it will be useful, Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>. along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef temperature_h #ifndef temperature_h
#define temperature_h #define temperature_h
#include "Marlin.h" #include "Marlin.h"
#ifdef PID_ADD_EXTRUSION_RATE #ifdef PID_ADD_EXTRUSION_RATE
#include "stepper.h" #include "stepper.h"
#endif #endif
void tp_init(); void tp_init();
void manage_heater(); void manage_heater();
//int temp2analogu(int celsius, const short table[][2], int numtemps); //int temp2analogu(int celsius, const short table[][2], int numtemps);
//float analog2tempu(int raw, const short table[][2], int numtemps); //float analog2tempu(int raw, const short table[][2], int numtemps);
int temp2analog(int celsius); int temp2analog(int celsius);
int temp2analogBed(int celsius); int temp2analogBed(int celsius);
float analog2temp(int raw); float analog2temp(int raw);
float analog2tempBed(int raw); float analog2tempBed(int raw);
#ifdef HEATER_USES_THERMISTOR #ifdef HEATER_0_USES_THERMISTOR
#define HEATERSOURCE 1 #define HEATERSOURCE 1
#endif #endif
#ifdef BED_USES_THERMISTOR #ifdef BED_USES_THERMISTOR
#define BEDSOURCE 1 #define BEDSOURCE 1
#endif #endif
//#define temp2analogh( c ) temp2analogu((c),temptable,NUMTEMPS) //#define temp2analogh( c ) temp2analogu((c),temptable,NUMTEMPS)
//#define analog2temp( c ) analog2tempu((c),temptable,NUMTEMPS //#define analog2temp( c ) analog2tempu((c),temptable,NUMTEMPS
extern float Kp; extern float Kp;
extern float Ki; extern float Ki;
extern float Kd; extern float Kd;
extern float Kc; extern float Kc;
enum {TEMPSENSOR_HOTEND=0,TEMPSENSOR_BED=1, TEMPSENSOR_AUX=2}; enum {TEMPSENSOR_HOTEND_0=0,TEMPSENSOR_BED=1, TEMPSENSOR_HOTEND_1=2};
extern int target_raw[3]; extern int target_raw[3];
extern int current_raw[3]; extern int current_raw[3];
extern double pid_setpoint; extern double pid_setpoint;
#endif #endif

View File

@ -253,17 +253,17 @@ void MainMenu::showStatus()
} }
if((abs(current_raw[TEMPSENSOR_HOTEND]-oldcurrentraw)>3)||force_lcd_update) if((abs(current_raw[TEMPSENSOR_HOTEND_0]-oldcurrentraw)>3)||force_lcd_update)
{ {
lcd.setCursor(1,0); lcd.setCursor(1,0);
lcd.print(ftostr3(analog2temp(current_raw[TEMPSENSOR_HOTEND]))); lcd.print(ftostr3(analog2temp(current_raw[TEMPSENSOR_HOTEND_0])));
oldcurrentraw=current_raw[TEMPSENSOR_HOTEND]; oldcurrentraw=current_raw[TEMPSENSOR_HOTEND_0];
} }
if((target_raw[TEMPSENSOR_HOTEND]!=oldtargetraw)||force_lcd_update) if((target_raw[TEMPSENSOR_HOTEND_0]!=oldtargetraw)||force_lcd_update)
{ {
lcd.setCursor(5,0); lcd.setCursor(5,0);
lcd.print(ftostr3(analog2temp(target_raw[TEMPSENSOR_HOTEND]))); lcd.print(ftostr3(analog2temp(target_raw[TEMPSENSOR_HOTEND_0])));
oldtargetraw=target_raw[TEMPSENSOR_HOTEND]; oldtargetraw=target_raw[TEMPSENSOR_HOTEND_0];
} }
#if defined BED_USES_THERMISTOR || defined BED_USES_AD595 #if defined BED_USES_THERMISTOR || defined BED_USES_AD595
static int oldcurrentbedraw=-1; static int oldcurrentbedraw=-1;
@ -426,7 +426,7 @@ void MainMenu::showPrepare()
if((activeline==line) && CLICKED) if((activeline==line) && CLICKED)
{ {
BLOCK BLOCK
target_raw[TEMPSENSOR_HOTEND] = temp2analog(170); target_raw[TEMPSENSOR_HOTEND_0] = temp2analog(170);
beepshort(); beepshort();
} }
}break; }break;
@ -531,7 +531,7 @@ void MainMenu::showControl()
if(force_lcd_update) if(force_lcd_update)
{ {
lcd.setCursor(0,line);lcd.print(" \002Nozzle:"); lcd.setCursor(0,line);lcd.print(" \002Nozzle:");
lcd.setCursor(13,line);lcd.print(ftostr3(analog2temp(target_raw[TEMPSENSOR_HOTEND]))); lcd.setCursor(13,line);lcd.print(ftostr3(analog2temp(target_raw[TEMPSENSOR_HOTEND_0])));
} }
if((activeline==line) ) if((activeline==line) )
@ -541,11 +541,11 @@ void MainMenu::showControl()
linechanging=!linechanging; linechanging=!linechanging;
if(linechanging) if(linechanging)
{ {
encoderpos=(int)analog2temp(target_raw[TEMPSENSOR_HOTEND]); encoderpos=(int)analog2temp(target_raw[TEMPSENSOR_HOTEND_0]);
} }
else else
{ {
target_raw[TEMPSENSOR_HOTEND] = temp2analog(encoderpos); target_raw[TEMPSENSOR_HOTEND_0] = temp2analog(encoderpos);
encoderpos=activeline*lcdslow; encoderpos=activeline*lcdslow;
beepshort(); beepshort();
} }
@ -1590,4 +1590,4 @@ char *fillto(int8_t n,char *c)
#else #else
inline void lcd_status() {}; inline void lcd_status() {};
#endif #endif