Browse Source

Alfawise - LK1/LK2/LK4 and BLTouch (#15118)

Tanguy Pruvot 4 years ago
parent
commit
d59d9b5973

+ 2310
- 0
config/examples/Alfawise/U20-bltouch/Configuration.h
File diff suppressed because it is too large
View File


+ 2685
- 0
config/examples/Alfawise/U20-bltouch/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 77
- 0
config/examples/Alfawise/U20-bltouch/_Statusscreen.h View File

@@ -0,0 +1,77 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+ *
18
+ */
19
+
20
+/**
21
+ * Custom Status Screen bitmap
22
+ *
23
+ * Place this file in the root with your configuration files
24
+ * and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
25
+ *
26
+ * Use the Marlin Bitmap Converter to make your own:
27
+ * http://marlinfw.org/tools/u8glib/converter.html
28
+ */
29
+
30
+#pragma once
31
+
32
+//
33
+// Status Screen Logo bitmap
34
+//
35
+#define STATUS_LOGO_Y            0
36
+#define STATUS_LOGO_WIDTH       38
37
+
38
+static unsigned char status_logo_bmp[] PROGMEM = {
39
+  B11111111,B11111111,B11111111,B11111111,B11111100,
40
+  B10000000,B00000000,B00010000,B00000111,B11111100,
41
+  B10000000,B00000000,B00010000,B00000000,B11111100,
42
+  B10000000,B00000000,B00110000,B00000000,B01111100,
43
+  B10000000,B00000000,B00110000,B00000000,B00111100,
44
+  B10000000,B00000000,B01110000,B00000000,B00011100,
45
+  B11111111,B10000000,B01110000,B00000000,B00001100,
46
+  B11111111,B10000000,B11110000,B11100000,B00001100,
47
+  B11111111,B00000000,B11110000,B11111000,B00001100,
48
+  B11111111,B00000001,B11110000,B11111100,B00000100,
49
+  B11111110,B00000001,B11110000,B11010010,B00000100,
50
+  B11111110,B00000011,B11110000,B10101110,B00000100,
51
+  B11111100,B00000000,B11110000,B10101111,B00000100,
52
+  B11111100,B00000000,B00110000,B10000011,B00000100,
53
+  B11111000,B00000000,B00110000,B11111111,B00000100,
54
+  B11111000,B00000000,B00010000,B11111111,B00000100,
55
+  B11111111,B11100000,B00010000,B10111111,B00000100,
56
+  B11111111,B11110000,B00010000,B10101111,B00000100,
57
+  B11111111,B11110000,B00010000,B10101110,B00000100,
58
+  B11111111,B11110000,B00010000,B10000010,B00000100,
59
+  B10000011,B11110000,B00010000,B11111100,B00000100,
60
+  B10000001,B11110000,B00010000,B11111000,B00001100,
61
+  B10000001,B11100000,B00010000,B11100000,B00001100,
62
+  B10000000,B00000000,B00010000,B00000000,B00001100,
63
+  B10000000,B00000000,B00110000,B00000000,B00011100,
64
+  B11000000,B00000000,B00110000,B00000000,B00111100,
65
+  B11000000,B00000000,B01110000,B00000000,B01111100,
66
+  B11100000,B00000000,B11110000,B00000000,B11111100,
67
+  B11111000,B00000011,B11110000,B00000111,B11111100
68
+};
69
+
70
+//
71
+// Use default bitmaps
72
+//
73
+#define STATUS_HOTEND_ANIM
74
+#define STATUS_BED_ANIM
75
+#define STATUS_LOGO_X          0
76
+#define STATUS_HEATERS_X      50
77
+#define STATUS_BED_X          74

+ 24
- 24
config/examples/Alfawise/U20/Configuration.h View File

@@ -75,28 +75,21 @@
75 75
 // Forum link to help with a tutorial, in French! :
76 76
 // https://www.lesimprimantes3d.fr/forum/topic/18260-alfawise-u20x-u30-marlin-2x-firmware-alternatif/
77 77
 //
78
-// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE),
78
+// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE)
79
+//     and the touchscreen version, either 1.1 or 1.2. Most recent in France are v1.2 (blue pcb)
79 80
 //     These defines are set in platformio.ini build parameters, sample for U20 -DU20 -DTS_V12
80
-//     U20_PLUS  is not tested, as we do not have a printer to test.
81
-//     Print bed PID settings MUST be tuned
81
+//     U20_PLUS was not tested, as we do not have a printer to test. Print bed PID settings MUST be tuned for it.
82 82
 
83
-//#define U20_PLUS
84
-//#define U20
85
-//#define U30
83
+// Valid platformio.ini submodel values are U20_PLUS U20 U30 LK1 LK2 LK4
84
+
85
+// Valid platformio.ini touchscreens are TS_V11 TS_V12
86 86
 
87 87
 // 2 - Select the screen controller type. Most common is ILI9341 - First option. If your screen remains white,
88 88
 //     Try the alternate setting - this should enable ST7789V or ILI9328. For other LCDs... code is needed
89 89
 //     with the proper boot sequence to be developped.
90 90
 
91
-#define LCD_READ_ID     0xD3   // Read display identification information in reg ID4 0xD3, for ILI9341 screens
92
-//#define LCD_READ_ID     0x04   // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others
93
-
94
-// 3 - Select the touch panel version, either 1.1 or 1.2. Most recent touch panel in France are V 1.2. Blue PCB
95
-//     V1.1 panels seem to be older, and came with green PCB. This selection only influence the calibration data
96
-//     Should calibration need to be redone, please follow the French Tutorial! (NO MORE REQUIRED HERE)
97
-
98
-//#define TS_V11
99
-//#define TS_V12
91
+#define LCD_READ_ID   0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens
92
+//#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others
100 93
 
101 94
 //===========================================================================
102 95
 
@@ -173,6 +166,12 @@
173 166
 #define CUSTOM_MACHINE_NAME "Alfawise U30"
174 167
 #elif defined(U20_PLUS)
175 168
 #define CUSTOM_MACHINE_NAME "Alfawise U20+"
169
+#elif defined(LK1)
170
+#define CUSTOM_MACHINE_NAME "Longer3D LK1"
171
+#elif defined(LK2)
172
+#define CUSTOM_MACHINE_NAME "Longer3D LK2"
173
+#elif defined(LK4)
174
+#define CUSTOM_MACHINE_NAME "Longer3D LK4"
176 175
 #endif
177 176
 
178 177
 // Printer's unique ID, used by some programs to differentiate between machines.
@@ -579,27 +578,28 @@
579 578
   //#define DEFAULT_bedKi 1.41
580 579
   //#define DEFAULT_bedKd 1675.16
581 580
 
582
-#if ENABLED(U30)
581
+#if defined(U30) || defined(LK2) || defined(LK4)
583 582
   //From M303 command for Alfawise U30 :
584 583
   #define DEFAULT_bedKp 338.46
585 584
   #define DEFAULT_bedKi 63.96
586 585
   #define DEFAULT_bedKd 447.78
587 586
 #endif
588 587
 
589
-#if ENABLED(U20)
588
+#if defined(U20) || defined(LK1)
590 589
   //From M303 command for Alfawise U20 :
591 590
   #define DEFAULT_bedKp 841.68
592 591
   #define DEFAULT_bedKi 152.12
593 592
   #define DEFAULT_bedKd 1164.25
594 593
 #endif
595 594
 
596
-#if ENABLED(U20_PLUS) // The PID setting MUST be updated.
597
-  //From M303 command for Alfawise U20 :
595
+#if defined(U20_PLUS)
596
+  // These PID setting MUST be updated.
597
+  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
598 598
   #define DEFAULT_bedKp 841.68
599 599
   #define DEFAULT_bedKi 152.12
600 600
   #define DEFAULT_bedKd 1164.25
601 601
 #endif
602
-  // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
602
+
603 603
 #endif // PIDTEMPBED
604 604
 
605 605
 // @section extruder
@@ -1102,19 +1102,19 @@
1102 1102
 
1103 1103
 // @section machine
1104 1104
 
1105
-#if ENABLED(U30)
1105
+#if defined(U30) || defined(LK2) || defined(LK4)
1106 1106
 #define X_BED_SIZE 220
1107 1107
 #define Y_BED_SIZE 220
1108 1108
 #define Z_MACHINE_MAX 250
1109 1109
 #endif
1110 1110
 
1111
-#if ENABLED(U20)
1111
+#if defined(U20) || defined(LK1)
1112 1112
 #define X_BED_SIZE 300
1113 1113
 #define Y_BED_SIZE 300
1114 1114
 #define Z_MACHINE_MAX 400
1115 1115
 #endif
1116 1116
 
1117
-#if ENABLED(U20_PLUS)
1117
+#if defined(U20_PLUS)
1118 1118
 #define X_BED_SIZE 400
1119 1119
 #define Y_BED_SIZE 400
1120 1120
 #define Z_MACHINE_MAX 500
@@ -1403,7 +1403,7 @@
1403 1403
 
1404 1404
 #if ENABLED(Z_SAFE_HOMING)
1405 1405
   #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
1406
-  #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
1406
+  #define Z_SAFE_HOMING_Y_POINT MIN_PROBE_Y           // Y point for Z homing when homing all axes (G28).
1407 1407
 #endif
1408 1408
 
1409 1409
 // Homing speeds (mm/m)

+ 8
- 7
config/examples/Alfawise/U20/Configuration_adv.h View File

@@ -138,7 +138,7 @@
138 138
  */
139 139
 #if ENABLED(THERMAL_PROTECTION_HOTENDS)
140 140
   #define THERMAL_PROTECTION_PERIOD 60        // Seconds
141
-  #define THERMAL_PROTECTION_HYSTERESIS 10     // Degrees Celsius
141
+  #define THERMAL_PROTECTION_HYSTERESIS 10    // Degrees Celsius
142 142
 
143 143
   //#define ADAPTIVE_FAN_SLOWING              // Slow part cooling fan if temperature drops
144 144
   #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
@@ -1221,12 +1221,13 @@
1221 1221
 // FSMC Graphical TFT
1222 1222
 //
1223 1223
 #if ENABLED(FSMC_GRAPHICAL_TFT)
1224
-  //#define TFT_MARLINUI_COLOR 0xFFFF // White
1225
-  //#define TFT_MARLINBG_COLOR 0x0000 // Black
1226
-  //#define TFT_DISABLED_COLOR 0x0003 // Almost black
1227
-  //#define TFT_BTCANCEL_COLOR 0xF800 // Red
1228
-  //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow
1229
-  //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
1224
+  // see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html
1225
+  #define TFT_MARLINUI_COLOR COLOR_WHITE
1226
+  #define TFT_MARLINBG_COLOR COLOR_BLACK
1227
+  #define TFT_DISABLED_COLOR 0x10A2 // almost black
1228
+  #define TFT_BTCANCEL_COLOR COLOR_RED
1229
+  #define TFT_BTARROWS_COLOR COLOR_WHITE
1230
+  #define TFT_BTOKMENU_COLOR COLOR_BLUE
1230 1231
 #endif
1231 1232
 
1232 1233
 // @section safety

+ 1
- 1
platformio.ini View File

@@ -364,7 +364,7 @@ extra_scripts = buildroot/share/PlatformIO/scripts/alfawise_Ux0.py
364 364
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py
365 365
   ${common.build_flags} -std=gnu++14
366 366
   -DSTM32F1xx -DU20 -DTS_V12
367
-build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
367
+build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
368 368
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
369 369
 lib_deps      = ${common.lib_deps}
370 370
 lib_ignore    = Adafruit NeoPixel, LiquidTWI2, SPI

Loading…
Cancel
Save