Browse Source

🔥 Remove JyersUI (#24459)

Scott Lahteine 1 year ago
parent
commit
f73fad1b2f
42 changed files with 39 additions and 8631 deletions
  1. 0
    1
      Marlin/Configuration.h
  2. 1
    1
      Marlin/Configuration_adv.h
  3. 0
    2
      Marlin/src/MarlinCore.cpp
  4. 0
    2
      Marlin/src/gcode/bedlevel/abl/G29.cpp
  5. 1
    8
      Marlin/src/gcode/config/M575.cpp
  6. 0
    3
      Marlin/src/gcode/control/M997.cpp
  7. 0
    4
      Marlin/src/gcode/feature/powerloss/M1000.cpp
  8. 0
    4
      Marlin/src/gcode/lcd/M0_M1.cpp
  9. 4
    6
      Marlin/src/gcode/probe/G30.cpp
  10. 4
    12
      Marlin/src/gcode/stats/M75-M78.cpp
  11. 0
    3
      Marlin/src/gcode/temp/M303.cpp
  12. 7
    8
      Marlin/src/inc/Conditionals_LCD.h
  13. 2
    2
      Marlin/src/inc/Conditionals_post.h
  14. 3
    3
      Marlin/src/inc/SanityCheck.h
  15. 3
    7
      Marlin/src/lcd/e3v2/common/dwin_api.cpp
  16. 0
    7
      Marlin/src/lcd/e3v2/jyersui/README.md
  17. 0
    208
      Marlin/src/lcd/e3v2/jyersui/base64.hpp
  18. 0
    6194
      Marlin/src/lcd/e3v2/jyersui/dwin.cpp
  19. 0
    283
      Marlin/src/lcd/e3v2/jyersui/dwin.h
  20. 0
    131
      Marlin/src/lcd/e3v2/jyersui/dwin_defines.h
  21. 0
    93
      Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp
  22. 0
    42
      Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h
  23. 0
    340
      Marlin/src/lcd/e3v2/jyersui/dwinui.cpp
  24. 0
    527
      Marlin/src/lcd/e3v2/jyersui/dwinui.h
  25. 0
    111
      Marlin/src/lcd/e3v2/jyersui/endstop_diag.cpp
  26. 0
    39
      Marlin/src/lcd/e3v2/jyersui/endstop_diag.h
  27. 0
    244
      Marlin/src/lcd/e3v2/jyersui/gcode_preview.cpp
  28. 0
    34
      Marlin/src/lcd/e3v2/jyersui/gcode_preview.h
  29. 0
    83
      Marlin/src/lcd/e3v2/jyersui/lockscreen.cpp
  30. 0
    49
      Marlin/src/lcd/e3v2/jyersui/lockscreen.h
  31. 0
    86
      Marlin/src/lcd/e3v2/jyersui/plot.cpp
  32. 0
    41
      Marlin/src/lcd/e3v2/jyersui/plot.h
  33. 3
    3
      Marlin/src/lcd/e3v2/proui/base64.hpp
  34. 4
    2
      Marlin/src/lcd/e3v2/proui/gcode_preview.cpp
  35. 1
    1
      Marlin/src/lcd/e3v2/proui/gcode_preview.h
  36. 1
    1
      Marlin/src/lcd/extui/ui_api.h
  37. 1
    4
      Marlin/src/lcd/marlinui.cpp
  38. 4
    6
      Marlin/src/lcd/marlinui.h
  39. 0
    22
      Marlin/src/module/settings.cpp
  40. 0
    8
      Marlin/src/module/temperature.cpp
  41. 0
    5
      buildroot/tests/STM32F103RE_creality
  42. 0
    1
      ini/features.ini

+ 0
- 1
Marlin/Configuration.h View File

@@ -3064,7 +3064,6 @@
3064 3064
 //
3065 3065
 //#define DWIN_CREALITY_LCD           // Creality UI
3066 3066
 //#define DWIN_LCD_PROUI              // Pro UI by MRiscoC
3067
-//#define DWIN_CREALITY_LCD_JYERSUI   // Jyers UI by Jacob Myers
3068 3067
 //#define DWIN_MARLINUI_PORTRAIT      // MarlinUI (portrait orientation)
3069 3068
 //#define DWIN_MARLINUI_LANDSCAPE     // MarlinUI (landscape orientation)
3070 3069
 

+ 1
- 1
Marlin/Configuration_adv.h View File

@@ -1335,7 +1335,7 @@
1335 1335
 
1336 1336
 #endif // HAS_MARLINUI_MENU
1337 1337
 
1338
-#if ANY(HAS_DISPLAY, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
1338
+#if EITHER(HAS_DISPLAY, DWIN_LCD_PROUI)
1339 1339
   //#define SOUND_MENU_ITEM   // Add a mute option to the LCD menu
1340 1340
   #define SOUND_ON_DEFAULT    // Buzzer/speaker default enabled state
1341 1341
 #endif

+ 0
- 2
Marlin/src/MarlinCore.cpp View File

@@ -76,8 +76,6 @@
76 76
     #include "lcd/e3v2/creality/dwin.h"
77 77
   #elif ENABLED(DWIN_LCD_PROUI)
78 78
     #include "lcd/e3v2/proui/dwin.h"
79
-  #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
80
-    #include "lcd/e3v2/jyersui/dwin.h"
81 79
   #endif
82 80
 #endif
83 81
 

+ 0
- 2
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -51,8 +51,6 @@
51 51
   #include "../../../lcd/e3v2/creality/dwin.h"
52 52
 #elif ENABLED(DWIN_LCD_PROUI)
53 53
   #include "../../../lcd/e3v2/proui/dwin.h"
54
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
55
-  #include "../../../lcd/e3v2/jyersui/dwin.h"
56 54
 #endif
57 55
 
58 56
 #if HAS_MULTI_HOTEND

+ 1
- 8
Marlin/src/gcode/config/M575.cpp View File

@@ -26,10 +26,6 @@
26 26
 
27 27
 #include "../gcode.h"
28 28
 
29
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
30
-  #include "../../lcd/e3v2/jyersui/dwin.h"
31
-#endif
32
-
33 29
 /**
34 30
  * M575 - Change serial baud rate
35 31
  *
@@ -69,10 +65,7 @@ void GcodeSuite::M575() {
69 65
 
70 66
       SERIAL_FLUSH();
71 67
 
72
-      if (set1) {
73
-        MYSERIAL1.end(); MYSERIAL1.begin(baud);
74
-        TERN_(DWIN_CREALITY_LCD_JYERSUI, eeprom_settings.Baud115k = (baud == 115200));
75
-      }
68
+      if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); }
76 69
       #if HAS_MULTI_SERIAL
77 70
         if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); }
78 71
         #ifdef SERIAL_PORT_3

+ 0
- 3
Marlin/src/gcode/control/M997.cpp View File

@@ -26,8 +26,6 @@
26 26
 
27 27
 #if ENABLED(DWIN_LCD_PROUI)
28 28
   #include "../../lcd/e3v2/proui/dwin.h"
29
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
30
-  #include "../../lcd/e3v2/jyersui/dwin.h"
31 29
 #endif
32 30
 
33 31
 /**
@@ -36,7 +34,6 @@
36 34
 void GcodeSuite::M997() {
37 35
 
38 36
   TERN_(DWIN_LCD_PROUI, DWIN_RebootScreen());
39
-  TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.DWIN_RebootScreen());
40 37
 
41 38
   flashFirmware(parser.intval('S'));
42 39
 

+ 0
- 4
Marlin/src/gcode/feature/powerloss/M1000.cpp View File

@@ -35,8 +35,6 @@
35 35
   #include "../../../lcd/e3v2/creality/dwin.h"
36 36
 #elif ENABLED(DWIN_LCD_PROUI)
37 37
   #include "../../../lcd/e3v2/proui/dwin.h"
38
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
39
-  #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
40 38
 #endif
41 39
 
42 40
 #define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY)
@@ -71,8 +69,6 @@ void GcodeSuite::M1000() {
71 69
         ui.goto_screen(menu_job_recovery);
72 70
       #elif HAS_DWIN_E3V2_BASIC
73 71
         recovery.dwin_flag = true;
74
-      #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
75
-        CrealityDWIN.Popup_Handler(Resume);
76 72
       #elif ENABLED(EXTENSIBLE_UI)
77 73
         ExtUI::onPowerLossResume();
78 74
       #else

+ 0
- 4
Marlin/src/gcode/lcd/M0_M1.cpp View File

@@ -38,8 +38,6 @@
38 38
 #elif ENABLED(DWIN_LCD_PROUI)
39 39
   #include "../../lcd/e3v2/proui/dwin_popup.h"
40 40
   #include "../../lcd/e3v2/proui/dwin.h"
41
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
42
-  #include "../../lcd/e3v2/jyersui/dwin.h"
43 41
 #endif
44 42
 
45 43
 #if ENABLED(HOST_PROMPT_SUPPORT)
@@ -78,8 +76,6 @@ void GcodeSuite::M0_M1() {
78 76
       DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
79 77
     else
80 78
       DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
81
-  #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
82
-    CrealityDWIN.Confirm_Handler(UserInput, parser.string_arg == nullptr);
83 79
   #else
84 80
 
85 81
     if (parser.string_arg) {

+ 4
- 6
Marlin/src/gcode/probe/G30.cpp View File

@@ -33,7 +33,7 @@
33 33
   #include "../../feature/probe_temp_comp.h"
34 34
 #endif
35 35
 
36
-#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
36
+#if ENABLED(DWIN_LCD_PROUI)
37 37
   #include "../../lcd/marlinui.h"
38 38
 #endif
39 39
 
@@ -53,7 +53,7 @@ void GcodeSuite::G30() {
53 53
                          parser.linearval('Y', current_position.y + probe.offset_xy.y) };
54 54
 
55 55
   if (!probe.can_reach(pos)) {
56
-    #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
56
+    #if ENABLED(DWIN_LCD_PROUI)
57 57
       SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT));
58 58
       LCD_MESSAGE(MSG_ZPROBE_OUT);
59 59
     #endif
@@ -65,9 +65,7 @@ void GcodeSuite::G30() {
65 65
 
66 66
   remember_feedrate_scaling_off();
67 67
 
68
-  #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
69
-    process_subcommands_now(F("G28O"));
70
-  #endif
68
+  TERN_(DWIN_LCD_PROUI, process_subcommands_now(F("G28O")));
71 69
 
72 70
   const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
73 71
 
@@ -76,7 +74,7 @@ void GcodeSuite::G30() {
76 74
   TERN_(HAS_PTC, ptc.set_enabled(true));
77 75
   if (!isnan(measured_z)) {
78 76
     SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
79
-    #if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
77
+    #if ENABLED(DWIN_LCD_PROUI)
80 78
       char msg[31], str_1[6], str_2[6], str_3[6];
81 79
       sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"),
82 80
         dtostrf(pos.x, 1, 1, str_1),

+ 4
- 12
Marlin/src/gcode/stats/M75-M78.cpp View File

@@ -33,23 +33,15 @@
33 33
   #include "../../lcd/e3v2/proui/dwin.h"
34 34
 #endif
35 35
 
36
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
37
-  #include "../../lcd/e3v2/jyersui/dwin.h"
38
-#endif
39
-
40 36
 /**
41 37
  * M75: Start print timer
42 38
  */
43 39
 void GcodeSuite::M75() {
44 40
   startOrResumeJob();
45
-  TERN_(DWIN_LCD_PROUI, DWIN_Print_Started(false));
46
-  if (!IS_SD_PRINTING()) {
47
-    #if ENABLED(DWIN_LCD_PROUI)
48
-      DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
49
-    #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
50
-      CrealityDWIN.Update_Print_Filename(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
51
-    #endif
52
-  }
41
+  #if ENABLED(DWIN_LCD_PROUI)
42
+    DWIN_Print_Started(false);
43
+    if (!IS_SD_PRINTING()) DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
44
+  #endif
53 45
 }
54 46
 
55 47
 /**

+ 0
- 3
Marlin/src/gcode/temp/M303.cpp View File

@@ -32,8 +32,6 @@
32 32
   #include "../../lcd/extui/ui_api.h"
33 33
 #elif ENABLED(DWIN_LCD_PROUI)
34 34
   #include "../../lcd/e3v2/proui/dwin.h"
35
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
36
-  #include "../../lcd/e3v2/jyersui/dwin.h"
37 35
 #endif
38 36
 
39 37
 /**
@@ -77,7 +75,6 @@ void GcodeSuite::M303() {
77 75
       SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
78 76
       TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM));
79 77
       TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
80
-      TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
81 78
       return;
82 79
   }
83 80
 

+ 7
- 8
Marlin/src/inc/Conditionals_LCD.h View File

@@ -477,8 +477,6 @@
477 477
 // Aliases for LCD features
478 478
 #if EITHER(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
479 479
   #define HAS_DWIN_E3V2_BASIC 1
480
-#endif
481
-#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
482 480
   #define HAS_DWIN_E3V2 1
483 481
 #endif
484 482
 #if ENABLED(DWIN_LCD_PROUI)
@@ -508,7 +506,7 @@
508 506
   #endif
509 507
 #endif
510 508
 
511
-#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
509
+#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_LCD_PROUI)
512 510
   #define HAS_DISPLAY 1
513 511
 #endif
514 512
 
@@ -528,7 +526,7 @@
528 526
   #define HAS_MANUAL_MOVE_MENU 1
529 527
 #endif
530 528
 
531
-#if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI, DWIN_CREALITY_LCD_JYERSUI)
529
+#if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI)
532 530
   #define CAN_SHOW_REMAINING_TIME 1
533 531
 #endif
534 532
 
@@ -1256,8 +1254,6 @@
1256 1254
 #endif
1257 1255
 #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_3POINT)
1258 1256
   #define HAS_ABL_NOT_UBL 1
1259
-#else
1260
-  #undef PROBE_MANUALLY
1261 1257
 #endif
1262 1258
 #if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL, MESH_BED_LEVELING)
1263 1259
   #define HAS_MESH 1
@@ -1276,11 +1272,14 @@
1276 1272
   #if DISABLED(AUTO_BED_LEVELING_UBL)
1277 1273
     #define PLANNER_LEVELING 1
1278 1274
   #endif
1279
-#else
1275
+#endif
1276
+#if !HAS_LEVELING
1280 1277
   #undef RESTORE_LEVELING_AFTER_G28
1281 1278
   #undef ENABLE_LEVELING_AFTER_G28
1282 1279
   #undef G29_RETRY_AND_RECOVER
1283
-  #undef PREHEAT_BEFORE_LEVELING
1280
+#endif
1281
+#if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
1282
+  #undef PROBE_MANUALLY
1284 1283
 #endif
1285 1284
 #if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING)
1286 1285
   #define PROBE_SELECTED 1

+ 2
- 2
Marlin/src/inc/Conditionals_post.h View File

@@ -3428,7 +3428,7 @@
3428 3428
  * Advanced Pause - Filament Change
3429 3429
  */
3430 3430
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
3431
-  #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
3431
+  #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
3432 3432
     #define M600_PURGE_MORE_RESUMABLE 1
3433 3433
   #endif
3434 3434
   #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH
@@ -3541,7 +3541,7 @@
3541 3541
   #ifndef MESH_MAX_Y
3542 3542
     #define MESH_MAX_Y _MESH_MAX_Y
3543 3543
   #endif
3544
-#elif DISABLED(DWIN_CREALITY_LCD_JYERSUI)
3544
+#else
3545 3545
   #undef MESH_MIN_X
3546 3546
   #undef MESH_MIN_Y
3547 3547
   #undef MESH_MAX_X

+ 3
- 3
Marlin/src/inc/SanityCheck.h View File

@@ -873,7 +873,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
873 873
     #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0."
874 874
   #endif
875 875
 #elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
876
-  #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI."
876
+  #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI."
877 877
 #endif
878 878
 
879 879
 #if ENABLED(USE_M73_REMAINING_TIME) && DISABLED(LCD_SET_PROGRESS_MANUALLY)
@@ -2846,7 +2846,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2846 2846
   + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \
2847 2847
   + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \
2848 2848
   + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \
2849
-  + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
2849
+  + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \
2850 2850
   + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_GENERIC_12864_1_1) \
2851 2851
   + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \
2852 2852
   + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \
@@ -3671,7 +3671,7 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
3671 3671
   #error "A very large BLOCK_BUFFER_SIZE is not needed and takes longer to drain the buffer on pause / cancel."
3672 3672
 #endif
3673 3673
 
3674
-#if ENABLED(LED_CONTROL_MENU) && NONE(HAS_MARLINUI_MENU, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
3674
+#if ENABLED(LED_CONTROL_MENU) && NONE(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
3675 3675
   #error "LED_CONTROL_MENU requires an LCD controller that implements the menu."
3676 3676
 #endif
3677 3677
 

+ 3
- 7
Marlin/src/lcd/e3v2/common/dwin_api.cpp View File

@@ -234,7 +234,7 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
234 234
 //  *string: The string
235 235
 //  rlimit: To limit the drawn string length
236 236
 void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) {
237
-  #if NONE(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
237
+  #if DISABLED(DWIN_LCD_PROUI)
238 238
     DWIN_Draw_Rectangle(1, bColor, x, y, x + (fontWidth(size) * strlen_P(string)), y + fontHeight(size));
239 239
   #endif
240 240
   constexpr uint8_t widthAdjust = 0;
@@ -266,9 +266,7 @@ void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor,
266 266
 void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
267 267
                           uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint32_t value) {
268 268
   size_t i = 0;
269
-  #if DISABLED(DWIN_CREALITY_LCD_JYERSUI)
270
-    DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * iNum + 1, y + fontHeight(size));
271
-  #endif
269
+  DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * iNum + 1, y + fontHeight(size));
272 270
   DWIN_Byte(i, 0x14);
273 271
   // Bit 7: bshow
274 272
   // Bit 6: 1 = signed; 0 = unsigned number;
@@ -316,9 +314,7 @@ void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_
316 314
                           uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, int32_t value) {
317 315
   //uint8_t *fvalue = (uint8_t*)&value;
318 316
   size_t i = 0;
319
-  #if DISABLED(DWIN_CREALITY_LCD_JYERSUI)
320
-    DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * (iNum+fNum+1), y + fontHeight(size));
321
-  #endif
317
+  DWIN_Draw_Rectangle(1, bColor, x, y, x + fontWidth(size) * (iNum+fNum+1), y + fontHeight(size));
322 318
   DWIN_Byte(i, 0x14);
323 319
   DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size);
324 320
   DWIN_Word(i, color);

+ 0
- 7
Marlin/src/lcd/e3v2/jyersui/README.md View File

@@ -1,7 +0,0 @@
1
-# DWIN for Creality Ender 3 v2
2
-
3
-Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.1.x/config/examples/Creality/Ender-3%20V2).
4
-
5
-## Easy Install
6
-
7
-Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen.

+ 0
- 208
Marlin/src/lcd/e3v2/jyersui/base64.hpp View File

@@ -1,208 +0,0 @@
1
-/**
2
- * Base64 encoder/decoder for arduino repo
3
- * Uses common web conventions - '+' for 62, '/' for 63, '=' for padding.
4
- * Note that invalid base64 characters are interpreted as padding.
5
- * Author: Densaugeo
6
- * Maintainer: Densaugeo
7
- * Version: 1.2.1.1
8
- * Changed unsigned int to uint16_t for use in the professional Ender 3V2/S1 firmware
9
- * Url: https://www.arduino.cc/reference/en/libraries/base64/
10
- */
11
-
12
-#ifndef BASE64_H_INCLUDED
13
-#define BASE64_H_INCLUDED
14
-
15
-/* binary_to_base64:
16
- *   Description:
17
- *     Converts a single byte from a binary value to the corresponding base64 character
18
- *   Parameters:
19
- *     v - Byte to convert
20
- *   Returns:
21
- *     ascii code of base64 character. If byte is >= 64, then there is not corresponding base64 character
22
- *     and 255 is returned
23
- */
24
-unsigned char binary_to_base64(unsigned char v);
25
-
26
-/* base64_to_binary:
27
- *   Description:
28
- *     Converts a single byte from a base64 character to the corresponding binary value
29
- *   Parameters:
30
- *     c - Base64 character (as ascii code)
31
- *   Returns:
32
- *     6-bit binary value
33
- */
34
-unsigned char base64_to_binary(unsigned char c);
35
-
36
-/* encode_base64_length:
37
- *   Description:
38
- *     Calculates length of base64 string needed for a given number of binary bytes
39
- *   Parameters:
40
- *     input_length - Amount of binary data in bytes
41
- *   Returns:
42
- *     Number of base64 characters needed to encode input_length bytes of binary data
43
- */
44
-uint16_t encode_base64_length(uint16_t input_length);
45
-
46
-/* decode_base64_length:
47
- *   Description:
48
- *     Calculates number of bytes of binary data in a base64 string
49
- *     Variant that does not use input_length no longer used within library, retained for API compatibility
50
- *   Parameters:
51
- *     input - Base64-encoded null-terminated string
52
- *     input_length (optional) - Number of bytes to read from input pointer
53
- *   Returns:
54
- *     Number of bytes of binary data in input
55
- */
56
-uint16_t decode_base64_length(unsigned char input[]);
57
-uint16_t decode_base64_length(unsigned char input[], uint16_t input_length);
58
-
59
-/* encode_base64:
60
- *   Description:
61
- *     Converts an array of bytes to a base64 null-terminated string
62
- *   Parameters:
63
- *     input - Pointer to input data
64
- *     input_length - Number of bytes to read from input pointer
65
- *     output - Pointer to output string. Null terminator will be added automatically
66
- *   Returns:
67
- *     Length of encoded string in bytes (not including null terminator)
68
- */
69
-uint16_t encode_base64(unsigned char input[], uint16_t input_length, unsigned char output[]);
70
-
71
-/* decode_base64:
72
- *   Description:
73
- *     Converts a base64 null-terminated string to an array of bytes
74
- *   Parameters:
75
- *     input - Pointer to input string
76
- *     input_length (optional) - Number of bytes to read from input pointer
77
- *     output - Pointer to output array
78
- *   Returns:
79
- *     Number of bytes in the decoded binary
80
- */
81
-uint16_t decode_base64(unsigned char input[], unsigned char output[]);
82
-uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned char output[]);
83
-
84
-unsigned char binary_to_base64(unsigned char v) {
85
-  // Capital letters - 'A' is ascii 65 and base64 0
86
-  if (v < 26) return v + 'A';
87
-
88
-  // Lowercase letters - 'a' is ascii 97 and base64 26
89
-  if (v < 52) return v + 71;
90
-
91
-  // Digits - '0' is ascii 48 and base64 52
92
-  if (v < 62) return v - 4;
93
-
94
-  // '+' is ascii 43 and base64 62
95
-  if (v == 62) return '+';
96
-
97
-  // '/' is ascii 47 and base64 63
98
-  if (v == 63) return '/';
99
-
100
-  return 64;
101
-}
102
-
103
-unsigned char base64_to_binary(unsigned char c) {
104
-  // Capital letters - 'A' is ascii 65 and base64 0
105
-  if ('A' <= c && c <= 'Z') return c - 'A';
106
-
107
-  // Lowercase letters - 'a' is ascii 97 and base64 26
108
-  if ('a' <= c && c <= 'z') return c - 71;
109
-
110
-  // Digits - '0' is ascii 48 and base64 52
111
-  if ('0' <= c && c <= '9') return c + 4;
112
-
113
-  // '+' is ascii 43 and base64 62
114
-  if (c == '+') return 62;
115
-
116
-  // '/' is ascii 47 and base64 63
117
-  if (c == '/') return 63;
118
-
119
-  return 255;
120
-}
121
-
122
-uint16_t encode_base64_length(uint16_t input_length) {
123
-  return (input_length + 2)/3*4;
124
-}
125
-
126
-uint16_t decode_base64_length(unsigned char input[]) {
127
-  return decode_base64_length(input, -1);
128
-}
129
-
130
-uint16_t decode_base64_length(unsigned char input[], uint16_t input_length) {
131
-  unsigned char *start = input;
132
-
133
-  while (base64_to_binary(input[0]) < 64 && (unsigned char)(input - start) < input_length) {
134
-    ++input;
135
-  }
136
-
137
-  input_length = input - start;
138
-  return input_length/4*3 + (input_length % 4 ? input_length % 4 - 1 : 0);
139
-}
140
-
141
-uint16_t encode_base64(unsigned char input[], uint16_t input_length, unsigned char output[]) {
142
-  uint16_t full_sets = input_length/3;
143
-
144
-  // While there are still full sets of 24 bits...
145
-  for (uint16_t i = 0; i < full_sets; ++i) {
146
-    output[0] = binary_to_base64(                         input[0] >> 2);
147
-    output[1] = binary_to_base64((input[0] & 0x03) << 4 | input[1] >> 4);
148
-    output[2] = binary_to_base64((input[1] & 0x0F) << 2 | input[2] >> 6);
149
-    output[3] = binary_to_base64( input[2] & 0x3F);
150
-
151
-    input += 3;
152
-    output += 4;
153
-  }
154
-
155
-  switch (input_length % 3) {
156
-    case 0:
157
-      output[0] = '\0';
158
-      break;
159
-    case 1:
160
-      output[0] = binary_to_base64(                         input[0] >> 2);
161
-      output[1] = binary_to_base64((input[0] & 0x03) << 4);
162
-      output[2] = '=';
163
-      output[3] = '=';
164
-      output[4] = '\0';
165
-      break;
166
-    case 2:
167
-      output[0] = binary_to_base64(                         input[0] >> 2);
168
-      output[1] = binary_to_base64((input[0] & 0x03) << 4 | input[1] >> 4);
169
-      output[2] = binary_to_base64((input[1] & 0x0F) << 2);
170
-      output[3] = '=';
171
-      output[4] = '\0';
172
-      break;
173
-  }
174
-
175
-  return encode_base64_length(input_length);
176
-}
177
-
178
-uint16_t decode_base64(unsigned char input[], unsigned char output[]) {
179
-  return decode_base64(input, -1, output);
180
-}
181
-
182
-uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned char output[]) {
183
-  uint16_t output_length = decode_base64_length(input, input_length);
184
-
185
-  // While there are still full sets of 24 bits...
186
-  for (uint16_t i = 2; i < output_length; i += 3) {
187
-    output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
188
-    output[1] = base64_to_binary(input[1]) << 4 | base64_to_binary(input[2]) >> 2;
189
-    output[2] = base64_to_binary(input[2]) << 6 | base64_to_binary(input[3]);
190
-
191
-    input += 4;
192
-    output += 3;
193
-  }
194
-
195
-  switch (output_length % 3) {
196
-    case 1:
197
-      output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
198
-      break;
199
-    case 2:
200
-      output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
201
-      output[1] = base64_to_binary(input[1]) << 4 | base64_to_binary(input[2]) >> 2;
202
-      break;
203
-  }
204
-
205
-  return output_length;
206
-}
207
-
208
-#endif // BASE64_H_INCLUDED

+ 0
- 6194
Marlin/src/lcd/e3v2/jyersui/dwin.cpp
File diff suppressed because it is too large
View File


+ 0
- 283
Marlin/src/lcd/e3v2/jyersui/dwin.h View File

@@ -1,283 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * lcd/e3v2/jyersui/dwin.h
26
- * JYERSUI Author: Jacob Myers
27
- *
28
- * JYERSUI Enhanced by LCH-77
29
- * Version: 1.9
30
- * Date: Jun 16, 2022
31
- */
32
-
33
-#include "dwin_defines.h"
34
-
35
-#include "../../../inc/MarlinConfig.h"
36
-
37
-enum processID : uint8_t {
38
-  Main, Print, Menu, Value, Option, File, Popup, Confirm, Wait, Locked, Cancel, Keyboard
39
-};
40
-
41
-enum PopupID : uint8_t {
42
-  Pause, Stop, Resume, SaveLevel, ETemp, ConfFilChange, PurgeMore, MeshSlot,
43
-  Level, Home, MoveWait, Heating,  FilLoad, FilChange, TempWarn, Runout, Resuming, ManualProbing,
44
-  FilInsert, HeaterTime, UserInput, LevelError, InvalidMesh, UI, Complete, Custom, ESDiagPopup, PrintConfirm,
45
-  PIDWait, PIDWaitH, PIDWaitB, BadextruderNumber, TempTooHigh, PIDTimeout, PIDDone
46
-};
47
-
48
-enum menuID : uint8_t {
49
-  MainMenu,
50
-    Prepare,
51
-      Move,
52
-      HomeMenu,
53
-      ManualLevel,
54
-      ZOffset,
55
-      Preheat,
56
-      ChangeFilament,
57
-      HostActions,
58
-      MenuCustom,
59
-    Control,
60
-      TempMenu,
61
-        PID,
62
-          HotendPID,
63
-          BedPID,
64
-        #if HAS_PREHEAT
65
-          #define _PREHEAT_ID(N) Preheat##N,
66
-          REPEAT_1(PREHEAT_COUNT, _PREHEAT_ID)
67
-        #endif
68
-      Motion,
69
-        HomeOffsets,
70
-        MaxSpeed,
71
-        MaxAcceleration,
72
-        #if HAS_CLASSIC_JERK
73
-          MaxJerk,
74
-        #endif
75
-        #if HAS_JUNCTION_DEVIATION
76
-          JDmenu,
77
-        #endif
78
-        Steps,
79
-      #if ENABLED(FWRETRACT)
80
-        FwRetraction,
81
-      #endif
82
-      Visual,
83
-        ColorSettings,
84
-      HostSettings,
85
-        ActionCommands,
86
-      Advanced,
87
-        #if HAS_BED_PROBE
88
-          ProbeMenu,
89
-        #endif
90
-      Info,
91
-    #if HAS_MESH
92
-      Leveling,
93
-        LevelManual,
94
-        LevelView,
95
-        MeshViewer,
96
-        LevelSettings,
97
-        #if ENABLED(PROBE_MANUALLY)
98
-          ManualMesh,
99
-        #endif
100
-        #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE
101
-          UBLMesh,
102
-        #endif
103
-    #endif
104
-    InfoMain,
105
-  Tune,
106
-  PreheatHotend,
107
-  #if ANY(CASE_LIGHT_MENU, LED_CONTROL_MENU)
108
-    Ledsmenu,
109
-    #if BOTH(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
110
-      CaseLightmenu,
111
-    #endif
112
-    #if ENABLED(LED_CONTROL_MENU)
113
-      LedControlmenu,
114
-      #if HAS_COLOR_LEDS
115
-        #if ENABLED(LED_COLOR_PRESETS)
116
-          LedControlpresets,
117
-        #else
118
-          LedControlcustom,
119
-        #endif
120
-      #endif
121
-    #endif
122
-  #endif
123
-};
124
-
125
-typedef struct {
126
-  // Flags
127
-  bool flag_tune = false;
128
-  bool auto_fw_retract = false;
129
-  bool printing = false;
130
-  bool paused = false;
131
-  bool sdprint = false;
132
-  bool livemove = false;
133
-  bool liveadjust = false;
134
-  bool probe_deployed = false;
135
-  // Auxiliary values
136
-  AxisEnum axis = X_AXIS;    // Axis Select
137
-  int16_t pausetemp = 0;
138
-  int16_t pausebed = 0;
139
-  int16_t pausefan = 0;
140
-  uint8_t preheatmode = 0;
141
-  uint8_t zoffsetmode = 0;
142
-  float zoffsetvalue = 0;
143
-  uint8_t gridpoint;
144
-  float corner_avg;
145
-  float corner_pos;
146
-  float zval;
147
-  #if ENABLED(PREHEAT_BEFORE_LEVELING)
148
-    uint8_t LevelingTempmode = 0;
149
-  #endif
150
-  #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
151
-    uint32_t LED_Color = Def_Leds_Color;
152
-  #endif
153
-  #if HAS_PID_HEATING
154
-    uint16_t PID_e_temp = 180;
155
-    uint16_t PID_bed_temp = 60;
156
-  #endif
157
-} temp_val_t;
158
-extern temp_val_t temp_val;
159
-
160
-#define Custom_Colors 10
161
-enum colorID : uint8_t {
162
-  Default, White, Green, Cyan, Blue, Magenta, Red, Orange, Yellow, Brown, Black
163
-};
164
-enum pidresult_t : uint8_t { PID_STARTED, PID_EXTR_START, PID_BED_START, PID_BAD_EXTRUDER_NUM, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE };
165
-
166
-class CrealityDWINClass {
167
-public:
168
-  static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" };
169
-  static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" };
170
-  static constexpr const char * const zoffset_modes[3] = { "No Live" , "OnClick", "   Live" };
171
-  #if ENABLED(PREHEAT_BEFORE_LEVELING)
172
-    static constexpr const char * const preheat_levmodes[4] = { "   Both", " Hotend", "    Bed", "   None" };
173
-  #endif
174
-
175
-  static void Clear_Screen(uint8_t e=3);
176
-  static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10);
177
-  static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false);
178
-  static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false);
179
-  static void Draw_Checkbox(uint8_t row, bool value);
180
-  static void Draw_Title(const char * title);
181
-  static void Draw_Title(FSTR_P const title);
182
-  static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false);
183
-  static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false);
184
-  static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0);
185
-  static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false);
186
-  static void Redraw_Screen();
187
-
188
-  static void Main_Menu_Icons();
189
-  static void Draw_Main_Menu(uint8_t select=0);
190
-  static void Print_Screen_Icons();
191
-  static void Draw_Print_Screen();
192
-  static void Draw_Print_Filename(const bool reset=false);
193
-  static void Draw_Print_ProgressBar();
194
-  #if ENABLED(USE_M73_REMAINING_TIME)
195
-    static void Draw_Print_ProgressRemain();
196
-  #endif
197
-  static void Draw_Print_ProgressElapsed();
198
-  static void Draw_PrintDone_confirm();
199
-  static void Draw_SD_Item(uint8_t item, uint8_t row);
200
-  static void Draw_SD_List(bool removed=false);
201
-  static void Draw_Status_Area(bool icons=false);
202
-  static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0);
203
-  static void Popup_Select();
204
-  static void Update_Status_Bar(bool refresh=false);
205
-
206
-  #if ENABLED(AUTO_BED_LEVELING_UBL)
207
-    static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7);
208
-    static void Set_Mesh_Viewer_Status();
209
-  #endif
210
-
211
-  static FSTR_P Get_Menu_Title(uint8_t menu);
212
-  static uint8_t Get_Menu_Size(uint8_t menu);
213
-  static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true);
214
-
215
-  static void Popup_Handler(PopupID popupid, bool option=false);
216
-  static void Confirm_Handler(PopupID popupid, bool option=false);
217
-
218
-  static void Main_Menu_Control();
219
-  static void Menu_Control();
220
-  static void Value_Control();
221
-  static void Option_Control();
222
-  static void File_Control();
223
-  static void Print_Screen_Control();
224
-  static void Popup_Control();
225
-  static void Confirm_Control();
226
-
227
-  static void Setup_Value(float value, float min, float max, float unit, uint8_t type);
228
-  static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr);
229
-  static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr);
230
-  static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr);
231
-  static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr);
232
-  static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr);
233
-  static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr);
234
-  static void Modify_Option(uint8_t value, const char * const * options, uint8_t max);
235
-
236
-  static void Update_Status(const char * const text);
237
-  static void Update_Status(FSTR_P text);
238
-  static void Start_Print(bool sd);
239
-  static void Stop_Print();
240
-  static void Update();
241
-  static void State_Update();
242
-  static void Screen_Update();
243
-  static void AudioFeedback(const bool success=true);
244
-  static void Save_Settings(char *buff);
245
-  static void Load_Settings(const char *buff);
246
-  static void Reset_Settings();
247
-  static void PreheatBefore();
248
-
249
-  #if HAS_ESDIAG
250
-    static void DWIN_EndstopsDiag();
251
-  #endif
252
-  #if HAS_LOCKSCREEN
253
-    static void DWIN_LockScreen();
254
-    static void DWIN_UnLockScreen();
255
-    static void HMI_LockScreen();
256
-  #endif
257
-  static void DWIN_RebootScreen();
258
-  static void RebootPrinter();
259
-  static void Update_Print_Filename(const char * const text);
260
-  #if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
261
-    static void ApplyLEDColor();
262
-  #endif
263
-
264
-  #if HAS_HOSTACTION_MENUS
265
-    static void Draw_String(char * string, uint8_t row, bool selected=false, bool below=false);
266
-    static const uint64_t Encode_String(const char * string);
267
-    static void Decode_String(uint64_t num, char * string);
268
-    static void Draw_Keyboard(bool restrict, bool numeric, uint8_t selected=0, bool uppercase=false, bool lock=false);
269
-    static void Draw_Keys(uint8_t index, bool selected, bool uppercase=false, bool lock=false);
270
-    static void Modify_String(char * string, uint8_t maxlength, bool restrict);
271
-    static void Keyboard_Control();
272
-  #endif
273
-
274
-  #if HAS_PIDPLOT
275
-    static void DWIN_Draw_PIDPopup(const pidresult_t pidresult);
276
-  #endif
277
-
278
-  #if HAS_PID_HEATING
279
-    static void DWIN_PidTuning(const pidresult_t pidresult);
280
-  #endif
281
-};
282
-
283
-extern CrealityDWINClass CrealityDWIN;

+ 0
- 131
Marlin/src/lcd/e3v2/jyersui/dwin_defines.h View File

@@ -1,131 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * DWIN general defines and data structs for PRO UI
26
- * Author: Miguel A. Risco-Castillo (MRISCOC)
27
- * Version: 3.11.2
28
- * Date: 2022/02/28
29
- *
30
- * Modded for JYERSUI by LCH-77
31
- * Version: 1.9
32
- * Date: Jun 16, 2022
33
- */
34
-
35
-#include "../../../inc/MarlinConfigPre.h"
36
-
37
-#define HAS_ESDIAG 1
38
-#define HAS_LOCKSCREEN 1
39
-#define HAS_PIDPLOT 1
40
-#define HAS_GCODE_PREVIEW 1
41
-//#define DEBUG_DWIN 1
42
-//#define NEED_HEX_PRINT 1
43
-
44
-#if ENABLED(HOST_ACTION_COMMANDS)
45
-  #define HAS_HOSTACTION_MENUS 1
46
-#endif
47
-
48
-#include "../../../core/types.h"
49
-#include "../common/dwin_color.h"
50
-
51
-// Default UI Colors
52
-#define Def_Background_Color  RGB(4,4,0)
53
-#define Def_Cursor_color      RGB(24,24,0)
54
-#define Def_TitleBg_color     RGB(12,12,0)
55
-#define Def_TitleTxt_color    Color_White
56
-#define Def_Text_Color        Color_White
57
-#define Def_Selected_Color    RGB(24,24,0)
58
-#define Def_SplitLine_Color   RGB(24,24,0)
59
-#define Def_Highlight_Color   RGB(31,40,0)
60
-#define Def_StatusBg_Color    RGB(12,12,0)
61
-#define Def_StatusTxt_Color   Color_White
62
-#define Def_PopupBg_color     Color_Bg_Window
63
-#define Def_PopupTxt_Color    Popup_Text_Color
64
-#define Def_AlertBg_Color     Color_Bg_Red
65
-#define Def_AlertTxt_Color    Color_Yellow
66
-#define Def_PercentTxt_Color  RGB(31,48,8)
67
-#define Def_Barfill_Color     RGB(12,12,0)
68
-#define Def_Indicator_Color   RGB(31,48,8)
69
-#define Def_Coordinate_Color  Color_White
70
-#define Def_Button_Color      RGB(12,12,0)
71
-
72
-#if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
73
-  #define Def_Leds_Color      0xFFFFFFFF
74
-#endif
75
-#if ENABLED(CASELIGHT_USES_BRIGHTNESS)
76
-  #define Def_CaseLight_Brightness 255
77
-#endif
78
-
79
-#if HAS_MESH
80
-  #ifndef MESH_INSET
81
-    #define MESH_INSET 25
82
-  #endif
83
-  #ifndef MESH_MIN_X
84
-    #define MESH_MIN_X MESH_INSET
85
-  #endif
86
-  #ifndef MESH_MIN_Y
87
-    #define MESH_MIN_Y MESH_INSET
88
-  #endif
89
-  #ifndef MESH_MAX_X
90
-    #define MESH_MAX_X  X_BED_SIZE - (MESH_INSET)
91
-  #endif
92
-  #ifndef MESH_MAX_Y
93
-    #define MESH_MAX_Y  X_BED_SIZE - (MESH_INSET)
94
-  #endif
95
-#endif
96
-
97
-typedef struct {
98
-  bool time_format_textual : 1;
99
-  #if ENABLED(AUTO_BED_LEVELING_UBL)
100
-    uint8_t tilt_grid_size : 3;
101
-  #endif
102
-  uint16_t corner_pos : 10;
103
-  uint8_t cursor_color : 4;
104
-  uint8_t menu_split_line : 4;
105
-  uint8_t menu_top_bg : 4;
106
-  uint8_t menu_top_txt : 4;
107
-  uint8_t highlight_box : 4;
108
-  uint8_t progress_percent : 4;
109
-  uint8_t progress_time : 4;
110
-  uint8_t status_bar_text : 4;
111
-  uint8_t status_area_text : 4;
112
-  uint8_t coordinates_text : 4;
113
-  uint8_t coordinates_split_line : 4;
114
-  #if ENABLED(BAUD_RATE_GCODE)
115
-    bool Baud115k : 1;
116
-  #endif
117
-  #if ENABLED(PREHEAT_BEFORE_LEVELING)
118
-    bool ena_hotend_levtemp : 1;
119
-    bool ena_bed_levtemp : 1;
120
-    celsius_t hotend_levtemp = LEVELING_NOZZLE_TEMP;
121
-    celsius_t bed_levtemp = LEVELING_BED_TEMP;
122
-  #endif
123
-  #if HAS_HOSTACTION_MENUS
124
-    uint64_t host_action_label_1 : 48;
125
-    uint64_t host_action_label_2 : 48;
126
-    uint64_t host_action_label_3 : 48;
127
-  #endif
128
-} eeprom_settings_t;
129
-
130
-static constexpr size_t eeprom_data_size = 48;
131
-extern eeprom_settings_t eeprom_settings;

+ 0
- 93
Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp View File

@@ -1,93 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/********************************************************************************
24
- * @file     lcd/e3v2/jyersui/dwin_lcd.cpp
25
- * @brief    DWIN screen control functions
26
- ********************************************************************************/
27
-
28
-#include "../../../inc/MarlinConfigPre.h"
29
-
30
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
31
-
32
-#include "dwin_lcd.h"
33
-
34
-/*-------------------------------------- System variable function --------------------------------------*/
35
-
36
-void DWIN_Startup() {}
37
-
38
-/*---------------------------------------- Drawing functions ----------------------------------------*/
39
-
40
-// Draw the degree (°) symbol
41
-// Color: color
42
-//  x/y: Upper-left coordinate of the first pixel
43
-void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y) {
44
-  DWIN_Draw_Point(Color, 1, 1, x + 1, y);
45
-  DWIN_Draw_Point(Color, 1, 1, x + 2, y);
46
-  DWIN_Draw_Point(Color, 1, 1, x, y + 1);
47
-  DWIN_Draw_Point(Color, 1, 1, x + 3, y + 1);
48
-  DWIN_Draw_Point(Color, 1, 1, x, y + 2);
49
-  DWIN_Draw_Point(Color, 1, 1, x + 3, y + 2);
50
-  DWIN_Draw_Point(Color, 1, 1, x + 1, y + 3);
51
-  DWIN_Draw_Point(Color, 1, 1, x + 2, y + 3);
52
-}
53
-
54
-/*---------------------------------------- Picture related functions ----------------------------------------*/
55
-
56
-// Draw an Icon with transparent background
57
-//  libID: Icon library ID
58
-//  picID: Icon ID
59
-//  x/y: Upper-left point
60
-void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) {
61
-  DWIN_ICON_Show(false, false, true, libID, picID, x, y);
62
-}
63
-
64
-// From DWIN Enhanced implementation for PRO UI v3.10.1
65
-// Write buffer data to the SRAM or Flash
66
-//  mem: 0x5A=32KB SRAM, 0xA5=16KB Flash
67
-//  addr: start address
68
-//  length: Bytes to write
69
-//  data: address of the buffer with data
70
-void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data) {
71
-  const uint8_t max_size = 128;
72
-  uint16_t pending = length;
73
-  uint16_t to_send;
74
-  uint16_t indx;
75
-  uint8_t block = 0;
76
-
77
-  while (pending > 0) {
78
-    indx = block * max_size;
79
-    to_send = _MIN(pending, max_size);
80
-    size_t i = 0;
81
-    DWIN_Byte(i, 0x31);
82
-    DWIN_Byte(i, mem);
83
-    DWIN_Word(i, addr + indx); // start address of the data block
84
-    ++i;
85
-    LOOP_L_N(j, i) { LCD_SERIAL.write(DWIN_SendBuf[j]); delayMicroseconds(1); }  // Buf header
86
-    for (uint16_t j = indx; j <= indx + to_send - 1; j++) LCD_SERIAL.write(*(data + j)); delayMicroseconds(1);  // write block of data
87
-    LOOP_L_N(j, 4) { LCD_SERIAL.write(DWIN_BufTail[j]); delayMicroseconds(1); }
88
-    block++;
89
-    pending -= to_send;
90
-  }
91
-}
92
-
93
-#endif // DWIN_CREALITY_LCD_JYERSUI

+ 0
- 42
Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h View File

@@ -1,42 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/********************************************************************************
25
- * @file     lcd/e3v2/jyersui/dwin_lcd.h
26
- * @brief    DWIN screen control functions
27
- ********************************************************************************/
28
-
29
-#include "../common/dwin_api.h"
30
-
31
-// Draw the degree (°) symbol
32
-// Color: color
33
-//  x/y: Upper-left coordinate of the first pixel
34
-void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y);
35
-
36
-// From DWIN Enhanced implementation for PRO UI v3.10.1
37
-// Write buffer data to the SRAM or Flash
38
-//  mem: 0x5A=32KB SRAM, 0xA5=16KB Flash
39
-//  addr: start address
40
-//  length: Bytes to write
41
-//  data: address of the buffer with data
42
-void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data);

+ 0
- 340
Marlin/src/lcd/e3v2/jyersui/dwinui.cpp View File

@@ -1,340 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * DWIN Enhanced implementation for PRO UI
25
- * Author: Miguel A. Risco-Castillo (MRISCOC)
26
- * Version: 3.17.1
27
- * Date: 2022/04/12
28
- *
29
- * Modded for JYERSUI by LCH-77
30
- * Version: 1.9
31
- * Date: Jun 16, 2022
32
- */
33
-
34
-#include "../../../inc/MarlinConfigPre.h"
35
-
36
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
37
-
38
-#include "../../../inc/MarlinConfig.h"
39
-#include "dwin_lcd.h"
40
-#include "dwinui.h"
41
-#include "dwin_defines.h"
42
-
43
-//#define DEBUG_OUT 1
44
-#include "../../../core/debug_out.h"
45
-
46
-xy_int_t DWINUI::cursor = { 0 };
47
-uint16_t DWINUI::pencolor = Color_White;
48
-uint16_t DWINUI::textcolor = Def_Text_Color;
49
-uint16_t DWINUI::backcolor = Def_Background_Color;
50
-uint16_t DWINUI::buttoncolor = Def_Button_Color;
51
-uint8_t  DWINUI::font = font8x16;
52
-FSTR_P const DWINUI::Author = F(STRING_CONFIG_H_AUTHOR);
53
-
54
-void DWINUI::init() {
55
-  delay(750);   // Delay for wait to wakeup screen
56
-  const bool hs = DWIN_Handshake(); UNUSED(hs);
57
-  #if ENABLED(DEBUG_DWIN)
58
-    SERIAL_ECHOPGM("DWIN_Handshake ");
59
-    SERIAL_ECHOLNF(hs ? F("ok.") : F("error."));
60
-  #endif
61
-  DWIN_Frame_SetDir(1);
62
-  cursor.reset();
63
-  pencolor = Color_White;
64
-  textcolor = Def_Text_Color;
65
-  backcolor = Def_Background_Color;
66
-  buttoncolor = Def_Button_Color;
67
-  font = font8x16;
68
-}
69
-
70
-// Set text/number font
71
-void DWINUI::setFont(uint8_t cfont) {
72
-  font = cfont;
73
-}
74
-
75
-// Get font character width
76
-uint8_t DWINUI::fontWidth(uint8_t cfont) {
77
-  switch (cfont) {
78
-    case font6x12 : return 6;
79
-    case font8x16 : return 8;
80
-    case font10x20: return 10;
81
-    case font12x24: return 12;
82
-    case font14x28: return 14;
83
-    case font16x32: return 16;
84
-    case font20x40: return 20;
85
-    case font24x48: return 24;
86
-    case font28x56: return 28;
87
-    case font32x64: return 32;
88
-    default: return 0;
89
-  }
90
-}
91
-
92
-// Get font character height
93
-uint8_t DWINUI::fontHeight(uint8_t cfont) {
94
-  switch (cfont) {
95
-    case font6x12 : return 12;
96
-    case font8x16 : return 16;
97
-    case font10x20: return 20;
98
-    case font12x24: return 24;
99
-    case font14x28: return 28;
100
-    case font16x32: return 32;
101
-    case font20x40: return 40;
102
-    case font24x48: return 48;
103
-    case font28x56: return 56;
104
-    case font32x64: return 64;
105
-    default: return 0;
106
-  }
107
-}
108
-
109
-// Get screen x coordinates from text column
110
-uint16_t DWINUI::ColToX(uint8_t col) {
111
-  return col * fontWidth(font);
112
-}
113
-
114
-// Get screen y coordinates from text row
115
-uint16_t DWINUI::RowToY(uint8_t row) {
116
-  return row * fontHeight(font);
117
-}
118
-
119
-// Set text/number color
120
-void DWINUI::SetColors(uint16_t fgcolor, uint16_t bgcolor, uint16_t alcolor) {
121
-  textcolor = fgcolor;
122
-  backcolor = bgcolor;
123
-  buttoncolor = alcolor;
124
-}
125
-void DWINUI::SetTextColor(uint16_t fgcolor) {
126
-  textcolor = fgcolor;
127
-}
128
-void DWINUI::SetBackgroundColor(uint16_t bgcolor) {
129
-  backcolor = bgcolor;
130
-}
131
-
132
-// Moves cursor to point
133
-//  x: abscissa of the display
134
-//  y: ordinate of the display
135
-//  point: xy coordinate
136
-void DWINUI::MoveTo(int16_t x, int16_t y) {
137
-  cursor.x = x;
138
-  cursor.y = y;
139
-}
140
-void DWINUI::MoveTo(xy_int_t point) {
141
-  cursor = point;
142
-}
143
-
144
-// Moves cursor relative to the actual position
145
-//  x: abscissa of the display
146
-//  y: ordinate of the display
147
-//  point: xy coordinate
148
-void DWINUI::MoveBy(int16_t x, int16_t y) {
149
-  cursor.x += x;
150
-  cursor.y += y;
151
-}
152
-void DWINUI::MoveBy(xy_int_t point) {
153
-  cursor += point;
154
-}
155
-
156
-// Draw a Centered string using arbitrary x1 and x2 margins
157
-void DWINUI::Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x1, uint16_t x2, uint16_t y, const char * const string) {
158
-  const uint16_t x = _MAX(0U, x2 + x1 - strlen_P(string) * fontWidth(size)) / 2 - 1;
159
-  DWIN_Draw_String(bShow, size, color, bColor, x, y, string);
160
-}
161
-
162
-// Draw a char
163
-//  color: Character color
164
-//  x: abscissa of the display
165
-//  y: ordinate of the display
166
-//  c: ASCII code of char
167
-void DWINUI::Draw_Char(uint16_t color, uint16_t x, uint16_t y, const char c) {
168
-  const char string[2] = { c, 0};
169
-  DWIN_Draw_String(false, font, color, backcolor, x, y, string, 1);
170
-}
171
-
172
-// Draw a char at cursor position and increment cursor
173
-void DWINUI::Draw_Char(uint16_t color, const char c) {
174
-  Draw_Char(color, cursor.x, cursor.y, c);
175
-  MoveBy(fontWidth(font), 0);
176
-}
177
-
178
-// Draw a string at cursor position
179
-//  color: Character color
180
-//  *string: The string
181
-//  rlimit: For draw less chars than string length use rlimit
182
-void DWINUI::Draw_String(const char * const string, uint16_t rlimit) {
183
-  DWIN_Draw_String(false, font, textcolor, backcolor, cursor.x, cursor.y, string, rlimit);
184
-  MoveBy(strlen(string) * fontWidth(font), 0);
185
-}
186
-void DWINUI::Draw_String(uint16_t color, const char * const string, uint16_t rlimit) {
187
-  DWIN_Draw_String(false, font, color, backcolor, cursor.x, cursor.y, string, rlimit);
188
-  MoveBy(strlen(string) * fontWidth(font), 0);
189
-}
190
-
191
-// Draw a numeric integer value
192
-//  bShow: true=display background color; false=don't display background color
193
-//  signedMode: 1=signed; 0=unsigned
194
-//  size: Font size
195
-//  color: Character color
196
-//  bColor: Background color
197
-//  iNum: Number of digits
198
-//  x/y: Upper-left coordinate
199
-//  value: Integer value
200
-void DWINUI::Draw_Int(uint8_t bShow, bool signedMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, int32_t value) {
201
-  char nstr[10];
202
-  sprintf_P(nstr, PSTR("%*li"), (signedMode ? iNum + 1 : iNum), value);
203
-  DWIN_Draw_String(bShow, size, color, bColor, x, y, nstr);
204
-}
205
-
206
-// Draw a numeric float value
207
-//  bShow: true=display background color; false=don't display background color
208
-//  signedMode: 1=signed; 0=unsigned
209
-//  size: Font size
210
-//  color: Character color
211
-//  bColor: Background color
212
-//  iNum: Number of digits
213
-//  fNum: Number of decimal digits
214
-//  x/y: Upper-left coordinate
215
-//  value: float value
216
-void DWINUI::Draw_Float(uint8_t bShow, bool signedMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
217
-  char nstr[10];
218
-  DWIN_Draw_String(bShow, size, color, bColor, x, y, dtostrf(value, iNum + (signedMode ? 2:1) + fNum, fNum, nstr));
219
-}
220
-
221
-// ------------------------- Buttons ------------------------------//
222
-
223
-void DWINUI::Draw_Button(uint16_t color, uint16_t bcolor, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, const char * const caption) {
224
-  DWIN_Draw_Rectangle(1, bcolor, x1, y1, x2, y2);
225
-  Draw_CenteredString(0, font, color, bcolor, x1, x2, (y2 + y1 - fontHeight())/2, caption);
226
-}
227
-
228
-void DWINUI::Draw_Button(uint8_t id, uint16_t x, uint16_t y) {
229
-  switch (id) {
230
-    case BTN_Cancel  : Draw_Button(GET_TEXT_F(MSG_BUTTON_CANCEL), x, y); break;
231
-    case BTN_Confirm : Draw_Button(GET_TEXT_F(MSG_BUTTON_CONFIRM), x, y); break;
232
-    case BTN_Continue: Draw_Button(GET_TEXT_F(MSG_BUTTON_CONTINUE), x, y); break;
233
-    case BTN_Print   : Draw_Button(GET_TEXT_F(MSG_BUTTON_PRINT), x, y); break;
234
-    case BTN_Save    : Draw_Button(GET_TEXT_F(MSG_BUTTON_SAVE), x, y); break;
235
-    case BTN_Purge   : Draw_Button(GET_TEXT_F(MSG_BUTTON_PURGE), x, y); break;
236
-    default: break;
237
-  }
238
-}
239
-
240
-// -------------------------- Extra -------------------------------//
241
-
242
-// Draw a circle
243
-//  color: circle color
244
-//  x: the abscissa of the center of the circle
245
-//  y: ordinate of the center of the circle
246
-//  r: circle radius
247
-void DWINUI::Draw_Circle(uint16_t color, uint16_t x, uint16_t y, uint8_t r) {
248
-  int a = 0, b = 0;
249
-  while (a <= b) {
250
-    b = SQRT(sq(r) - sq(a));
251
-    if (a == 0) b--;
252
-    DWIN_Draw_Point(color, 1, 1, x + a, y + b);   // Draw some sector 1
253
-    DWIN_Draw_Point(color, 1, 1, x + b, y + a);   // Draw some sector 2
254
-    DWIN_Draw_Point(color, 1, 1, x + b, y - a);   // Draw some sector 3
255
-    DWIN_Draw_Point(color, 1, 1, x + a, y - b);   // Draw some sector 4
256
-    DWIN_Draw_Point(color, 1, 1, x - a, y - b);   // Draw some sector 5
257
-    DWIN_Draw_Point(color, 1, 1, x - b, y - a);   // Draw some sector 6
258
-    DWIN_Draw_Point(color, 1, 1, x - b, y + a);   // Draw some sector 7
259
-    DWIN_Draw_Point(color, 1, 1, x - a, y + b);   // Draw some sector 8
260
-    a++;
261
-  }
262
-}
263
-
264
-// Draw a circle filled with color
265
-//  bcolor: fill color
266
-//  x: the abscissa of the center of the circle
267
-//  y: ordinate of the center of the circle
268
-//  r: circle radius
269
-void DWINUI::Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) {
270
-  int a = 0, b = 0;
271
-  while (a <= b) {
272
-    b = SQRT(sq(r) - sq(a)); // b=sqrt(r*r-a*a);
273
-    if (a == 0) b--;
274
-    DWIN_Draw_Line(bcolor, x-b,y-a,x+b,y-a);
275
-    DWIN_Draw_Line(bcolor, x-a,y-b,x+a,y-b);
276
-    DWIN_Draw_Line(bcolor, x-b,y+a,x+b,y+a);
277
-    DWIN_Draw_Line(bcolor, x-a,y+b,x+a,y+b);
278
-    a++;
279
-  }
280
-}
281
-
282
-// Color Interpolator
283
-//  val : Interpolator minv..maxv
284
-//  minv : Minimum value
285
-//  maxv : Maximum value
286
-//  color1 : Start color
287
-//  color2 : End color
288
-uint16_t DWINUI::ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2) {
289
-  uint8_t B, G, R;
290
-  const float n = (float)(val - minv) / (maxv - minv);
291
-  R = (1 - n) * GetRColor(color1) + n * GetRColor(color2);
292
-  G = (1 - n) * GetGColor(color1) + n * GetGColor(color2);
293
-  B = (1 - n) * GetBColor(color1) + n * GetBColor(color2);
294
-  return RGB(R, G, B);
295
-}
296
-
297
-// Color Interpolator through Red->Yellow->Green->Blue (Pro UI)
298
-//  val : Interpolator minv..maxv
299
-//  minv : Minimum value
300
-//  maxv : Maximum value
301
-uint16_t DWINUI::RainbowInt(int16_t val, int16_t minv, int16_t maxv) {
302
-  uint8_t B, G, R;
303
-  const uint8_t maxB = 28, maxR = 28, maxG = 38;
304
-  const int16_t limv = _MAX(abs(minv), abs(maxv));
305
-  float n = minv >= 0 ? (float)(val - minv) / (maxv - minv) : (float)val / limv;
306
-  LIMIT(n, -1, 1);
307
-  if (n < 0) {
308
-    R = 0;
309
-    G = (1 + n) * maxG;
310
-    B = (-n) * maxB;
311
-  }
312
-  else if (n < 0.5) {
313
-    R = maxR * n * 2;
314
-    G = maxG;
315
-    B = 0;
316
-  }
317
-  else {
318
-    R = maxR;
319
-    G = maxG * (1 - n);
320
-    B = 0;
321
-  }
322
-  return RGB(R, G, B);
323
-}
324
-
325
-// Draw a checkbox
326
-//  Color: frame color
327
-//  bColor: Background color
328
-//  x/y: Upper-left point
329
-//  mode : 0 : unchecked, 1 : checked
330
-void DWINUI::Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked=false) {
331
-  DWIN_Draw_String(true, font8x16, color, bcolor, x + 4, y, checked ? F("x") : F(" "));
332
-  DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17);
333
-}
334
-
335
-// Clear Menu by filling the menu area with background color
336
-void DWINUI::ClearMainArea() {
337
-  DWIN_Draw_Rectangle(1, backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1);
338
-}
339
-
340
-#endif // DWIN_CREALITY_LCD_JYERSUI

+ 0
- 527
Marlin/src/lcd/e3v2/jyersui/dwinui.h View File

@@ -1,527 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * DWIN Enhanced implementation for PRO UI
26
- * Author: Miguel A. Risco-Castillo (MRISCOC)
27
- * Version: 3.17.1
28
- * Date: 2022/04/12
29
- *
30
- * Modded for JYERSUI by LCH-77
31
- * Version: 1.9
32
- * Date: Jun 16, 2022
33
- */
34
-
35
-#include "dwin_lcd.h"
36
-#include "../common/dwin_set.h"
37
-#include "../common/dwin_font.h"
38
-#include "../common/dwin_color.h"
39
-#include "../common/dwin_api.h"
40
-
41
-// Custom icons
42
-//#define DWIN_CREALITY_LCD_CUSTOM_ICONS
43
-#if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS)
44
-  // index of every custom icon should be >= CUSTOM_ICON_START
45
-  #define CUSTOM_ICON_START         ICON_Checkbox_F
46
-  #define ICON_Checkbox_F           200
47
-  #define ICON_Checkbox_T           201
48
-  #define ICON_Fade                 202
49
-  #define ICON_Mesh                 203
50
-  #define ICON_Tilt                 204
51
-  #define ICON_Brightness           205
52
-  #define ICON_AxisD                249
53
-  #define ICON_AxisBR               250
54
-  #define ICON_AxisTR               251
55
-  #define ICON_AxisBL               252
56
-  #define ICON_AxisTL               253
57
-  #define ICON_AxisC                254
58
-#else
59
-  #define ICON_Fade                 ICON_Version
60
-  #define ICON_Mesh                 ICON_Version
61
-  #define ICON_Tilt                 ICON_Version
62
-  #define ICON_Brightness           ICON_Version
63
-  #define ICON_AxisD                ICON_Axis
64
-  #define ICON_AxisBR               ICON_Axis
65
-  #define ICON_AxisTR               ICON_Axis
66
-  #define ICON_AxisBL               ICON_Axis
67
-  #define ICON_AxisTL               ICON_Axis
68
-  #define ICON_AxisC                ICON_Axis
69
-  #define ICON_ESDiag               ICON_Info
70
-  #define ICON_Lock                 ICON_Cool
71
-  #define ICON_Reboot               ICON_ResumeEEPROM
72
-  #define ICON_ProbeAlarm           ICON_SetEndTemp
73
-  #define ICON_ProbeMargin          ICON_PrintSize
74
-  #define ICON_ProbeSelfTest        ICON_SetEndTemp
75
-  #define ICON_ProbeSet             ICON_SetEndTemp
76
-  #define ICON_ProbeDeploy          ICON_SetEndTemp
77
-  #define ICON_ProbeTest            ICON_SetEndTemp
78
-  #define ICON_ProbeTestCount       ICON_SetEndTemp
79
-  #define ICON_ProbeZSpeed          ICON_MaxSpeedZ
80
-  #define ICON_FWRetLength          ICON_StepE
81
-  #define ICON_FWRetSpeed           ICON_Setspeed
82
-  #define ICON_FWRetZRaise          ICON_MoveZ
83
-  #define ICON_FWRecExtLength       ICON_StepE
84
-  #define ICON_FWRecSpeed           ICON_Setspeed
85
-  #define ICON_HSMode               ICON_StockConfiguration
86
-  #define ICON_Sound                ICON_Cool
87
-  #define ICON_CaseLight            ICON_Motion
88
-  #define ICON_LedControl           ICON_Motion
89
-  #define ICON_MeshActive           ICON_HotendTemp
90
-  #define ICON_Park                 ICON_Motion
91
-#endif
92
-
93
-// Buttons
94
-#define BTN_Continue          85
95
-#define BTN_Cancel            87
96
-#define BTN_Confirm           89
97
-#define BTN_Print             90
98
-#define BTN_Save              91
99
-#define BTN_Purge             92
100
-
101
-// Extended UI Colors
102
-#define Color_Aqua          RGB(0,63,31)
103
-#define Color_Light_White   0xBDD7
104
-#define Color_Green         RGB(0,63,0)
105
-#define Color_Light_Green   0x3460
106
-#define Color_Cyan          0x07FF
107
-#define Color_Light_Cyan    0x04F3
108
-#define Color_Blue          RGB(0,0,31)
109
-#define Color_Light_Blue    0x3A6A
110
-#define Color_Magenta       0xF81F
111
-#define Color_Light_Magenta 0x9813
112
-#define Color_Light_Red     0x8800
113
-#define Color_Orange        0xFA20
114
-#define Color_Light_Orange  0xFBC0
115
-#define Color_Light_Yellow  0x8BE0
116
-#define Color_Brown         0xCC27
117
-#define Color_Light_Brown   0x6204
118
-#define Color_Black         0x0000
119
-#define Color_Grey          0x18E3
120
-#define Check_Color         0x4E5C
121
-#define Confirm_Color       0x34B9
122
-#define Cancel_Color        0x3186
123
-
124
-// UI element defines and constants
125
-#define DWIN_FONT_MENU font8x16
126
-#define DWIN_FONT_STAT font10x20
127
-#define DWIN_FONT_HEAD font10x20
128
-#define DWIN_FONT_ALERT font10x20
129
-#define STATUS_Y 354
130
-#define LCD_WIDTH (DWIN_WIDTH / 8)  // only if the default font is font8x16
131
-
132
-// Minimum unit (0.1) : multiple (10)
133
-#define UNITFDIGITS 1
134
-#define MINUNITMULT POW(10, UNITFDIGITS)
135
-
136
-constexpr uint8_t  TITLE_HEIGHT = 30,                          // Title bar height
137
-                   MLINE = 53,                                 // Menu line height
138
-                   TROWS = (STATUS_Y - TITLE_HEIGHT) / MLINE,  // Total rows
139
-                   MROWS = TROWS - 1,                          // Other-than-Back
140
-                   ICOX = 26,                                  // Menu item icon X position
141
-                   LBLX = 60,                                  // Menu item label X position
142
-                   VALX = 210,                                 // Menu item value X position
143
-                   MENU_CHR_W = 8, MENU_CHR_H = 16,            // Menu font 8x16
144
-                   STAT_CHR_W = 10;
145
-
146
-// Menuitem Y position
147
-#define MYPOS(L) (TITLE_HEIGHT + MLINE * (L))
148
-
149
-// Menuitem caption Offset
150
-#define CAPOFF ((MLINE - MENU_CHR_H) / 2)
151
-
152
-// Menuitem caption Y position
153
-#define MBASE(L) (MYPOS(L) + CAPOFF)
154
-
155
-typedef struct { uint16_t left, top, right, bottom; } rect_t;
156
-typedef struct { uint16_t x, y, w, h; } frame_rect_t;
157
-
158
-namespace DWINUI {
159
-  extern xy_int_t cursor;
160
-  extern uint16_t pencolor;
161
-  extern uint16_t textcolor;
162
-  extern uint16_t backcolor;
163
-  extern uint16_t buttoncolor;
164
-  extern uint8_t  font;
165
-  extern FSTR_P const Author;
166
-
167
-  // DWIN LCD Initialization
168
-  void init();
169
-
170
-  // Set text/number font
171
-  void setFont(uint8_t cfont);
172
-
173
-  // Get font character width
174
-  uint8_t fontWidth(uint8_t cfont);
175
-  inline uint8_t fontWidth() { return fontWidth(font); };
176
-
177
-  // Get font character height
178
-  uint8_t fontHeight(uint8_t cfont);
179
-  inline uint8_t fontHeight() { return fontHeight(font); };
180
-
181
-  // Get screen x coordinates from text column
182
-  uint16_t ColToX(uint8_t col);
183
-
184
-  // Get screen y coordinates from text row
185
-  uint16_t RowToY(uint8_t row);
186
-
187
-  // Set text/number color
188
-  void SetColors(uint16_t fgcolor, uint16_t bgcolor, uint16_t alcolor);
189
-  void SetTextColor(uint16_t fgcolor);
190
-  void SetBackgroundColor(uint16_t bgcolor);
191
-
192
-  // Moves cursor to point
193
-  //  x: abscissa of the display
194
-  //  y: ordinate of the display
195
-  //  point: xy coordinate
196
-  void MoveTo(int16_t x, int16_t y);
197
-  void MoveTo(xy_int_t point);
198
-
199
-  // Moves cursor relative to the actual position
200
-  //  x: abscissa of the display
201
-  //  y: ordinate of the display
202
-  //  point: xy coordinate
203
-  void MoveBy(int16_t x, int16_t y);
204
-  void MoveBy(xy_int_t point);
205
-
206
-  // Draw a line from the cursor to xy position
207
-  //  color: Line segment color
208
-  //  x/y: End point
209
-  inline void LineTo(uint16_t color, uint16_t x, uint16_t y) {
210
-    DWIN_Draw_Line(color, cursor.x, cursor.y, x, y);
211
-  }
212
-  inline void LineTo(uint16_t x, uint16_t y) {
213
-    DWIN_Draw_Line(pencolor, cursor.x, cursor.y, x, y);
214
-  }
215
-
216
-  // Extend a frame box
217
-  //  v: value to extend
218
-  inline frame_rect_t ExtendFrame(frame_rect_t frame, uint8_t v) {
219
-    frame_rect_t t;
220
-    t.x = frame.x - v;
221
-    t.y = frame.y - v;
222
-    t.w = frame.w + 2 * v;
223
-    t.h = frame.h + 2 * v;
224
-    return t;
225
-  }
226
-
227
-  // Draw an Icon with transparent background from the library ICON
228
-  //  icon: Icon ID
229
-  //  x/y: Upper-left point
230
-  inline void Draw_Icon(uint8_t icon, uint16_t x, uint16_t y) {
231
-    DWIN_ICON_Show(ICON, icon, x, y);
232
-  }
233
-
234
-  // Draw an Icon from the library ICON with its background
235
-  //  icon: Icon ID
236
-  //  x/y: Upper-left point
237
-  inline void Draw_IconWB(uint8_t icon, uint16_t x, uint16_t y) {
238
-    DWIN_ICON_Show(true, false, false, ICON, icon, x, y);
239
-  }
240
-  inline void DRAW_IconWB(uint8_t libID, uint8_t icon, uint16_t x, uint16_t y) {
241
-    DWIN_ICON_Show(true, false, false, libID, icon, x, y);
242
-  }
243
-
244
-  // Draw a numeric integer value
245
-  //  bShow: true=display background color; false=don't display background color
246
-  //  signedMode: 1=signed; 0=unsigned
247
-  //  size: Font size
248
-  //  color: Character color
249
-  //  bColor: Background color
250
-  //  iNum: Number of digits
251
-  //  x/y: Upper-left coordinate
252
-  //  value: Integer value
253
-  void Draw_Int(uint8_t bShow, bool signedMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, int32_t value);
254
-
255
-  // Draw a positive integer
256
-  inline void Draw_Int(uint8_t bShow, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
257
-    Draw_Int(bShow, 0, size, color, bColor, iNum, x, y, value);
258
-  }
259
-  inline void Draw_Int(uint8_t iNum, long value) {
260
-    Draw_Int(false, 0, font, textcolor, backcolor, iNum, cursor.x, cursor.y, value);
261
-    MoveBy(iNum * fontWidth(font), 0);
262
-  }
263
-  inline void Draw_Int(uint8_t iNum, uint16_t x, uint16_t y, long value) {
264
-    Draw_Int(false, 0, font, textcolor, backcolor, iNum, x, y, value);
265
-  }
266
-  inline void Draw_Int(uint16_t color, uint8_t iNum, uint16_t x, uint16_t y, long value) {
267
-    Draw_Int(false, 0, font, color, backcolor, iNum, x, y, value);
268
-  }
269
-  inline void Draw_Int(uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
270
-    Draw_Int(true, 0, font, color, bColor, iNum, x, y, value);
271
-  }
272
-  inline void Draw_Int(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
273
-    Draw_Int(true, 0, size, color, bColor, iNum, x, y, value);
274
-  }
275
-
276
-  // Draw a signed integer
277
-  inline void Draw_Signed_Int(uint8_t bShow, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
278
-    Draw_Int(bShow, 1, size, color, bColor, iNum, x, y, value);
279
-  }
280
-  inline void Draw_Signed_Int(uint8_t iNum, long value) {
281
-    Draw_Int(false, 1, font, textcolor, backcolor, iNum, cursor.x, cursor.y, value);
282
-    MoveBy(iNum * fontWidth(font), 0);
283
-  }
284
-  inline void Draw_Signed_Int(uint8_t iNum, uint16_t x, uint16_t y, long value) {
285
-    Draw_Int(false, 1, font, textcolor, backcolor, iNum, x, y, value);
286
-  }
287
-  inline void Draw_Signed_Int(uint16_t color, uint8_t iNum, uint16_t x, uint16_t y, long value) {
288
-    Draw_Int(false, 1, font, color, backcolor, iNum, x, y, value);
289
-  }
290
-  inline void Draw_Signed_Int(uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
291
-    Draw_Int(true, 1, font, color, bColor, iNum, x, y, value);
292
-  }
293
-  inline void Draw_Signed_Int(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) {
294
-    Draw_Int(true, 1, size, color, bColor, iNum, x, y, value);
295
-  }
296
-
297
-  // Draw a numeric float value
298
-  //  bShow: true=display background color; false=don't display background color
299
-  //  signedMode: 1=signed; 0=unsigned
300
-  //  size: Font size
301
-  //  color: Character color
302
-  //  bColor: Background color
303
-  //  iNum: Number of digits
304
-  //  fNum: Number of decimal digits
305
-  //  x/y: Upper-left coordinate
306
-  //  value: float value
307
-  void Draw_Float(uint8_t bShow, bool signedMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value);
308
-
309
-  // Draw a positive floating point number
310
-  inline void Draw_Float(uint8_t bShow, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
311
-    Draw_Float(bShow, 0, size, color, bColor, iNum, fNum, x, y, value);
312
-  }
313
-  inline void Draw_Float(uint8_t iNum, uint8_t fNum, float value) {
314
-    Draw_Float(false, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value);
315
-    MoveBy((iNum + fNum + 1) * fontWidth(font), 0);
316
-  }
317
-  inline void Draw_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
318
-    Draw_Float(false, 0, font, textcolor, backcolor, iNum, fNum, x, y, value);
319
-  }
320
-  inline void Draw_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
321
-    Draw_Float(false, 0, size, textcolor, backcolor, iNum, fNum, x, y, value);
322
-  }
323
-  inline void Draw_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
324
-    Draw_Float(true, 0, font, color, bColor, iNum, fNum, x, y, value);
325
-  }
326
-  inline void Draw_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
327
-    Draw_Float(true, 0, size, color, bColor, iNum, fNum, x, y, value);
328
-  }
329
-
330
-  // Draw a signed floating point number
331
-  inline void Draw_Signed_Float(uint8_t bShow, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
332
-    Draw_Float(bShow, 1, size, color, bColor, iNum, fNum, x, y, value);
333
-  }
334
-  inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, float value) {
335
-    Draw_Float(false, 1, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value);
336
-    MoveBy((iNum + fNum + 1) * fontWidth(font), 0);
337
-  }
338
-  inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
339
-    Draw_Float(false, 1, font, textcolor, backcolor, iNum, fNum, x, y, value);
340
-  }
341
-  inline void Draw_Signed_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
342
-    Draw_Float(false, 1, size, textcolor, backcolor, iNum, fNum, x, y, value);
343
-  }
344
-  inline void Draw_Signed_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
345
-    Draw_Float(true, 1, font, color, bColor, iNum, fNum, x, y, value);
346
-  }
347
-  inline void Draw_Signed_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) {
348
-    Draw_Float(true, 1, size, color, bColor, iNum, fNum, x, y, value);
349
-  }
350
-
351
-  // Draw a char
352
-  //  color: Character color
353
-  //  x: abscissa of the display
354
-  //  y: ordinate of the display
355
-  //  c: ASCII code of char
356
-  void Draw_Char(uint16_t color, uint16_t x, uint16_t y, const char c);
357
-  inline void Draw_Char(uint16_t x, uint16_t y, const char c) { Draw_Char(textcolor, x, y, c); };
358
-  // Draw a char at cursor position and increment cursor
359
-  void Draw_Char(uint16_t color, const char c);
360
-  inline void Draw_Char(const char c) { Draw_Char(textcolor, c); }
361
-
362
-  // Draw a string at cursor position
363
-  //  color: Character color
364
-  //  *string: The string
365
-  //  rlimit: For draw less chars than string length use rlimit
366
-  void Draw_String(const char * const string, uint16_t rlimit = 0xFFFF);
367
-  void Draw_String(uint16_t color, const char * const string, uint16_t rlimit = 0xFFFF);
368
-  inline void Draw_String(FSTR_P  string, uint16_t rlimit = 0xFFFF) {
369
-    Draw_String(FTOP(string), rlimit);
370
-  }
371
-  inline void Draw_String(uint16_t color, FSTR_P string, uint16_t rlimit = 0xFFFF) {
372
-    Draw_String(color, FTOP(string), rlimit);
373
-  }
374
-
375
-  // Draw a string
376
-  //  size: Font size
377
-  //  color: Character color
378
-  //  bColor: Background color
379
-  //  x/y: Upper-left coordinate of the string
380
-  //  *string: The string
381
-  inline void Draw_String(uint16_t x, uint16_t y, const char * const string) {
382
-    DWIN_Draw_String(false, font, textcolor, backcolor, x, y, string);
383
-  }
384
-  inline void Draw_String(uint16_t x, uint16_t y, FSTR_P title) {
385
-    DWIN_Draw_String(false, font, textcolor, backcolor, x, y, FTOP(title));
386
-  }
387
-  inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const char * const string) {
388
-    DWIN_Draw_String(false, font, color, backcolor, x, y, string);
389
-  }
390
-  inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, FSTR_P title) {
391
-    DWIN_Draw_String(false, font, color, backcolor, x, y, title);
392
-  }
393
-  inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) {
394
-    DWIN_Draw_String(true, font, color, bgcolor, x, y, string);
395
-  }
396
-  inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) {
397
-    DWIN_Draw_String(true, font, color, bgcolor, x, y, title);
398
-  }
399
-  inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) {
400
-    DWIN_Draw_String(true, size, color, bgcolor, x, y, string);
401
-  }
402
-  inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) {
403
-    DWIN_Draw_String(true, size, color, bgcolor, x, y, title);
404
-  }
405
-
406
-  // Draw a centered string using DWIN_WIDTH
407
-  //  bShow: true=display background color; false=don't display background color
408
-  //  size: Font size
409
-  //  color: Character color
410
-  //  bColor: Background color
411
-  //  y: Upper coordinate of the string
412
-  //  *string: The string
413
-  void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x1, uint16_t x2, uint16_t y, const char * const string);
414
-  inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string) {
415
-    Draw_CenteredString(bShow, size, color, bColor, 0, DWIN_WIDTH, y, string);
416
-  }
417
-  inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, FSTR_P string) {
418
-    Draw_CenteredString(bShow, size, color, bColor, y, FTOP(string));
419
-  }
420
-  inline void Draw_CenteredString(uint16_t color, uint16_t bcolor, uint16_t y, const char * const string) {
421
-    Draw_CenteredString(true, font, color, bcolor, y, string);
422
-  }
423
-  inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const char * const string) {
424
-    Draw_CenteredString(false, size, color, backcolor, y, string);
425
-  }
426
-  inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, FSTR_P title) {
427
-    Draw_CenteredString(false, size, color, backcolor, y, title);
428
-  }
429
-  inline void Draw_CenteredString(uint16_t color, uint16_t y, const char * const string) {
430
-    Draw_CenteredString(false, font, color, backcolor, y, string);
431
-  }
432
-  inline void Draw_CenteredString(uint16_t color, uint16_t y, FSTR_P title) {
433
-    Draw_CenteredString(false, font, color, backcolor, y, title);
434
-  }
435
-  inline void Draw_CenteredString(uint16_t y, const char * const string) {
436
-    Draw_CenteredString(false, font, textcolor, backcolor, y, string);
437
-  }
438
-  inline void Draw_CenteredString(uint16_t y, FSTR_P title) {
439
-    Draw_CenteredString(false, font, textcolor, backcolor, y, title);
440
-  }
441
-
442
-  // Draw a box
443
-  //  mode: 0=frame, 1=fill, 2=XOR fill
444
-  //  color: Rectangle color
445
-  //  frame: Box coordinates and size
446
-  inline void Draw_Box(uint8_t mode, uint16_t color, frame_rect_t frame) {
447
-    DWIN_Draw_Box(mode, color, frame.x, frame.y, frame.w, frame.h);
448
-  }
449
-
450
-  // Draw a circle
451
-  //  Color: circle color
452
-  //  x: abscissa of the center of the circle
453
-  //  y: ordinate of the center of the circle
454
-  //  r: circle radius
455
-  void Draw_Circle(uint16_t color, uint16_t x,uint16_t y,uint8_t r);
456
-  inline void Draw_Circle(uint16_t color, uint8_t r) {
457
-    Draw_Circle(color, cursor.x, cursor.y, r);
458
-  }
459
-
460
-  // Draw a checkbox
461
-  //  Color: frame color
462
-  //  bColor: Background color
463
-  //  x/y: Upper-left point
464
-  //  checked : 0 : unchecked, 1 : checked
465
-  void Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked);
466
-  inline void Draw_Checkbox(uint16_t x, uint16_t y, bool checked=false) {
467
-    Draw_Checkbox(textcolor, backcolor, x, y, checked);
468
-  }
469
-
470
-  // Color Interpolator
471
-  //  val : Interpolator minv..maxv
472
-  //  minv : Minimum value
473
-  //  maxv : Maximum value
474
-  //  color1 : Start color
475
-  //  color2 : End color
476
-  uint16_t ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2);
477
-
478
-  // ------------------------- Buttons ------------------------------//
479
-
480
-  void Draw_Button(uint16_t color, uint16_t bcolor, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, const char * const caption);
481
-  inline void Draw_Button(uint16_t color, uint16_t bcolor, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, FSTR_P caption) {
482
-    Draw_Button(color, bcolor, x1, y1, x2, y2, FTOP(caption));
483
-  }
484
-  inline void Draw_Button(FSTR_P caption, uint16_t x, uint16_t y) {
485
-    Draw_Button(textcolor, buttoncolor, x, y, x + 99, y + 37, caption);
486
-  }
487
-  void Draw_Button(uint8_t id, uint16_t x, uint16_t y);
488
-
489
-  // -------------------------- Extra -------------------------------//
490
-
491
-  // Draw a circle filled with color
492
-  //  bcolor: fill color
493
-  //  x: abscissa of the center of the circle
494
-  //  y: ordinate of the center of the circle
495
-  //  r: circle radius
496
-  void Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r);
497
-  inline void Draw_FillCircle(uint16_t bcolor, uint8_t r) {
498
-    Draw_FillCircle(bcolor, cursor.x, cursor.y, r);
499
-  }
500
-
501
-  // Color Interpolator through Red->Yellow->Green->Blue
502
-  //  val : Interpolator minv..maxv
503
-  //  minv : Minimum value
504
-  //  maxv : Maximum value
505
-  uint16_t RainbowInt(int16_t val, int16_t minv, int16_t maxv);
506
-
507
-  // Write buffer data to the SRAM
508
-  //  addr: SRAM start address 0x0000-0x7FFF
509
-  //  length: Bytes to write
510
-  //  data: address of the buffer with data
511
-  inline void WriteToSRAM(uint16_t addr, uint16_t length, uint8_t *data) {
512
-    DWIN_WriteToMem(0x5A, addr, length, data);
513
-  }
514
-
515
-  // Write buffer data to the Flash
516
-  //  addr: Flash start address 0x0000-0x3FFF
517
-  //  length: Bytes to write
518
-  //  data: address of the buffer with data
519
-  inline void WriteToFlash(uint16_t addr, uint16_t length, uint8_t *data) {
520
-    DWIN_WriteToMem(0xA5, addr, length, data);
521
-  }
522
-
523
-  // Clear by filling the area with background color
524
-  // Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1)
525
-  void ClearMainArea();
526
-
527
-};

+ 0
- 111
Marlin/src/lcd/e3v2/jyersui/endstop_diag.cpp View File

@@ -1,111 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * DWIN End Stops diagnostic page
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 1.0
27
- * Date: 2021/11/06
28
- *
29
- * Modded for JYERSUI by LCH-77
30
- */
31
-
32
-#include "../../../inc/MarlinConfigPre.h"
33
-
34
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
35
-
36
-#include "dwin_defines.h"
37
-
38
-#if HAS_ESDIAG
39
-
40
-#include "endstop_diag.h"
41
-#include "dwinui.h"
42
-#include "dwin.h"
43
-
44
-#if HAS_FILAMENT_SENSOR
45
-  #include "../../../feature/runout.h"
46
-#endif
47
-
48
-#if HAS_BED_PROBE
49
-  #include "../../../module/probe.h"
50
-#endif
51
-
52
-ESDiagClass ESDiag;
53
-
54
-void draw_es_label(FSTR_P const flabel=nullptr) {
55
-  DWINUI::cursor.x = 40;
56
-  if (flabel) DWINUI::Draw_String(F(flabel));
57
-  DWINUI::Draw_String(F(": "));
58
-  DWINUI::MoveBy(0, 25);
59
-}
60
-
61
-void draw_es_state(const bool is_hit) {
62
-  const uint8_t LM = 130;
63
-  DWINUI::cursor.x = LM;
64
-  DWIN_Draw_Rectangle(1, Color_Bg_Window, LM, DWINUI::cursor.y, LM + 100, DWINUI::cursor.y + 20);
65
-  is_hit ? DWINUI::Draw_String(RGB(31,31,16), F(STR_ENDSTOP_HIT)) : DWINUI::Draw_String(RGB(16,63,16), F(STR_ENDSTOP_OPEN));
66
-  DWINUI::MoveBy(0, 25);
67
-}
68
-
69
-void ESDiagClass::Draw() {
70
-  CrealityDWINClass::Clear_Screen(1);
71
-  CrealityDWINClass::Draw_Title(F("End-stops Diagnostic"));
72
-  DWINUI::ClearMainArea();
73
-  DWIN_Draw_Rectangle(0, Color_White, 14, 60, 258, 330);
74
-  DWINUI::Draw_Button(BTN_Continue, 86, 250);
75
-  DWINUI::cursor.y = 80;
76
-  #define ES_LABEL(S) draw_es_label(F(STR_##S))
77
-  #if HAS_X_MIN
78
-    ES_LABEL(X_MIN);
79
-  #endif
80
-  #if HAS_Y_MIN
81
-    ES_LABEL(Y_MIN);
82
-  #endif
83
-  #if HAS_Z_MIN
84
-    ES_LABEL(Z_MIN);
85
-  #endif
86
-  #if HAS_FILAMENT_SENSOR
87
-    draw_es_label(F(STR_FILAMENT));
88
-  #endif
89
-  Update();
90
-}
91
-
92
-void ESDiagClass::Update() {
93
-  DWINUI::cursor.y = 80;
94
-  #define ES_REPORT(S) draw_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING)
95
-  #if HAS_X_MIN
96
-    ES_REPORT(X_MIN);
97
-  #endif
98
-  #if HAS_Y_MIN
99
-    ES_REPORT(Y_MIN);
100
-  #endif
101
-  #if HAS_Z_MIN
102
-    ES_REPORT(Z_MIN);
103
-  #endif
104
-  #if HAS_FILAMENT_SENSOR
105
-    draw_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE);
106
-  #endif
107
-  DWIN_UpdateLCD();
108
-}
109
-
110
-#endif  // HAS_ES_DIAG
111
-#endif  // DWIN_CREALITY_LCD_JYERSUI

+ 0
- 39
Marlin/src/lcd/e3v2/jyersui/endstop_diag.h View File

@@ -1,39 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * DWIN End Stops diagnostic page
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 1.0
28
- * Date: 2021/11/06
29
- *
30
- * Modded for JYERSUI by LCH-77
31
- */
32
-
33
-class ESDiagClass {
34
-public:
35
-  void Draw();
36
-  void Update();
37
-};
38
-
39
-extern ESDiagClass ESDiag;

+ 0
- 244
Marlin/src/lcd/e3v2/jyersui/gcode_preview.cpp View File

@@ -1,244 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * DWIN G-code thumbnail preview
25
- * Author: Miguel A. Risco-Castillo
26
- * version: 2.1
27
- * Date: 2021/06/19
28
- *
29
- * Modded for JYERSUI by LCH-77
30
- */
31
-
32
-#include "../../../inc/MarlinConfigPre.h"
33
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
34
-
35
-#include "dwin_defines.h"
36
-
37
-#if HAS_GCODE_PREVIEW
38
-
39
-#include "../../../core/types.h"
40
-#include "../../marlinui.h"
41
-#include "../../../sd/cardreader.h"
42
-#include "../../../MarlinCore.h" // for wait_for_user
43
-#include "dwin_lcd.h"
44
-#include "dwinui.h"
45
-#include "dwin.h"
46
-#include "base64.hpp"
47
-#include "gcode_preview.h"
48
-
49
-typedef struct {
50
-  char name[13] = "";   //8.3 + null
51
-  uint32_t thumbstart = 0;
52
-  int thumbsize = 0;
53
-  int thumbheight = 0;
54
-  int thumbwidth = 0;
55
-  uint8_t *thumbdata = nullptr;
56
-  float time = 0;
57
-  float filament = 0;
58
-  float layer = 0;
59
-  float width = 0;
60
-  float height = 0;
61
-  float length = 0;
62
-  void setname(const char * const fn);
63
-  void clear();
64
-} fileprop_t;
65
-fileprop_t fileprop;
66
-
67
-void fileprop_t::setname(const char * const fn) {
68
-  const uint8_t len = _MIN(sizeof(name) - 1, strlen(fn));
69
-  memcpy(&name[0], fn, len);
70
-  name[len] = '\0';
71
-}
72
-
73
-void fileprop_t::clear() {
74
-  fileprop.name[0] = '\0';
75
-  fileprop.thumbstart = 0;
76
-  fileprop.thumbsize = 0;
77
-  fileprop.thumbheight = 0;
78
-  fileprop.thumbwidth = 0;
79
-  fileprop.thumbdata = nullptr;
80
-  fileprop.time = 0;
81
-  fileprop.filament = 0;
82
-  fileprop.layer = 0;
83
-  fileprop.height = 0;
84
-  fileprop.width = 0;
85
-  fileprop.length = 0;
86
-}
87
-
88
-void Get_Value(char *buf, const char * const key, float &value) {
89
-  char num[10] = "";
90
-  char * posptr = 0;
91
-  uint8_t i = 0;
92
-  if (!!value) return;
93
-  posptr = strstr(buf, key);
94
-  if (posptr != nullptr) {
95
-    while (i < sizeof(num)) {
96
-      char c = posptr[0];
97
-      if (!ISEOL(c) && (c != 0)) {
98
-        if ((c > 47 && c < 58) || (c == '.')) num[i++] = c;
99
-        posptr++;
100
-      }
101
-      else {
102
-        num[i] = '\0';
103
-        value = atof(num);
104
-        return;
105
-      }
106
-    }
107
-  }
108
-}
109
-
110
-bool Has_Preview() {
111
-  const char * tbstart = "; thumbnail begin 230x180";
112
-  char * posptr = 0;
113
-  uint8_t nbyte = 1;
114
-  uint32_t indx = 0;
115
-  char buf[256];
116
-  float tmp = 0;
117
-
118
-  fileprop.clear();
119
-  fileprop.setname(card.filename);
120
-
121
-  card.openFileRead(fileprop.name);
122
-
123
-  while ((nbyte > 0) && (indx < 4 * sizeof(buf)) && !fileprop.thumbstart) {
124
-    nbyte = card.read(buf, sizeof(buf) - 1);
125
-    if (nbyte > 0) {
126
-      buf[nbyte] = '\0';
127
-      Get_Value(buf, ";TIME:", fileprop.time);
128
-      Get_Value(buf, ";Filament used:", fileprop.filament);
129
-      Get_Value(buf, ";Layer height:", fileprop.layer);
130
-      Get_Value(buf, ";MINX:", tmp);
131
-      Get_Value(buf, ";MAXX:", fileprop.width);
132
-      fileprop.width -= tmp;
133
-      tmp = 0;
134
-      Get_Value(buf, ";MINY:", tmp);
135
-      Get_Value(buf, ";MAXY:", fileprop.length);
136
-      fileprop.length -= tmp;
137
-      tmp = 0;
138
-      Get_Value(buf, ";MINZ:", tmp);
139
-      Get_Value(buf, ";MAXZ:", fileprop.height);
140
-      fileprop.height -= tmp;
141
-      posptr = strstr(buf, tbstart);
142
-      if (posptr != NULL) {
143
-        fileprop.thumbstart = indx + (posptr - &buf[0]);
144
-      }
145
-      else {
146
-        indx += _MAX(10, nbyte - (signed)strlen(tbstart));
147
-        card.setIndex(indx);
148
-      }
149
-    }
150
-  }
151
-
152
-  if (!fileprop.thumbstart) {
153
-    card.closefile();
154
-    LCD_MESSAGE_F("Thumbnail not found");
155
-    return 0;
156
-  }
157
-
158
-  // Get the size of the thumbnail
159
-  card.setIndex(fileprop.thumbstart + strlen(tbstart));
160
-  for (uint8_t i = 0; i < 16; i++) {
161
-    char c = card.get();
162
-    if (!ISEOL(c)) {
163
-      buf[i] = c;
164
-    }
165
-    else {
166
-      buf[i] = '\0';
167
-      break;
168
-    }
169
-  }
170
-  fileprop.thumbsize = atoi(buf);
171
-
172
-  // Exit if there isn't a thumbnail
173
-  if (!fileprop.thumbsize) {
174
-    card.closefile();
175
-    LCD_MESSAGE_F("Invalid Thumbnail Size");
176
-    return 0;
177
-  }
178
-
179
-  uint16_t readed = 0;
180
-  uint8_t buf64[fileprop.thumbsize];
181
-
182
-  fileprop.thumbdata = new uint8_t[3 + 3 * (fileprop.thumbsize / 4)];  // Reserve space for the JPEG thumbnail
183
-
184
-  while (readed < fileprop.thumbsize) {
185
-    uint8_t c = card.get();
186
-    if (!ISEOL(c) && (c != ';') && (c != ' ')) {
187
-      buf64[readed] = c;
188
-      readed++;
189
-    }
190
-  }
191
-  card.closefile();
192
-  buf64[readed] = 0;
193
-
194
-  fileprop.thumbsize = decode_base64(buf64, fileprop.thumbdata);  card.closefile();
195
-  DWINUI::WriteToSRAM(0x00, fileprop.thumbsize, fileprop.thumbdata);
196
-  delete[] fileprop.thumbdata;
197
-  return true;
198
-}
199
-
200
-void Preview_DrawFromSD() {
201
-  bool _has_preview = Has_Preview();
202
-  CrealityDWIN.Popup_Handler(PrintConfirm, _has_preview);
203
-  if (_has_preview) {
204
-    char buf[46];
205
-    char str_1[6] = "", str_2[6] = "", str_3[6] = "";
206
-    // DWIN_Draw_Rectangle(1, Def_Background_Color, 0, 0, DWIN_WIDTH, STATUS_Y - 1);
207
-    if (fileprop.time) {
208
-      sprintf_P(buf, PSTR("Estimated time: %i:%02i"), (uint16_t)fileprop.time / 3600, ((uint16_t)fileprop.time % 3600) / 60);
209
-      DWINUI::Draw_String(20, 10, buf);
210
-    }
211
-    if (fileprop.filament) {
212
-      sprintf_P(buf, PSTR("Filament used: %s m"), dtostrf(fileprop.filament, 1, 2, str_1));
213
-      DWINUI::Draw_String(20, 30, buf);
214
-    }
215
-    if (fileprop.layer) {
216
-      sprintf_P(buf, PSTR("Layer height: %s mm"), dtostrf(fileprop.layer, 1, 2, str_1));
217
-      DWINUI::Draw_String(20, 50, buf);
218
-    }
219
-    if (fileprop.width) {
220
-      sprintf_P(buf, PSTR("Volume: %sx%sx%s mm"), dtostrf(fileprop.width, 1, 1, str_1), dtostrf(fileprop.length, 1, 1, str_2), dtostrf(fileprop.height, 1, 1, str_3));
221
-      DWINUI::Draw_String(20, 70, buf);
222
-    }
223
-    // DWINUI::Draw_Button(BTN_Print, 26, 290);
224
-    // DWINUI::Draw_Button(BTN_Cancel, 146, 290);
225
-    DWIN_ICON_Show(0, 0, 1, 21, 90, 0x00);
226
-    // Draw_Select_Highlight(true, 290);
227
-    DWIN_UpdateLCD();
228
-  }
229
-  // else {
230
-  //   HMI_flag.select_flag = 1;
231
-  //   wait_for_user = false;
232
-  // }
233
-}
234
-
235
-bool Preview_Valid() {
236
-  return !!fileprop.thumbstart;
237
-}
238
-
239
-void Preview_Reset() {
240
-  fileprop.thumbsize = 0;
241
-}
242
-
243
-#endif // HAS_GCODE_PREVIEW
244
-#endif // DWIN_LCD_PROUI

+ 0
- 34
Marlin/src/lcd/e3v2/jyersui/gcode_preview.h View File

@@ -1,34 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * DWIN G-code thumbnail preview
25
- * Author: Miguel A. Risco-Castillo
26
- * version: 2.1
27
- * Date: 2021/06/19
28
- */
29
-
30
-#pragma once
31
-
32
-void Preview_DrawFromSD();
33
-bool Preview_Valid();
34
-void Preview_Reset();

+ 0
- 83
Marlin/src/lcd/e3v2/jyersui/lockscreen.cpp View File

@@ -1,83 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Lock screen implementation for PRO UI
25
- * Author: Miguel A. Risco-Castillo (MRISCOC)
26
- * Version: 2.2.0
27
- * Date: 2022/04/11
28
- *
29
- * Modded for JYERSUI by LCH-77
30
- */
31
-
32
-#include "../../../inc/MarlinConfigPre.h"
33
-
34
-#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
35
-
36
-#include "dwin_defines.h"
37
-
38
-#if HAS_LOCKSCREEN
39
-
40
-#include "../common/dwin_color.h"
41
-#include "dwinui.h"
42
-#include "dwin.h"
43
-#include "lockscreen.h"
44
-
45
-LockScreenClass lockScreen;
46
-
47
-uint8_t LockScreenClass::lock_pos = 0;
48
-bool LockScreenClass::unlocked = false;
49
-uint8_t LockScreenClass::rprocess = 0;
50
-
51
-void LockScreenClass::init() {
52
-  lock_pos = 0;
53
-  unlocked = false;
54
-  draw();
55
-}
56
-
57
-void LockScreenClass::draw() {
58
-  CrealityDWINClass::Clear_Screen(1);
59
-  CrealityDWINClass::Draw_Title(GET_TEXT_F(MSG_LOCKSCREEN));
60
-  DWINUI::ClearMainArea();
61
-  DWINUI::Draw_Icon(ICON_LOGO, 71, 120);  // CREALITY logo
62
-  DWINUI::Draw_CenteredString(Color_White, 180, GET_TEXT_F(MSG_LOCKSCREEN_LOCKED));
63
-  DWINUI::Draw_CenteredString(Color_White, 200, GET_TEXT_F(MSG_LOCKSCREEN_UNLOCK));
64
-  DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-"));
65
-  DWIN_Draw_Box(1, BarFill_Color, 0, 260, DWIN_WIDTH, 20);
66
-  DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20);
67
-  DWIN_UpdateLCD();
68
-}
69
-
70
-void LockScreenClass::onEncoder(EncoderState encoder_diffState) {
71
-  switch (encoder_diffState) {
72
-    case ENCODER_DIFF_CW:    lock_pos += 8; break;
73
-    case ENCODER_DIFF_CCW:   lock_pos -= 8; break;
74
-    case ENCODER_DIFF_ENTER: unlocked = (lock_pos == 128); break;
75
-    default: break;
76
-  }
77
-  DWIN_Draw_Box(1, BarFill_Color, 0, 260, DWIN_WIDTH, 20);
78
-  DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20);
79
-  DWIN_UpdateLCD();
80
-}
81
-
82
-#endif // HAS_LOCKSCREEN
83
-#endif // DWIN_CREALITY_LCD_JYERSUI

+ 0
- 49
Marlin/src/lcd/e3v2/jyersui/lockscreen.h View File

@@ -1,49 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * Lock screen implementation for PRO UI
26
- * Author: Miguel A. Risco-Castillo (MRISCOC)
27
- * Version: 2.2.0
28
- * Date: 2022/04/11
29
- *
30
- * Modded for JYERSUI by LCH-77
31
- */
32
-
33
-#include "../../../core/types.h"
34
-#include "../common/encoder.h"
35
-#include <stdint.h>
36
-
37
-class LockScreenClass {
38
-private:
39
-  static bool unlocked;
40
-  static uint8_t lock_pos;
41
-public:
42
-  static uint8_t rprocess;
43
-  static void init();
44
-  static void onEncoder(EncoderState encoder_diffState);
45
-  static void draw();
46
-  static bool isUnlocked() { return unlocked; }
47
-};
48
-
49
-extern LockScreenClass lockScreen;

+ 0
- 86
Marlin/src/lcd/e3v2/jyersui/plot.cpp View File

@@ -1,86 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * DWIN Single var plot
25
- * Author: Miguel A. Risco-Castillo
26
- * Version: 2.0
27
- * Date: 2022/01/31
28
- *
29
- * Modded for JYERSUI by LCH-77
30
- */
31
-
32
-#include "../../../inc/MarlinConfigPre.h"
33
-
34
-#ifdef DWIN_CREALITY_LCD_JYERSUI
35
-
36
-#include "dwin_defines.h"
37
-
38
-#ifdef HAS_PIDPLOT
39
-
40
-#include "plot.h"
41
-
42
-#include "../../../core/types.h"
43
-#include "../../marlinui.h"
44
-#include "dwin_lcd.h"
45
-#include "dwinui.h"
46
-#include "dwin.h"
47
-
48
-#define Plot_Bg_Color RGB( 1, 12,  8)
49
-
50
-PlotClass Plot;
51
-
52
-uint16_t grphpoints, r, x2, y2 = 0;
53
-frame_rect_t grphframe = {0};
54
-float scale = 0;
55
-
56
-void PlotClass::Draw(const frame_rect_t frame, const float max, const float ref) {
57
-  grphframe = frame;
58
-  grphpoints = 0;
59
-  scale = frame.h / max;
60
-  x2 = frame.x + frame.w - 1;
61
-  y2 = frame.y + frame.h - 1;
62
-  r = round((y2) - ref * scale);
63
-  DWINUI::Draw_Box(1, Plot_Bg_Color, frame);
64
-  for (uint8_t i = 1; i < 4; i++)  if (i*50 < frame.w) DWIN_Draw_VLine(Line_Color, i*50 + frame.x, frame.y, frame.h);
65
-  DWINUI::Draw_Box(0, Color_White, DWINUI::ExtendFrame(frame, 1));
66
-  DWIN_Draw_HLine(Color_Red, frame.x, r, frame.w);
67
-}
68
-
69
-void PlotClass::Update(const float value) {
70
-  if (!scale) return;
71
-  uint16_t y = round((y2) - value * scale);
72
-  if (grphpoints < grphframe.w) {
73
-    DWIN_Draw_Point(Color_Yellow, 1, 1, grphpoints + grphframe.x, y);
74
-  }
75
-  else {
76
-    DWIN_Frame_AreaMove(1, 0, 1, Plot_Bg_Color, grphframe.x, grphframe.y, x2, y2);
77
-    if ((grphpoints % 50) == 0) DWIN_Draw_VLine(Line_Color, x2 - 1, grphframe.y + 1, grphframe.h - 2);
78
-    DWIN_Draw_Point(Color_Red, 1, 1, x2 - 1, r);
79
-    DWIN_Draw_Point(Color_Yellow, 1, 1, x2 - 1, y);
80
-  }
81
-  grphpoints++;
82
-}
83
-
84
-#endif // HAS_PIDPLOT
85
-
86
-#endif // DWIN_CREALITY_LCD_JYERSUI

+ 0
- 41
Marlin/src/lcd/e3v2/jyersui/plot.h View File

@@ -1,41 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * DWIN Single var plot
26
- * Author: Miguel A. Risco-Castillo
27
- * Version: 1.0
28
- * Date: 2022/01/30
29
- *
30
- * Modded for JYERSUI by LCH-77
31
- */
32
-
33
-#include "dwinui.h"
34
-
35
-class PlotClass {
36
-public:
37
-  void Draw(frame_rect_t frame, float max, float ref = 0);
38
-  void Update(float value);
39
-};
40
-
41
-extern PlotClass Plot;

+ 3
- 3
Marlin/src/lcd/e3v2/proui/base64.hpp View File

@@ -152,7 +152,7 @@ uint16_t encode_base64(unsigned char input[], uint16_t input_length, unsigned ch
152 152
     output += 4;
153 153
   }
154 154
 
155
-  switch (input_length % 3) {
155
+  switch(input_length % 3) {
156 156
     case 0:
157 157
       output[0] = '\0';
158 158
       break;
@@ -192,7 +192,7 @@ uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned ch
192 192
     output += 3;
193 193
   }
194 194
 
195
-  switch (output_length % 3) {
195
+  switch(output_length % 3) {
196 196
     case 1:
197 197
       output[0] = base64_to_binary(input[0]) << 2 | base64_to_binary(input[1]) >> 4;
198 198
       break;
@@ -205,4 +205,4 @@ uint16_t decode_base64(unsigned char input[], uint16_t input_length, unsigned ch
205 205
   return output_length;
206 206
 }
207 207
 
208
-#endif // BASE64_H_INCLUDED
208
+#endif // ifndef

+ 4
- 2
Marlin/src/lcd/e3v2/proui/gcode_preview.cpp View File

@@ -21,7 +21,7 @@
21 21
  */
22 22
 
23 23
 /**
24
- * DWIN G-code thumbnail preview
24
+ * DWIN g-code thumbnail preview
25 25
  * Author: Miguel A. Risco-Castillo
26 26
  * version: 2.1
27 27
  * Date: 2021/06/19
@@ -214,7 +214,9 @@ bool Has_Preview() {
214 214
 void Preview_DrawFromSD() {
215 215
   if (Has_Preview()) {
216 216
     char buf[46];
217
-    char str_1[6] = "", str_2[6] = "", str_3[6] = "";
217
+    char str_1[6] = "";
218
+    char str_2[6] = "";
219
+    char str_3[6] = "";
218 220
     DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 0, DWIN_WIDTH, STATUS_Y - 1);
219 221
     if (fileprop.time) {
220 222
       sprintf_P(buf, PSTR("Estimated time: %i:%02i"), (uint16_t)fileprop.time / 3600, ((uint16_t)fileprop.time % 3600) / 60);

+ 1
- 1
Marlin/src/lcd/e3v2/proui/gcode_preview.h View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * DWIN G-code thumbnail preview
2
+ * DWIN g-code thumbnail preview
3 3
  * Author: Miguel A. Risco-Castillo
4 4
  * version: 2.1
5 5
  * Date: 2021/06/19

+ 1
- 1
Marlin/src/lcd/extui/ui_api.h View File

@@ -199,7 +199,7 @@ namespace ExtUI {
199 199
   #endif
200 200
 
201 201
   inline void simulateUserClick() {
202
-    #if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI)
202
+    #if EITHER(HAS_MARLINUI_MENU, EXTENSIBLE_UI)
203 203
       ui.lcd_clicked = true;
204 204
     #endif
205 205
   }

+ 1
- 4
Marlin/src/lcd/marlinui.cpp View File

@@ -49,8 +49,6 @@ MarlinUI ui;
49 49
   #include "e3v2/creality/dwin.h"
50 50
 #elif ENABLED(DWIN_LCD_PROUI)
51 51
   #include "e3v2/proui/dwin.h"
52
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
53
-  #include "e3v2/jyersui/dwin.h"
54 52
 #endif
55 53
 
56 54
 #if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL
@@ -161,7 +159,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
161 159
   bool MarlinUI::lcd_clicked;
162 160
 #endif
163 161
 
164
-#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI)
162
+#if HAS_WIRED_LCD
165 163
 
166 164
   bool MarlinUI::get_blink() {
167 165
     static uint8_t blink = 0;
@@ -1575,7 +1573,6 @@ void MarlinUI::init() {
1575 1573
     TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message));
1576 1574
     TERN_(DWIN_CREALITY_LCD, DWIN_StatusChanged(status_message));
1577 1575
     TERN_(DWIN_LCD_PROUI, DWIN_CheckStatusMessage());
1578
-    TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Update_Status(status_message));
1579 1576
   }
1580 1577
 
1581 1578
   #if ENABLED(STATUS_MESSAGE_SCROLLING)

+ 4
- 6
Marlin/src/lcd/marlinui.h View File

@@ -87,11 +87,9 @@ typedef bool (*statusResetFunc_t)();
87 87
 
88 88
   #endif // HAS_MARLINUI_MENU
89 89
 
90
-#endif // HAS_WIRED_LCD
91
-
92
-#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI)
93 90
   #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100)
94
-#endif
91
+
92
+#endif // HAS_WIRED_LCD
95 93
 
96 94
 #if HAS_MARLINUI_U8GLIB
97 95
   enum MarlinFont : uint8_t {
@@ -393,7 +391,7 @@ public:
393 391
       static void poweroff();
394 392
     #endif
395 393
 
396
-    #if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI)
394
+    #if HAS_WIRED_LCD
397 395
       static bool get_blink();
398 396
     #endif
399 397
 
@@ -630,7 +628,7 @@ public:
630 628
     static bool use_click() { return false; }
631 629
   #endif
632 630
 
633
-  #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
631
+  #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI)
634 632
     static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
635 633
   #else
636 634
     static void _pause_show_message() {}

+ 0
- 22
Marlin/src/module/settings.cpp View File

@@ -76,8 +76,6 @@
76 76
   #include "../lcd/extui/ui_api.h"
77 77
 #elif ENABLED(DWIN_LCD_PROUI)
78 78
   #include "../lcd/e3v2/proui/dwin.h"
79
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
80
-  #include "../lcd/e3v2/jyersui/dwin.h"
81 79
 #endif
82 80
 
83 81
 #if ENABLED(HOST_PROMPT_SUPPORT)
@@ -502,8 +500,6 @@ typedef struct SettingsDataStruct {
502 500
   //
503 501
   #if ENABLED(DWIN_LCD_PROUI)
504 502
     uint8_t dwin_data[eeprom_data_size];
505
-  #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
506
-    uint8_t dwin_settings[eeprom_data_size];
507 503
   #endif
508 504
 
509 505
   //
@@ -1522,15 +1518,6 @@ void MarlinSettings::postprocess() {
1522 1518
     }
1523 1519
     #endif
1524 1520
 
1525
-    #if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
1526
-    {
1527
-      _FIELD_TEST(dwin_settings);
1528
-      char dwin_settings[eeprom_data_size] = { 0 };
1529
-      CrealityDWIN.Save_Settings(dwin_settings);
1530
-      EEPROM_WRITE(dwin_settings);
1531
-    }
1532
-    #endif
1533
-
1534 1521
     //
1535 1522
     // Case Light Brightness
1536 1523
     //
@@ -2495,13 +2482,6 @@ void MarlinSettings::postprocess() {
2495 2482
         EEPROM_READ(dwin_data);
2496 2483
         if (!validating) DWIN_CopySettingsFrom(dwin_data);
2497 2484
       }
2498
-      #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
2499
-      {
2500
-        const char dwin_settings[eeprom_data_size] = { 0 };
2501
-        _FIELD_TEST(dwin_settings);
2502
-        EEPROM_READ(dwin_settings);
2503
-        if (!validating) CrealityDWIN.Load_Settings(dwin_settings);
2504
-      }
2505 2485
       #endif
2506 2486
 
2507 2487
       //
@@ -2929,8 +2909,6 @@ void MarlinSettings::reset() {
2929 2909
     #endif
2930 2910
   #endif
2931 2911
 
2932
-  TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings());
2933
-
2934 2912
   //
2935 2913
   // Case Light Brightness
2936 2914
   //

+ 0
- 8
Marlin/src/module/temperature.cpp View File

@@ -53,8 +53,6 @@
53 53
   #include "../lcd/e3v2/creality/dwin.h"
54 54
 #elif ENABLED(DWIN_LCD_PROUI)
55 55
   #include "../lcd/e3v2/proui/dwin.h"
56
-#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
57
-  #include "../lcd/e3v2/jyersui/dwin.h"
58 56
 #endif
59 57
 
60 58
 #if ENABLED(EXTENSIBLE_UI)
@@ -646,14 +644,12 @@ volatile bool Temperature::raw_temps_ready = false;
646 644
 
647 645
     TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_STARTED));
648 646
     TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(isbed ? PID_BED_START : PID_EXTR_START));
649
-    TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(isbed ? PID_BED_START : PID_EXTR_START));
650 647
 
651 648
     if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, temp_range[heater_id].maxtemp - (HOTEND_OVERSHOOT))) {
652 649
       SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
653 650
       SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
654 651
       TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
655 652
       TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_TEMP_TOO_HIGH));
656
-      TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_TEMP_TOO_HIGH));
657 653
       TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)));
658 654
       return;
659 655
     }
@@ -748,7 +744,6 @@ volatile bool Temperature::raw_temps_ready = false;
748 744
         SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
749 745
         TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
750 746
         TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_TEMP_TOO_HIGH));
751
-        TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_TEMP_TOO_HIGH));
752 747
         TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)));
753 748
         break;
754 749
       }
@@ -787,7 +782,6 @@ volatile bool Temperature::raw_temps_ready = false;
787 782
         TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0));
788 783
         TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_TUNING_TIMEOUT));
789 784
         TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT));
790
-        TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_TUNING_TIMEOUT));
791 785
         TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TIMEOUT)));
792 786
         SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
793 787
         SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);
@@ -845,7 +839,6 @@ volatile bool Temperature::raw_temps_ready = false;
845 839
 
846 840
         TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
847 841
         TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_DONE));
848
-        TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_DONE));
849 842
 
850 843
         goto EXIT_M303;
851 844
       }
@@ -864,7 +857,6 @@ volatile bool Temperature::raw_temps_ready = false;
864 857
 
865 858
     TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
866 859
     TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_DONE));
867
-    TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_DONE));
868 860
 
869 861
     EXIT_M303:
870 862
       TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = true);

+ 0
- 5
buildroot/tests/STM32F103RE_creality View File

@@ -13,11 +13,6 @@ use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
13 13
 opt_enable MARLIN_DEV_MODE BUFFER_MONITORING BLTOUCH AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING
14 14
 exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3"
15 15
 
16
-use_example_configs "Creality/Ender-3 V2/CrealityV422/CrealityUI"
17
-opt_disable DWIN_CREALITY_LCD
18
-opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
19
-exec_test $1 $2 "Ender 3 v2 with JyersUI" "$3"
20
-
21 16
 use_example_configs "Creality/Ender-3 S1/STM32F1"
22 17
 opt_disable DWIN_CREALITY_LCD Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN AUTO_BED_LEVELING_BILINEAR CONFIGURATION_EMBEDDING CANCEL_OBJECTS FWRETRACT
23 18
 opt_enable DWIN_LCD_PROUI INDIVIDUAL_AXIS_HOMING_SUBMENU LCD_SET_PROGRESS_MANUALLY STATUS_MESSAGE_SCROLLING \

+ 0
- 1
ini/features.ini View File

@@ -49,7 +49,6 @@ SPI_EEPROM                             = src_filter=+<src/HAL/shared/eeprom_if_s
49 49
 HAS_DWIN_E3V2|IS_DWIN_MARLINUI         = src_filter=+<src/lcd/e3v2/common>
50 50
 DWIN_CREALITY_LCD                      = src_filter=+<src/lcd/e3v2/creality>
51 51
 DWIN_LCD_PROUI                         = src_filter=+<src/lcd/e3v2/proui>
52
-DWIN_CREALITY_LCD_JYERSUI              = src_filter=+<src/lcd/e3v2/jyersui>
53 52
 IS_DWIN_MARLINUI                       = src_filter=+<src/lcd/e3v2/marlinui>
54 53
 HAS_GRAPHICAL_TFT                      = src_filter=+<src/lcd/tft>
55 54
 IS_TFTGLCD_PANEL                       = src_filter=+<src/lcd/TFTGLCD>

Loading…
Cancel
Save