소스 검색

Fix compilation errors. Followup to #12439 (#12481)

Marcio Teixeira 6 년 전
부모
커밋
50ee747787
3개의 변경된 파일21개의 추가작업 그리고 21개의 파일을 삭제
  1. 0
    1
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  2. 1
    1
      Marlin/src/lcd/extensible_ui/ui_api.h
  3. 20
    19
      Marlin/src/lcd/ultralcd.cpp

+ 0
- 1
Marlin/src/lcd/extensible_ui/ui_api.cpp 파일 보기

134
       // The ms count is
134
       // The ms count is
135
       return (uint32_t)(currTime / (F_CPU / 8000));
135
       return (uint32_t)(currTime / (F_CPU / 8000));
136
     }
136
     }
137
-
138
   #endif // __SAM3X8E__
137
   #endif // __SAM3X8E__
139
 
138
 
140
   void delay_us(unsigned long us) {
139
   void delay_us(unsigned long us) {

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.h 파일 보기

179
   #ifdef __SAM3X8E__
179
   #ifdef __SAM3X8E__
180
     uint32_t safe_millis();
180
     uint32_t safe_millis();
181
   #else
181
   #else
182
-    #define safe_millis() millis() // TODO: Implement for AVR
182
+    FORCE_INLINE uint32_t safe_millis() { return millis(); } // TODO: Implement for AVR
183
   #endif
183
   #endif
184
 
184
 
185
   void delay_us(unsigned long us);
185
   void delay_us(unsigned long us);

+ 20
- 19
Marlin/src/lcd/ultralcd.cpp 파일 보기

29
   #if ENABLED(SDSUPPORT)
29
   #if ENABLED(SDSUPPORT)
30
     #include "../sd/cardreader.h"
30
     #include "../sd/cardreader.h"
31
   #endif
31
   #endif
32
-
33
   #if ENABLED(EXTENSIBLE_UI)
32
   #if ENABLED(EXTENSIBLE_UI)
34
     #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
33
     #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
35
   #endif
34
   #endif
36
 #endif
35
 #endif
37
 
36
 
38
 #if HAS_SPI_LCD
37
 #if HAS_SPI_LCD
38
+  #if ENABLED(STATUS_MESSAGE_SCROLLING)
39
+    uint8_t MarlinUI::status_scroll_offset; // = 0
40
+    #if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
41
+      #define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
42
+    #else
43
+      #define MAX_MESSAGE_LENGTH CHARSIZE * 2 * (LCD_WIDTH)
44
+    #endif
45
+  #else
46
+    #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH)
47
+  #endif
48
+#elif ENABLED(EXTENSIBLE_UI)
49
+  #define MAX_MESSAGE_LENGTH 63
50
+#endif
51
+
52
+#ifdef MAX_MESSAGE_LENGTH
53
+  uint8_t MarlinUI::status_message_level; // = 0
54
+  char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
55
+#endif
56
+
57
+#if HAS_SPI_LCD
39
 
58
 
40
 #if HAS_GRAPHICAL_LCD
59
 #if HAS_GRAPHICAL_LCD
41
   #include "dogm/ultralcd_DOGM.h"
60
   #include "dogm/ultralcd_DOGM.h"
75
   uint8_t lcd_sd_status;
94
   uint8_t lcd_sd_status;
76
 #endif
95
 #endif
77
 
96
 
78
-#if ENABLED(STATUS_MESSAGE_SCROLLING)
79
-  uint8_t MarlinUI::status_scroll_offset; // = 0
80
-  #if LONG_FILENAME_LENGTH > CHARSIZE * 2 * (LCD_WIDTH)
81
-    #define MAX_MESSAGE_LENGTH LONG_FILENAME_LENGTH
82
-  #else
83
-    #define MAX_MESSAGE_LENGTH CHARSIZE * 2 * (LCD_WIDTH)
84
-  #endif
85
-#elif ENABLED(EXTENSIBLE_UI)
86
-  #define MAX_MESSAGE_LENGTH 63
87
-#else
88
-  #define MAX_MESSAGE_LENGTH CHARSIZE * (LCD_WIDTH)
89
-#endif
90
-
91
-#if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI)
92
-  uint8_t MarlinUI::status_message_level; // = 0
93
-  char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1];
94
-#endif
95
-
96
 #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS
97
 #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS
97
   bool MarlinUI::defer_return_to_status;
98
   bool MarlinUI::defer_return_to_status;
98
 #endif
99
 #endif

Loading…
취소
저장