Browse Source

Change to LCD status indicators

The I2C LCD status indicators now indicate when the hotends or bed are
turned on at all (rather than just when they are in their heating phase)
Robert F-C 11 years ago
parent
commit
4121311b9d
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 13
- 13
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

298
   #endif
298
   #endif
299
   
299
   
300
 #elif defined(LCD_I2C_TYPE_MCP23017)
300
 #elif defined(LCD_I2C_TYPE_MCP23017)
301
-  	lcd.setMCPType(LTI_TYPE_MCP23017);
301
+    lcd.setMCPType(LTI_TYPE_MCP23017);
302
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
302
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
303
     lcd.setBacklight(0); //set all the LEDs off to begin with
303
     lcd.setBacklight(0); //set all the LEDs off to begin with
304
     
304
     
305
 #elif defined(LCD_I2C_TYPE_MCP23008)
305
 #elif defined(LCD_I2C_TYPE_MCP23008)
306
-  	lcd.setMCPType(LTI_TYPE_MCP23008);
306
+    lcd.setMCPType(LTI_TYPE_MCP23008);
307
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
307
     lcd.begin(LCD_WIDTH, LCD_HEIGHT);
308
     
308
     
309
 #else
309
 #else
497
     char c;
497
     char c;
498
     //Use all characters in narrow LCDs
498
     //Use all characters in narrow LCDs
499
   #if LCD_WIDTH < 20
499
   #if LCD_WIDTH < 20
500
-    	uint8_t n = LCD_WIDTH - 1 - 1;
500
+      uint8_t n = LCD_WIDTH - 1 - 1;
501
     #else
501
     #else
502
-    	uint8_t n = LCD_WIDTH - 1 - 2;
502
+      uint8_t n = LCD_WIDTH - 1 - 2;
503
   #endif
503
   #endif
504
     lcd.setCursor(0, row);
504
     lcd.setCursor(0, row);
505
     lcd.print(pre_char);
505
     lcd.print(pre_char);
519
     char c;
519
     char c;
520
     //Use all characters in narrow LCDs
520
     //Use all characters in narrow LCDs
521
   #if LCD_WIDTH < 20
521
   #if LCD_WIDTH < 20
522
-    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
522
+      uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
523
     #else
523
     #else
524
-    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
524
+      uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
525
   #endif
525
   #endif
526
     lcd.setCursor(0, row);
526
     lcd.setCursor(0, row);
527
     lcd.print(pre_char);
527
     lcd.print(pre_char);
541
     char c;
541
     char c;
542
     //Use all characters in narrow LCDs
542
     //Use all characters in narrow LCDs
543
   #if LCD_WIDTH < 20
543
   #if LCD_WIDTH < 20
544
-    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
544
+      uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
545
     #else
545
     #else
546
-    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
546
+      uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
547
   #endif
547
   #endif
548
     lcd.setCursor(0, row);
548
     lcd.setCursor(0, row);
549
     lcd.print(pre_char);
549
     lcd.print(pre_char);
600
     lcd_printPGM(pstr);
600
     lcd_printPGM(pstr);
601
     lcd.print(':');
601
     lcd.print(':');
602
    #if LCD_WIDTH < 20
602
    #if LCD_WIDTH < 20
603
-    	lcd.setCursor(LCD_WIDTH - strlen(value), 1);
603
+      lcd.setCursor(LCD_WIDTH - strlen(value), 1);
604
     #else
604
     #else
605
-    	lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
605
+      lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
606
    #endif
606
    #endif
607
     lcd.print(value);
607
     lcd.print(value);
608
 }
608
 }
720
     //set the LEDS - referred to as backlights by the LiquidTWI2 library 
720
     //set the LEDS - referred to as backlights by the LiquidTWI2 library 
721
     static uint8_t ledsprev = 0;
721
     static uint8_t ledsprev = 0;
722
     uint8_t leds = 0;
722
     uint8_t leds = 0;
723
-    if (isHeatingBed()) leds |= LED_A;
724
-    if (isHeatingHotend(0)) leds |= LED_B;
723
+    if (target_temperature_bed > 0) leds |= LED_A;
724
+    if (target_temperature[0] > 0) leds |= LED_B;
725
     if (fanSpeed) leds |= LED_C;
725
     if (fanSpeed) leds |= LED_C;
726
     #if EXTRUDERS > 1  
726
     #if EXTRUDERS > 1  
727
-      if (isHeatingHotend(1)) leds |= LED_C;
727
+      if (target_temperature[1] > 0) leds |= LED_C;
728
     #endif
728
     #endif
729
     if (leds != ledsprev) {
729
     if (leds != ledsprev) {
730
       lcd.setBacklight(leds);
730
       lcd.setBacklight(leds);

Loading…
Cancel
Save