Temperature singleton class

This commit is contained in:
Scott Lahteine
2016-04-28 18:18:13 -07:00
parent 142bd3f3e7
commit 084f6b5b44
11 changed files with 536 additions and 584 deletions

View File

@@ -633,7 +633,7 @@ static void lcd_implementation_status_screen() {
//
// Hotend 0 Temperature
//
LCD_TEMP_ONLY(degHotend(0), degTargetHotend(0));
LCD_TEMP_ONLY(thermalManager.degHotend(0), thermalManager.degTargetHotend(0));
//
// Hotend 1 or Bed Temperature
@@ -643,10 +643,10 @@ static void lcd_implementation_status_screen() {
lcd.setCursor(8, 0);
#if EXTRUDERS > 1
lcd.print(LCD_STR_THERMOMETER[0]);
LCD_TEMP_ONLY(degHotend(1), degTargetHotend(1));
LCD_TEMP_ONLY(thermalManager.degHotend(1), thermalManager.degTargetHotend(1));
#else
lcd.print(LCD_STR_BEDTEMP[0]);
LCD_TEMP_ONLY(degBed(), degTargetBed());
LCD_TEMP_ONLY(thermalManager.degBed(), thermalManager.degTargetBed());
#endif
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
@@ -656,7 +656,7 @@ static void lcd_implementation_status_screen() {
//
// Hotend 0 Temperature
//
LCD_TEMP(degHotend(0), degTargetHotend(0), LCD_STR_THERMOMETER[0]);
LCD_TEMP(thermalManager.degHotend(0), thermalManager.degTargetHotend(0), LCD_STR_THERMOMETER[0]);
//
// Hotend 1 or Bed Temperature
@@ -664,9 +664,9 @@ static void lcd_implementation_status_screen() {
#if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
lcd.setCursor(10, 0);
#if EXTRUDERS > 1
LCD_TEMP(degHotend(1), degTargetHotend(1), LCD_STR_THERMOMETER[0]);
LCD_TEMP(thermalManager.degHotend(1), thermalManager.degTargetHotend(1), LCD_STR_THERMOMETER[0]);
#else
LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]);
#endif
#endif // EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
@@ -702,7 +702,7 @@ static void lcd_implementation_status_screen() {
// If we both have a 2nd extruder and a heated bed,
// show the heated bed temp on the left,
// since the first line is filled with extruder temps
LCD_TEMP(degBed(), degTargetBed(), LCD_STR_BEDTEMP[0]);
LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]);
#else
// Before homing the axis letters are blinking 'X' <-> '?'.
@@ -925,9 +925,9 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
static uint8_t ledsprev = 0;
uint8_t leds = 0;
if (target_temperature_bed > 0) leds |= LED_A;
if (thermalManager.degTargetBed() > 0) leds |= LED_A;
if (target_temperature[0] > 0) leds |= LED_B;
if (thermalManager.degTargetHotend(0) > 0) leds |= LED_B;
#if FAN_COUNT > 0
if (0
@@ -944,7 +944,7 @@ void lcd_implementation_drawedit(const char* pstr, const char* value=NULL) {
#endif // FAN_COUNT > 0
#if EXTRUDERS > 1
if (target_temperature[1] > 0) leds |= LED_C;
if (thermalManager.degTargetHotend(1) > 0) leds |= LED_C;
#endif
if (leds != ledsprev) {