Browse Source

Invert hotend bitmaps, by default

Scott Lahteine 6 years ago
parent
commit
ee423dcdd0
2 changed files with 93 additions and 29 deletions
  1. 81
    25
      Marlin/src/lcd/dogm/dogm_Statusscreen.h
  2. 12
    4
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp

+ 81
- 25
Marlin/src/lcd/dogm/dogm_Statusscreen.h View File

49
 
49
 
50
 #else // !CUSTOM_STATUS_SCREEN_IMAGE
50
 #else // !CUSTOM_STATUS_SCREEN_IMAGE
51
 
51
 
52
-  //#define COMBINED_HEATER_BITMAP
52
+  //#define STATUS_COMBINE_HEATERS
53
   //#define STATUS_HOTEND_NUMBERLESS
53
   //#define STATUS_HOTEND_NUMBERLESS
54
+  #define STATUS_HOTEND_INVERTED
54
   #define STATUS_HOTEND_ANIM
55
   #define STATUS_HOTEND_ANIM
55
   #define STATUS_BED_ANIM
56
   #define STATUS_BED_ANIM
56
   //#define ALTERNATE_BED_BITMAP
57
   //#define ALTERNATE_BED_BITMAP
63
 
64
 
64
 #if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
65
 #if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
65
 
66
 
66
-  #ifdef COMBINED_HEATER_BITMAP
67
+  #ifdef STATUS_COMBINE_HEATERS
67
 
68
 
68
     //
69
     //
69
     // Status Screen Combined Heater bitmaps
70
     // Status Screen Combined Heater bitmaps
235
 
236
 
236
     #endif // !HAS_HEATED_BED || HOTENDS > 3
237
     #endif // !HAS_HEATED_BED || HOTENDS > 3
237
 
238
 
238
-  #else // !COMBINED_HEATER_BITMAP
239
+  #else // !STATUS_COMBINE_HEATERS
239
 
240
 
240
     //
241
     //
241
     // Status Screen Hotends bitmaps
242
     // Status Screen Hotends bitmaps
247
 
248
 
248
       #if HOTENDS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
249
       #if HOTENDS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
249
 
250
 
250
-        const unsigned char status_hotend_bmp[] PROGMEM = {
251
+        const unsigned char status_hotend_a_bmp[] PROGMEM = {
251
           B00011111,B11100000,
252
           B00011111,B11100000,
252
           B00111111,B11110000,
253
           B00111111,B11110000,
253
           B00111111,B11110000,
254
           B00111111,B11110000,
264
 
265
 
265
         #ifdef STATUS_HOTEND_ANIM
266
         #ifdef STATUS_HOTEND_ANIM
266
 
267
 
267
-          const unsigned char status_hotend_on_bmp[] PROGMEM = {
268
+          const unsigned char status_hotend_b_bmp[] PROGMEM = {
268
             B00011111,B11100000,
269
             B00011111,B11100000,
269
             B00100000,B00010000,
270
             B00100000,B00010000,
270
             B00100000,B00010000,
271
             B00100000,B00010000,
298
 
299
 
299
           #ifdef STATUS_HOTEND_ANIM
300
           #ifdef STATUS_HOTEND_ANIM
300
 
301
 
301
-            const unsigned char status_hotend1_bmp[] PROGMEM = {
302
+            const unsigned char status_hotend1_a_bmp[] PROGMEM = {
302
               B00011111,B11100000,
303
               B00011111,B11100000,
303
               B00111111,B11110000,
304
               B00111111,B11110000,
304
               B00111110,B11110000,
305
               B00111110,B11110000,
313
               B00000011,B00000000
314
               B00000011,B00000000
314
             };
315
             };
315
 
316
 
316
-            const unsigned char status_hotend1_on_bmp[] PROGMEM = {
317
+            const unsigned char status_hotend1_b_bmp[] PROGMEM = {
317
               B00011111,B11100000,
318
               B00011111,B11100000,
318
               B00100000,B00010000,
319
               B00100000,B00010000,
319
               B00100001,B00010000,
320
               B00100001,B00010000,
328
               B00000011,B00000000
329
               B00000011,B00000000
329
             };
330
             };
330
 
331
 
331
-            const unsigned char status_hotend2_bmp[] PROGMEM = {
332
+            const unsigned char status_hotend2_a_bmp[] PROGMEM = {
332
               B00011111,B11100000,
333
               B00011111,B11100000,
333
               B00111111,B11110000,
334
               B00111111,B11110000,
334
               B00111100,B11110000,
335
               B00111100,B11110000,
343
               B00000011,B00000000
344
               B00000011,B00000000
344
             };
345
             };
345
 
346
 
346
-            const unsigned char status_hotend2_on_bmp[] PROGMEM = {
347
+            const unsigned char status_hotend2_b_bmp[] PROGMEM = {
347
               B00011111,B11100000,
348
               B00011111,B11100000,
348
               B00100000,B00010000,
349
               B00100000,B00010000,
349
               B00100011,B00010000,
350
               B00100011,B00010000,
360
 
361
 
361
           #else
362
           #else
362
 
363
 
363
-            const unsigned char status_hotend1_bmp[] PROGMEM = {
364
+            const unsigned char status_hotend1_a_bmp[] PROGMEM = {
364
               B00011111,B11100000,
365
               B00011111,B11100000,
365
               B00111110,B11110000,
366
               B00111110,B11110000,
366
               B00111100,B11110000,
367
               B00111100,B11110000,
375
               B00000011,B00000000
376
               B00000011,B00000000
376
             };
377
             };
377
 
378
 
378
-            const unsigned char status_hotend2_bmp[] PROGMEM = {
379
+            const unsigned char status_hotend2_a_bmp[] PROGMEM = {
379
               B00011111,B11100000,
380
               B00011111,B11100000,
380
               B00111100,B11110000,
381
               B00111100,B11110000,
381
               B00111011,B01110000,
382
               B00111011,B01110000,
394
 
395
 
395
         #endif
396
         #endif
396
 
397
 
397
-        #if HOTENDS >= 3
398
+        #if STATUS_HOTEND_BITMAPS >= 3
398
 
399
 
399
           #ifdef STATUS_HOTEND_ANIM
400
           #ifdef STATUS_HOTEND_ANIM
400
 
401
 
401
-            const unsigned char status_hotend3_bmp[] PROGMEM = {
402
+            const unsigned char status_hotend3_a_bmp[] PROGMEM = {
402
               B00011111,B11100000,
403
               B00011111,B11100000,
403
               B00111111,B11110000,
404
               B00111111,B11110000,
404
               B00111100,B11110000,
405
               B00111100,B11110000,
413
               B00000011,B00000000
414
               B00000011,B00000000
414
             };
415
             };
415
 
416
 
416
-            const unsigned char status_hotend3_on_bmp[] PROGMEM = {
417
+            const unsigned char status_hotend3_b_bmp[] PROGMEM = {
417
               B00011111,B11100000,
418
               B00011111,B11100000,
418
               B00100000,B00010000,
419
               B00100000,B00010000,
419
               B00100011,B00010000,
420
               B00100011,B00010000,
430
 
431
 
431
           #else
432
           #else
432
 
433
 
433
-            const unsigned char status_hotend3_bmp[] PROGMEM = {
434
+            const unsigned char status_hotend3_a_bmp[] PROGMEM = {
434
               B00011111,B11100000,
435
               B00011111,B11100000,
435
               B00111100,B11110000,
436
               B00111100,B11110000,
436
               B00111011,B01110000,
437
               B00111011,B01110000,
449
 
450
 
450
         #endif
451
         #endif
451
 
452
 
452
-        #if HOTENDS >= 4 && !HAS_HEATED_BED
453
+        #if STATUS_HOTEND_BITMAPS >= 4 && !HAS_HEATED_BED
453
 
454
 
454
           #ifdef STATUS_HOTEND_ANIM
455
           #ifdef STATUS_HOTEND_ANIM
455
 
456
 
456
-            const unsigned char status_hotend4_bmp[] PROGMEM = {
457
+            const unsigned char status_hotend4_a_bmp[] PROGMEM = {
457
               B00011111,B11100000,
458
               B00011111,B11100000,
458
               B00111111,B11110000,
459
               B00111111,B11110000,
459
               B00111011,B01110000,
460
               B00111011,B01110000,
468
               B00000011,B00000000
469
               B00000011,B00000000
469
             };
470
             };
470
 
471
 
471
-            const unsigned char status_hotend4_on_bmp[] PROGMEM = {
472
+            const unsigned char status_hotend4_b_bmp[] PROGMEM = {
472
               B00011111,B11100000,
473
               B00011111,B11100000,
473
               B00100000,B00010000,
474
               B00100000,B00010000,
474
               B00100100,B10010000,
475
               B00100100,B10010000,
485
 
486
 
486
           #else
487
           #else
487
 
488
 
488
-            const unsigned char status_hotend4_bmp[] PROGMEM = {
489
+            const unsigned char status_hotend4_a_bmp[] PROGMEM = {
489
               B00011111,B11100000,
490
               B00011111,B11100000,
490
               B00111011,B01110000,
491
               B00111011,B01110000,
491
               B00111011,B01110000,
492
               B00111011,B01110000,
504
 
505
 
505
         #endif
506
         #endif
506
 
507
 
508
+        #if STATUS_HOTEND_BITMAPS >= 5 && !HAS_HEATED_BED
509
+
510
+          #ifdef STATUS_HOTEND_ANIM
511
+
512
+            const unsigned char status_hotend5_a_bmp[] PROGMEM = {
513
+              B00011111,B11100000,
514
+              B00111111,B11110000,
515
+              B00111000,B01110000,
516
+              B00111011,B11110000,
517
+              B00011000,B11100000,
518
+              B00011111,B01100000,
519
+              B00111111,B01110000,
520
+              B00111011,B01110000,
521
+              B00111100,B11110000,
522
+              B00001111,B11000000,
523
+              B00000111,B10000000,
524
+              B00000011,B00000000
525
+            };
526
+
527
+            const unsigned char status_hotend5_b_bmp[] PROGMEM = {
528
+              B00011111,B11100000,
529
+              B00100000,B00010000,
530
+              B00100111,B10010000,
531
+              B00100100,B00010000,
532
+              B00010111,B00100000,
533
+              B00010000,B10100000,
534
+              B00100000,B10010000,
535
+              B00100100,B10010000,
536
+              B00110011,B00110000,
537
+              B00001000,B01000000,
538
+              B00000100,B10000000,
539
+              B00000011,B00000000
540
+            };
541
+
542
+          #else
543
+
544
+            const unsigned char status_hotend5_a_bmp[] PROGMEM = {
545
+              B00011111,B11100000,
546
+              B00111000,B01110000,
547
+              B00111011,B11110000,
548
+              B00111000,B11110000,
549
+              B00011111,B01100000,
550
+              B00011111,B01100000,
551
+              B00111011,B01110000,
552
+              B00111100,B11110000,
553
+              B00111111,B11110000,
554
+              B00001111,B11000000,
555
+              B00000111,B10000000,
556
+              B00000011,B00000000
557
+            };
558
+
559
+          #endif
560
+
561
+        #endif
562
+
507
       #endif
563
       #endif
508
 
564
 
509
     #endif
565
     #endif
516
 // Default Status Screen Bed bitmaps
572
 // Default Status Screen Bed bitmaps
517
 //
573
 //
518
 
574
 
519
-#if !STATUS_BED_WIDTH && !defined(COMBINED_HEATER_BITMAP) && HAS_HEATED_BED && HOTENDS < 4
575
+#if !STATUS_BED_WIDTH && !defined(STATUS_COMBINE_HEATERS) && HAS_HEATED_BED && HOTENDS < 4
520
 
576
 
521
   #ifdef ALTERNATE_BED_BITMAP
577
   #ifdef ALTERNATE_BED_BITMAP
522
 
578
 
602
 
658
 
603
   #endif
659
   #endif
604
 
660
 
605
-#endif // !STATUS_BED_WIDTH && !COMBINED_HEATER_BITMAP && HAS_HEATED_BED && HOTENDS < 4
661
+#endif // !STATUS_BED_WIDTH && !STATUS_COMBINE_HEATERS && HAS_HEATED_BED && HOTENDS < 4
606
 
662
 
607
 // Can also be overridden in Configuration.h
663
 // Can also be overridden in Configuration.h
608
 // If you can afford it, try the 3-frame fan animation!
664
 // If you can afford it, try the 3-frame fan animation!
982
   #endif
1038
   #endif
983
 
1039
 
984
   #if STATUS_HOTEND_BITMAPS > 1
1040
   #if STATUS_HOTEND_BITMAPS > 1
985
-    #define TEST_BITMAP_OFF status_hotend1_bmp
986
-    #define TEST_BITMAP_ON  status_hotend1_on_bmp
1041
+    #define TEST_BITMAP_OFF status_hotend1_a_bmp
1042
+    #define TEST_BITMAP_ON  status_hotend1_b_bmp
987
   #else
1043
   #else
988
-    #define TEST_BITMAP_OFF status_hotend_bmp
989
-    #define TEST_BITMAP_ON  status_hotend_on_bmp
1044
+    #define TEST_BITMAP_OFF status_hotend_a_bmp
1045
+    #define TEST_BITMAP_ON  status_hotend_b_bmp
990
   #endif
1046
   #endif
991
   #ifndef STATUS_HEATERS_HEIGHT
1047
   #ifndef STATUS_HEATERS_HEIGHT
992
     #define STATUS_HEATERS_HEIGHT (sizeof(TEST_BITMAP_OFF) / (STATUS_HOTEND1_BYTEWIDTH))
1048
     #define STATUS_HEATERS_HEIGHT (sizeof(TEST_BITMAP_OFF) / (STATUS_HOTEND1_BYTEWIDTH))

+ 12
- 4
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

305
 
305
 
306
       #else
306
       #else
307
 
307
 
308
+        #if ANIM_END && defined(STATUS_HOTEND_INVERTED)
309
+          #define OFF_BMP(N) status_hotend##N##_b_bmp
310
+          #define ON_BMP(N)  status_hotend##N##_a_bmp
311
+        #else
312
+          #define OFF_BMP(N) status_hotend##N##_a_bmp
313
+          #define ON_BMP(N)  status_hotend##N##_b_bmp
314
+        #endif
315
+
308
         #if STATUS_HOTEND_BITMAPS > 1
316
         #if STATUS_HOTEND_BITMAPS > 1
309
-          static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, status_hotend1_bmp, status_hotend2_bmp, status_hotend3_bmp, status_hotend4_bmp, status_hotend5_bmp, status_hotend6_bmp);
317
+          static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, OFF_BMP(1), OFF_BMP(2), OFF_BMP(3), OFF_BMP(4), OFF_BMP(5), OFF_BMP(6));
310
           #if ANIM_END
318
           #if ANIM_END
311
-            static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, status_hotend1_on_bmp, status_hotend2_on_bmp, status_hotend3_on_bmp, status_hotend4_on_bmp, status_hotend5_on_bmp, status_hotend6_on_bmp);
319
+            static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, ON_BMP(1), ON_BMP(2), ON_BMP(3), ON_BMP(4), ON_BMP(5), ON_BMP(6));
312
             #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
320
             #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
313
           #else
321
           #else
314
             #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
322
             #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)])
315
           #endif
323
           #endif
316
         #elif ANIM_END
324
         #elif ANIM_END
317
-          #define HOTEND_BITMAP(N,S) ((S) ? status_hotend_on_bmp : status_hotend_bmp)
325
+          #define HOTEND_BITMAP(N,S) ((S) ? ON_BMP() : OFF_BMP())
318
         #else
326
         #else
319
-          #define HOTEND_BITMAP(N,S) status_hotend_bmp
327
+          #define HOTEND_BITMAP(N,S) status_hotend_a_bmp
320
         #endif
328
         #endif
321
 
329
 
322
         #define MAX_HOTEND_DRAW MIN(HOTENDS, ((128 - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))
330
         #define MAX_HOTEND_DRAW MIN(HOTENDS, ((128 - (STATUS_LOGO_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) / (STATUS_HEATERS_XSPACE)))

Loading…
Cancel
Save