Skip to content

Commit 2218bab

Browse files
authored
🚸 Color UI remaining time (#24843)
1 parent a58e530 commit 2218bab

14 files changed

+886
-162
lines changed

Marlin/src/lcd/marlinui.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,17 @@ class MarlinUI {
297297
}
298298
#endif
299299

300+
#if HAS_PRINT_PROGRESS_PERMYRIAD
301+
typedef uint16_t progress_t;
302+
#define PROGRESS_SCALE 100U
303+
#define PROGRESS_MASK 0x7FFF
304+
#else
305+
typedef uint8_t progress_t;
306+
#define PROGRESS_SCALE 1U
307+
#define PROGRESS_MASK 0x7F
308+
#endif
309+
300310
#if HAS_PRINT_PROGRESS
301-
#if HAS_PRINT_PROGRESS_PERMYRIAD
302-
typedef uint16_t progress_t;
303-
#define PROGRESS_SCALE 100U
304-
#define PROGRESS_MASK 0x7FFF
305-
#else
306-
typedef uint8_t progress_t;
307-
#define PROGRESS_SCALE 1U
308-
#define PROGRESS_MASK 0x7F
309-
#endif
310311
#if ENABLED(SET_PROGRESS_PERCENT)
311312
static progress_t progress_override;
312313
static void set_progress(const progress_t p) { progress_override = _MIN(p, 100U * (PROGRESS_SCALE)); }
3.05 KB
Binary file not shown.
Lines changed: 190 additions & 0 deletions
Loading
3.05 KB
Binary file not shown.

0 commit comments

Comments
 (0)