Creality Ender support.

Reverse engineered from the unpublished firmware from Creality,
inferring the base version and configuration they used. The basis is
the firmware version from "Jul 31 2017 10:16:30". Configurations were
found by seeing what code was compiled into the firmware, and
constants used there.

They used Marlin 1.0.1, because

* 1.0.0 had very different serial output in `setup()` and overall
  code structure.
* 1.0.2 changed the `VERSION_STRING` to include a leading space,
  and `lcd_init` uses `SET_INPUT` instead of `pinMode`.

For U8Glib, a version between 1.14 and 1.17 was used, because

* 1.12 didn't have the extra speed argument to u8g_InitCom.
* 1.13 didn't have the soft reset instruction for UC1701 initialization.
* 1.18 has a new directory structure.

Quirks

* The value of PID_dT hints that F_CPU is 20M, but MarlinSerial.begin
  suggests it's indeed 16M (and the board uses 16M). Left at 16M for now.

* The LED and DOGLCD_CS are on the same pin.
This commit is contained in:
Tommie Gannert 2018-01-07 15:19:32 +00:00 committed by Scott Lahteine
parent 90125ab639
commit f3f26f7cb3
13 changed files with 3598 additions and 7 deletions

View file

@ -494,7 +494,9 @@ static void lcd_implementation_status_screen() {
if (PAGE_UNDER(STATUS_SCREENHEIGHT + 1)) {
u8g.drawBitmapP(9, 1, (STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
u8g.drawBitmapP(
STATUS_SCREEN_X, 1,
(STATUS_SCREENWIDTH + 7) / 8, STATUS_SCREENHEIGHT,
#if HAS_FAN0
blink && fanSpeeds[0] ? status_screen0_bmp : status_screen1_bmp
#else
@ -510,11 +512,11 @@ static void lcd_implementation_status_screen() {
if (PAGE_UNDER(28)) {
// Extruders
HOTEND_LOOP() _draw_heater_status(5 + e * 25, e, blink);
HOTEND_LOOP() _draw_heater_status(STATUS_SCREEN_HOTEND_TEXT_X(e), e, blink);
// Heated bed
#if HOTENDS < 4 && HAS_TEMP_BED
_draw_heater_status(81, -1, blink);
_draw_heater_status(STATUS_SCREEN_BED_TEXT_X, -1, blink);
#endif
#if HAS_FAN0
@ -522,7 +524,7 @@ static void lcd_implementation_status_screen() {
// Fan
const int16_t per = ((fanSpeeds[0] + 1) * 100) / 256;
if (per) {
u8g.setPrintPos(104, 27);
u8g.setPrintPos(STATUS_SCREEN_FAN_TEXT_X, 27);
lcd_print(itostr3(per));
u8g.print('%');
}