Allow LCD_SET_PROGRESS_MANUALLY without SDSUPPORT

This commit is contained in:
blye 2018-01-25 08:10:47 +00:00 committed by Scott Lahteine
parent bf5df306e1
commit 168af8bacb

View file

@ -580,11 +580,9 @@ static void lcd_implementation_status_screen() {
} }
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
// //
// SD Card Symbol // SD Card Symbol
// //
if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) { if (card.isFileOpen() && PAGE_CONTAINS(42 - (TALL_FONT_CORRECTION), 51 - (TALL_FONT_CORRECTION))) {
// Upper box // Upper box
u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47) u8g.drawBox(42, 42 - (TALL_FONT_CORRECTION), 8, 7); // 42-48 (or 41-47)
@ -595,11 +593,12 @@ static void lcd_implementation_status_screen() {
// Corner pixel // Corner pixel
u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42) u8g.drawPixel(50, 43 - (TALL_FONT_CORRECTION)); // 43 (or 42)
} }
#endif // SDSUPPORT
#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
// //
// Progress bar frame // Progress bar frame
// //
#define PROGRESS_BAR_X 54 #define PROGRESS_BAR_X 54
#define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X) #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X)
@ -650,7 +649,6 @@ static void lcd_implementation_status_screen() {
#endif #endif
if (PAGE_CONTAINS(41, 48)) { if (PAGE_CONTAINS(41, 48)) {
char buffer[10]; char buffer[10];
duration_t elapsed = print_job_timer.duration(); duration_t elapsed = print_job_timer.duration();
bool has_days = (elapsed.value >= 60*60*24L); bool has_days = (elapsed.value >= 60*60*24L);
@ -659,7 +657,7 @@ static void lcd_implementation_status_screen() {
lcd_print(buffer); lcd_print(buffer);
} }
#endif #endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
// //
// XYZ Coordinates // XYZ Coordinates