Ver código fonte

Reorganize some enums

Scott Lahteine 6 anos atrás
pai
commit
3019713402

+ 0
- 16
Marlin/src/core/enum.h Ver arquivo

@@ -69,20 +69,4 @@ typedef enum {
69 69
   TEMPUNIT_F
70 70
 } TempUnit;
71 71
 
72
-/**
73
- * SD Card
74
- */
75
-enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
76
-
77
-/**
78
- * Ultra LCD
79
- */
80
-enum LCDViewAction : char {
81
-  LCDVIEW_NONE,
82
-  LCDVIEW_REDRAW_NOW,
83
-  LCDVIEW_CALL_REDRAW_NEXT,
84
-  LCDVIEW_CLEAR_CALL_REDRAW,
85
-  LCDVIEW_CALL_NO_REDRAW
86
-};
87
-
88 72
 #endif // __ENUM_H__

+ 2
- 3
Marlin/src/lcd/ultralcd.cpp Ver arquivo

@@ -117,10 +117,9 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed
117 117
 // The main status screen
118 118
 void lcd_status_screen();
119 119
 
120
-millis_t next_lcd_update_ms;
121
-
122
-uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial)
120
+LCDViewAction lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
123 121
 uint16_t max_display_update_time = 0;
122
+millis_t next_lcd_update_ms;
124 123
 
125 124
 #if ENABLED(ULTIPANEL)
126 125
 

+ 9
- 1
Marlin/src/lcd/ultralcd.h Ver arquivo

@@ -57,7 +57,15 @@
57 57
   void lcd_kill_screen();
58 58
   void kill_screen(PGM_P lcd_msg);
59 59
 
60
-  extern uint8_t lcdDrawUpdate;
60
+  enum LCDViewAction : uint8_t {
61
+    LCDVIEW_NONE,
62
+    LCDVIEW_REDRAW_NOW,
63
+    LCDVIEW_CALL_REDRAW_NEXT,
64
+    LCDVIEW_CLEAR_CALL_REDRAW,
65
+    LCDVIEW_CALL_NO_REDRAW
66
+  };
67
+
68
+  extern LCDViewAction lcdDrawUpdate;
61 69
   inline void lcd_refresh() { lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
62 70
 
63 71
   #if HAS_BUZZER

+ 2
- 0
Marlin/src/sd/cardreader.h Ver arquivo

@@ -33,6 +33,8 @@
33 33
 
34 34
 #include "SdFile.h"
35 35
 
36
+enum LsAction : uint8_t { LS_SerialPrint, LS_Count, LS_GetFilename };
37
+
36 38
 class CardReader {
37 39
 public:
38 40
   CardReader();

Carregando…
Cancelar
Salvar