Browse Source

Reorganize some enums

pull/1/head
Scott Lahteine 6 years ago
parent
commit
3019713402
  1. 16
      Marlin/src/core/enum.h
  2. 5
      Marlin/src/lcd/ultralcd.cpp
  3. 10
      Marlin/src/lcd/ultralcd.h
  4. 2
      Marlin/src/sd/cardreader.h

16
Marlin/src/core/enum.h

@ -69,20 +69,4 @@ typedef enum {
TEMPUNIT_F
} TempUnit;
/**
* SD Card
*/
enum LsAction : char { LS_SerialPrint, LS_Count, LS_GetFilename };
/**
* Ultra LCD
*/
enum LCDViewAction : char {
LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT,
LCDVIEW_CLEAR_CALL_REDRAW,
LCDVIEW_CALL_NO_REDRAW
};
#endif // __ENUM_H__

5
Marlin/src/lcd/ultralcd.cpp

@ -117,10 +117,9 @@ uint8_t lcd_status_update_delay = 1, // First update one loop delayed
// The main status screen
void lcd_status_screen();
millis_t next_lcd_update_ms;
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)
LCDViewAction lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
uint16_t max_display_update_time = 0;
millis_t next_lcd_update_ms;
#if ENABLED(ULTIPANEL)

10
Marlin/src/lcd/ultralcd.h

@ -57,7 +57,15 @@
void lcd_kill_screen();
void kill_screen(PGM_P lcd_msg);
extern uint8_t lcdDrawUpdate;
enum LCDViewAction : uint8_t {
LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT,
LCDVIEW_CLEAR_CALL_REDRAW,
LCDVIEW_CALL_NO_REDRAW
};
extern LCDViewAction lcdDrawUpdate;
inline void lcd_refresh() { lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
#if HAS_BUZZER

2
Marlin/src/sd/cardreader.h

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

Loading…
Cancel
Save