Fan speed and 4th extruder on graphical LCD

- Display fan speed 0-1 as “—“ and 254-255 as “100%”.
- Display 4th extruder instead of the heated bed
2.0.x
Scott Lahteine 10 years ago
parent 1a3c7d91f1
commit aa67b38a44

@ -199,7 +199,7 @@ static void lcd_implementation_status_screen() {
u8g.setPrintPos(80,47); u8g.setPrintPos(80,47);
if (starttime != 0) { if (starttime != 0) {
uint16_t time = millis()/60000 - starttime/60000; uint16_t time = (millis() - starttime) / 60000;
u8g.print(itostr2(time/60)); u8g.print(itostr2(time/60));
u8g.print(':'); u8g.print(':');
u8g.print(itostr2(time%60)); u8g.print(itostr2(time%60));
@ -210,26 +210,25 @@ static void lcd_implementation_status_screen() {
#endif #endif
// Extruders // Extruders
_draw_heater_status(6, 0); for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i);
#if EXTRUDERS > 1
_draw_heater_status(31, 1);
#if EXTRUDERS > 2
_draw_heater_status(55, 2);
#endif
#endif
// Heatbed // Heatbed
_draw_heater_status(81, -1); if (EXTRUDERS < 4) _draw_heater_status(81, -1);
// Fan // Fan
u8g.setFont(FONT_STATUSMENU); u8g.setFont(FONT_STATUSMENU);
u8g.setPrintPos(104,27); u8g.setPrintPos(104,27);
#if defined(FAN_PIN) && FAN_PIN > -1 #if defined(FAN_PIN) && FAN_PIN > -1
u8g.print(itostr3(int((fanSpeed*100)/256 + 1))); int per = ((fanSpeed + 1) * 100) / 256;
u8g.print("%"); if (per) {
#else u8g.print(itostr3(per));
u8g.print("---"); u8g.print("%");
}
else
#endif #endif
{
u8g.print("---");
}
// X, Y, Z-Coordinates // X, Y, Z-Coordinates
u8g.setFont(FONT_STATUSMENU); u8g.setFont(FONT_STATUSMENU);

Loading…
Cancel
Save