Reorganize some enums

2.0.x
Scott Lahteine 6 years ago
parent 606a4362b3
commit 3019713402

@ -69,20 +69,4 @@ typedef enum {
TEMPUNIT_F TEMPUNIT_F
} TempUnit; } 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__ #endif // __ENUM_H__

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

@ -57,7 +57,15 @@
void lcd_kill_screen(); void lcd_kill_screen();
void kill_screen(PGM_P lcd_msg); 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; } inline void lcd_refresh() { lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
#if HAS_BUZZER #if HAS_BUZZER

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

Loading…
Cancel
Save