ソースを参照

Creality Ender board support

Scott Lahteine 6年前
コミット
f887719a40

+ 3
- 0
Marlin/src/Makefile ファイルの表示

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

+ 1
- 0
Marlin/src/core/boards.h ファイルの表示

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

+ 21
- 1
Marlin/src/lcd/dogm/dogm_bitmaps.h ファイルの表示

115
 // When only one extruder is selected, the "1" on the symbol will not
115
 // When only one extruder is selected, the "1" on the symbol will not
116
 // be displayed.
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
   #if HOTENDS == 1
126
   #if HOTENDS == 1
120
     #define STATUS_SCREENWIDTH     115 //Width in pixels
127
     #define STATUS_SCREENWIDTH     115 //Width in pixels
121
     #define STATUS_SCREENHEIGHT     19 //Height in pixels
128
     #define STATUS_SCREENHEIGHT     19 //Height in pixels
513
   };
520
   };
514
 
521
 
515
 #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
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 ファイルの表示

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

+ 7
- 6
Marlin/src/lcd/ultralcd_impl_DOGM.h ファイルの表示

324
 
324
 
325
     u8g.firstPage();
325
     u8g.firstPage();
326
     do {
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
       lcd_setFont(FONT_MENU);
328
       lcd_setFont(FONT_MENU);
329
       #ifndef STRING_SPLASH_LINE2
329
       #ifndef STRING_SPLASH_LINE2
330
         u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT), STRING_SPLASH_LINE1);
330
         u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT), STRING_SPLASH_LINE1);
365
   #elif ENABLED(LCD_SCREEN_ROT_270)
365
   #elif ENABLED(LCD_SCREEN_ROT_270)
366
     u8g.setRot270();  // Rotate screen by 270°
366
     u8g.setRot270();  // Rotate screen by 270°
367
   #endif
367
   #endif
368
-
369
 }
368
 }
370
 
369
 
371
 // The kill screen is displayed for unrecoverable conditions
370
 // The kill screen is displayed for unrecoverable conditions
503
 
502
 
504
   if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
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
       #if HAS_FAN0
508
       #if HAS_FAN0
508
         blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp
509
         blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp
509
       #else
510
       #else
519
 
520
 
520
   if (PAGE_UNDER(28)) {
521
   if (PAGE_UNDER(28)) {
521
     // Extruders
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
     // Heated bed
525
     // Heated bed
525
     #if HOTENDS < 4 && HAS_TEMP_BED
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
     #endif
528
     #endif
528
 
529
 
529
     #if HAS_FAN0
530
     #if HAS_FAN0
531
         // Fan
532
         // Fan
532
         const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
533
         const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
533
         if (per) {
534
         if (per) {
534
-          u8g.setPrintPos(104, 27);
535
+          u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, 27);
535
           lcd_print(itostr3(per));
536
           lcd_print(itostr3(per));
536
           u8g.print('%');
537
           u8g.print('%');
537
         }
538
         }

+ 2
- 0
Marlin/src/pins/pins.h ファイルの表示

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

+ 34
- 0
Marlin/src/pins/pins_CREALITY_ENDER.h ファイルの表示

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 ファイルの表示

114
 
114
 
115
 #endif
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
   #define FAN_PIN           4 // Works for Panelolu2 too
118
   #define FAN_PIN           4 // Works for Panelolu2 too
119
 #endif
119
 #endif
120
 
120
 
187
         #define DOGLCD_CS       17
187
         #define DOGLCD_CS       17
188
         #define LCD_BACKLIGHT_PIN 28 // PA3
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
       #else // !MAKRPANEL
195
       #else // !MAKRPANEL
191
 
196
 
192
         #define DOGLCD_CS       29
197
         #define DOGLCD_CS       29

読み込み中…
キャンセル
保存