|
@@ -92,6 +92,12 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons
|
92
|
92
|
#define MAX_HOTEND_DRAW MIN(HOTENDS, ((LCD_PIXEL_WIDTH - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
|
93
|
93
|
#define STATUS_HEATERS_BOT (STATUS_HEATERS_Y + STATUS_HEATERS_HEIGHT - 1)
|
94
|
94
|
|
|
95
|
+#if ENABLED(MARLIN_DEV_MODE)
|
|
96
|
+ #define SHOW_ON_STATE READ(X_MIN_PIN)
|
|
97
|
+#else
|
|
98
|
+ #define SHOW_ON_STATE false
|
|
99
|
+#endif
|
|
100
|
+
|
95
|
101
|
FORCE_INLINE void _draw_heater_status(const int8_t heater, const bool blink) {
|
96
|
102
|
#if !HEATER_IDLE_HANDLER
|
97
|
103
|
UNUSED(blink);
|
|
@@ -104,10 +110,21 @@ FORCE_INLINE void _draw_heater_status(const int8_t heater, const bool blink) {
|
104
|
110
|
#define IFBED(A,B) (B)
|
105
|
111
|
#endif
|
106
|
112
|
|
107
|
|
- const bool isHeat = IFBED(BED_ALT(), HOTEND_ALT(heater));
|
|
113
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
114
|
+ constexpr bool isHeat = true;
|
|
115
|
+ #else
|
|
116
|
+ const bool isHeat = IFBED(BED_ALT(), HOTEND_ALT(heater));
|
|
117
|
+ #endif
|
|
118
|
+
|
108
|
119
|
const uint8_t tx = IFBED(STATUS_BED_TEXT_X, STATUS_HOTEND_TEXT_X(heater));
|
109
|
|
- const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)),
|
110
|
|
- target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater));
|
|
120
|
+
|
|
121
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
122
|
+ const float temp = 20 + (millis() >> 8) % IFBED(100, 200);
|
|
123
|
+ const float target = IFBED(100, 200);
|
|
124
|
+ #else
|
|
125
|
+ const float temp = IFBED(thermalManager.degBed(), thermalManager.degHotend(heater)),
|
|
126
|
+ target = IFBED(thermalManager.degTargetBed(), thermalManager.degTargetHotend(heater));
|
|
127
|
+ #endif
|
111
|
128
|
|
112
|
129
|
#if DISABLED(STATUS_HOTEND_ANIM)
|
113
|
130
|
#define STATIC_HOTEND true
|
|
@@ -236,8 +253,17 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
236
|
253
|
}
|
237
|
254
|
}
|
238
|
255
|
|
|
256
|
+#if ENABLED(MARLIN_DEV_MODE)
|
|
257
|
+ uint16_t count_renders = 0;
|
|
258
|
+ uint32_t total_cycles = 0;
|
|
259
|
+#endif
|
|
260
|
+
|
239
|
261
|
void MarlinUI::draw_status_screen() {
|
240
|
262
|
|
|
263
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
264
|
+ if (first_page) count_renders++;
|
|
265
|
+ #endif
|
|
266
|
+
|
241
|
267
|
static char xstring[5], ystring[5], zstring[8];
|
242
|
268
|
#if ENABLED(FILAMENT_LCD_DISPLAY)
|
243
|
269
|
static char wstring[5], mstring[4];
|
|
@@ -248,10 +274,10 @@ void MarlinUI::draw_status_screen() {
|
248
|
274
|
#if ANIM_HOTEND || ANIM_BED
|
249
|
275
|
uint8_t new_bits = 0;
|
250
|
276
|
#if ANIM_HOTEND
|
251
|
|
- HOTEND_LOOP() if (thermalManager.isHeatingHotend(e)) SBI(new_bits, e);
|
|
277
|
+ HOTEND_LOOP() if (thermalManager.isHeatingHotend(e) ^ SHOW_ON_STATE) SBI(new_bits, e);
|
252
|
278
|
#endif
|
253
|
279
|
#if ANIM_BED
|
254
|
|
- if (thermalManager.isHeatingBed()) SBI(new_bits, 7);
|
|
280
|
+ if (thermalManager.isHeatingBed() ^ SHOW_ON_STATE) SBI(new_bits, 7);
|
255
|
281
|
#endif
|
256
|
282
|
heat_bits = new_bits;
|
257
|
283
|
#endif
|
|
@@ -274,6 +300,10 @@ void MarlinUI::draw_status_screen() {
|
274
|
300
|
// Status Menu Font
|
275
|
301
|
set_font(FONT_STATUSMENU);
|
276
|
302
|
|
|
303
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
304
|
+ TCNT5 = 0;
|
|
305
|
+ #endif
|
|
306
|
+
|
277
|
307
|
#if STATUS_LOGO_WIDTH
|
278
|
308
|
if (PAGE_CONTAINS(STATUS_LOGO_Y, STATUS_LOGO_Y + STATUS_LOGO_HEIGHT - 1))
|
279
|
309
|
u8g.drawBitmapP(STATUS_LOGO_X, STATUS_LOGO_Y, STATUS_LOGO_BYTEWIDTH, STATUS_LOGO_HEIGHT, status_logo_bmp);
|
|
@@ -356,6 +386,10 @@ void MarlinUI::draw_status_screen() {
|
356
|
386
|
#endif
|
357
|
387
|
}
|
358
|
388
|
|
|
389
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
390
|
+ total_cycles += TCNT5;
|
|
391
|
+ #endif
|
|
392
|
+
|
359
|
393
|
#if ENABLED(SDSUPPORT)
|
360
|
394
|
//
|
361
|
395
|
// SD Card Symbol
|
|
@@ -557,6 +591,17 @@ void MarlinUI::draw_status_screen() {
|
557
|
591
|
|
558
|
592
|
void MarlinUI::draw_status_message(const bool blink) {
|
559
|
593
|
|
|
594
|
+ #if ENABLED(MARLIN_DEV_MODE)
|
|
595
|
+ if (PAGE_CONTAINS(64-8, 64-1)) {
|
|
596
|
+ lcd_put_int(total_cycles);
|
|
597
|
+ lcd_put_wchar('/');
|
|
598
|
+ lcd_put_int(count_renders);
|
|
599
|
+ lcd_put_wchar('=');
|
|
600
|
+ lcd_put_int(int(total_cycles / count_renders));
|
|
601
|
+ return;
|
|
602
|
+ }
|
|
603
|
+ #endif
|
|
604
|
+
|
560
|
605
|
// Get the UTF8 character count of the string
|
561
|
606
|
uint8_t slen = utf8_strlen(status_message);
|
562
|
607
|
|