Bläddra i källkod

Creality Ender board support

Scott Lahteine 6 år sedan
förälder
incheckning
f887719a40

+ 3
- 0
Marlin/src/Makefile Visa fil

@@ -176,6 +176,9 @@ MCU              ?= atmega1284p
176 176
 else ifeq  ($(HARDWARE_MOTHERBOARD),69)
177 177
 HARDWARE_VARIANT ?= Sanguino
178 178
 MCU              ?= atmega1284p
179
+else ifeq  ($(HARDWARE_MOTHERBOARD),601)
180
+HARDWARE_VARIANT ?= Sanguino
181
+MCU              ?= atmega1284p
179 182
 
180 183
 #Ultimaker
181 184
 else ifeq  ($(HARDWARE_MOTHERBOARD),7)

+ 1
- 0
Marlin/src/core/boards.h Visa fil

@@ -115,6 +115,7 @@
115 115
 #define BOARD_MELZI_MAKR3D      66    // Melzi with ATmega1284 (MaKr3d version)
116 116
 #define BOARD_MELZI_CREALITY    89    // Melzi Creality3D board (for CR-10 etc)
117 117
 #define BOARD_MELZI_MALYAN      92    // Melzi Malyan M150 board
118
+#define BOARD_CREALITY_ENDER    601   // Creality Ender
118 119
 #define BOARD_STB_11            64    // STB V1.1
119 120
 #define BOARD_AZTEEG_X1         65    // Azteeg X1
120 121
 

+ 21
- 1
Marlin/src/lcd/dogm/dogm_bitmaps.h Visa fil

@@ -115,7 +115,14 @@
115 115
 // When only one extruder is selected, the "1" on the symbol will not
116 116
 // be displayed.
117 117
 
118
-#if HAS_TEMP_BED
118
+#ifdef CUSTOM_STATUS_SCREEN_FILE
119
+  #undef STATUS_SCREENWIDTH
120
+
121
+  // This file must define STATUS_SCREENWIDTH and status_screen{0,1}_bmp.
122
+  // It can also define STATUS_SCREEN_X, STATUS_SCREEN_{BED,FAN}_TEXT_X and
123
+  // STATUS_SCREEN_HOTEND_TEXT_X(i) to modify draw locations.
124
+  #include CUSTOM_STATUS_SCREEN_FILE
125
+#elif HAS_TEMP_BED
119 126
   #if HOTENDS == 1
120 127
     #define STATUS_SCREENWIDTH     115 //Width in pixels
121 128
     #define STATUS_SCREENHEIGHT     19 //Height in pixels
@@ -513,3 +520,16 @@
513 520
   };
514 521
 
515 522
 #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
523
+
524
+#ifndef STATUS_SCREEN_X
525
+  #define STATUS_SCREEN_X 9
526
+#endif
527
+#ifndef STATUS_SCREEN_HOTEND_TEXT_X
528
+  #define STATUS_SCREEN_HOTEND_TEXT_X(i) (5 + (i) * 25)
529
+#endif
530
+#ifndef STATUS_SCREEN_BED_TEXT_X
531
+  #define STATUS_SCREEN_BED_TEXT_X 81
532
+#endif
533
+#ifndef STATUS_SCREEN_FAN_TEXT_X
534
+  #define STATUS_SCREEN_FAN_TEXT_X 104
535
+#endif

+ 1
- 1
Marlin/src/lcd/language/language_en.h Visa fil

@@ -37,7 +37,7 @@
37 37
 #undef en
38 38
 
39 39
 #ifndef WELCOME_MSG
40
-  #define WELCOME_MSG                         MACHINE_NAME _UxGT(" ready.")
40
+  #define WELCOME_MSG                         MACHINE_NAME _UxGT(" Ready.")
41 41
 #endif
42 42
 #ifndef MSG_BACK
43 43
   #define MSG_BACK                            _UxGT("Back")

+ 7
- 6
Marlin/src/lcd/ultralcd_impl_DOGM.h Visa fil

@@ -324,7 +324,7 @@ void lcd_printPGM_utf(const char *str, uint8_t n=LCD_WIDTH) {
324 324
 
325 325
     u8g.firstPage();
326 326
     do {
327
-      u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
327
+      u8g.drawBitmapP(offx, offy, (START_BMPWIDTH + 7) / 8, START_BMPHEIGHT, start_bmp);
328 328
       lcd_setFont(FONT_MENU);
329 329
       #ifndef STRING_SPLASH_LINE2
330 330
         u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT), STRING_SPLASH_LINE1);
@@ -365,7 +365,6 @@ static void lcd_implementation_init() {
365 365
   #elif ENABLED(LCD_SCREEN_ROT_270)
366 366
     u8g.setRot270();  // Rotate screen by 270°
367 367
   #endif
368
-
369 368
 }
370 369
 
371 370
 // The kill screen is displayed for unrecoverable conditions
@@ -503,7 +502,9 @@ static void lcd_implementation_status_screen() {
503 502
 
504 503
   if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
505 504
 
506
-    u8g.drawBitmapP(9, 1, STATUS_SCREENBYTEWIDTH, STATUS_SCREENHEIGHT,
505
+    u8g.drawBitmapP(
506
+      STATUS_SCREEN_X, 1,
507
+      (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
507 508
       #if HAS_FAN0
508 509
         blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp
509 510
       #else
@@ -519,11 +520,11 @@ static void lcd_implementation_status_screen() {
519 520
 
520 521
   if (PAGE_UNDER(28)) {
521 522
     // Extruders
522
-    HOTEND_LOOP() _draw_heater_status(5 + e * 25, e, blink);
523
+    HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink);
523 524
 
524 525
     // Heated bed
525 526
     #if HOTENDS < 4 && HAS_TEMP_BED
526
-      _draw_heater_status(81, -1, blink);
527
+      _draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink);
527 528
     #endif
528 529
 
529 530
     #if HAS_FAN0
@@ -531,7 +532,7 @@ static void lcd_implementation_status_screen() {
531 532
         // Fan
532 533
         const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
533 534
         if (per) {
534
-          u8g.setPrintPos(104, 27);
535
+          u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, 27);
535 536
           lcd_print(itostr3(per));
536 537
           u8g.print('%');
537 538
         }

+ 2
- 0
Marlin/src/pins/pins.h Visa fil

@@ -195,6 +195,8 @@
195 195
   #include "pins_MELZI_CREALITY.h"    // ATmega644P, ATmega1284P
196 196
 #elif MB(MELZI_MALYAN)
197 197
   #include "pins_MELZI_MALYAN.h"      // ATmega644P, ATmega1284P
198
+#elif MB(CREALITY_ENDER)
199
+  #include "pins_CREALITY_ENDER.h"    // ATmega1284P
198 200
 #elif MB(STB_11)
199 201
   #include "pins_STB_11.h"            // ATmega644P, ATmega1284P
200 202
 #elif MB(AZTEEG_X1)

+ 34
- 0
Marlin/src/pins/pins_CREALITY_ENDER.h Visa fil

@@ -0,0 +1,34 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * Creality Ender pin assignments
25
+ *
26
+ * Applies to the following boards:
27
+ *
28
+ *  Creality Ender-2
29
+ *  Creality Ender-4
30
+ */
31
+
32
+#define BOARD_NAME "Creality Ender"
33
+
34
+#include "pins_SANGUINOLOLU_12.h"

+ 6
- 1
Marlin/src/pins/pins_SANGUINOLOLU_11.h Visa fil

@@ -114,7 +114,7 @@
114 114
 
115 115
 #endif
116 116
 
117
-#if MB(AZTEEG_X1) || MB(STB_11) || ENABLED(IS_MELZI)
117
+#if MB(AZTEEG_X1) || MB(STB_11) || MB(CREALITY_ENDER) || ENABLED(IS_MELZI)
118 118
   #define FAN_PIN           4 // Works for Panelolu2 too
119 119
 #endif
120 120
 
@@ -187,6 +187,11 @@
187 187
         #define DOGLCD_CS       17
188 188
         #define LCD_BACKLIGHT_PIN 28 // PA3
189 189
 
190
+      #elif MB(CREALITY_ENDER)
191
+
192
+        #define BEEPER_PIN      27
193
+        #define DOGLCD_CS       28
194
+
190 195
       #else // !MAKRPANEL
191 196
 
192 197
         #define DOGLCD_CS       29

Laddar…
Avbryt
Spara