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

2.0.x
Tanguy Pruvot 5 years ago committed by Scott Lahteine
parent ee240d21b9
commit d59d9b5973

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,77 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Custom Status Screen bitmap
*
* Place this file in the root with your configuration files
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
*
* Use the Marlin Bitmap Converter to make your own:
* http://marlinfw.org/tools/u8glib/converter.html
*/
#pragma once
//
// Status Screen Logo bitmap
//
#define STATUS_LOGO_Y 0
#define STATUS_LOGO_WIDTH 38
static unsigned char status_logo_bmp[] PROGMEM = {
B11111111,B11111111,B11111111,B11111111,B11111100,
B10000000,B00000000,B00010000,B00000111,B11111100,
B10000000,B00000000,B00010000,B00000000,B11111100,
B10000000,B00000000,B00110000,B00000000,B01111100,
B10000000,B00000000,B00110000,B00000000,B00111100,
B10000000,B00000000,B01110000,B00000000,B00011100,
B11111111,B10000000,B01110000,B00000000,B00001100,
B11111111,B10000000,B11110000,B11100000,B00001100,
B11111111,B00000000,B11110000,B11111000,B00001100,
B11111111,B00000001,B11110000,B11111100,B00000100,
B11111110,B00000001,B11110000,B11010010,B00000100,
B11111110,B00000011,B11110000,B10101110,B00000100,
B11111100,B00000000,B11110000,B10101111,B00000100,
B11111100,B00000000,B00110000,B10000011,B00000100,
B11111000,B00000000,B00110000,B11111111,B00000100,
B11111000,B00000000,B00010000,B11111111,B00000100,
B11111111,B11100000,B00010000,B10111111,B00000100,
B11111111,B11110000,B00010000,B10101111,B00000100,
B11111111,B11110000,B00010000,B10101110,B00000100,
B11111111,B11110000,B00010000,B10000010,B00000100,
B10000011,B11110000,B00010000,B11111100,B00000100,
B10000001,B11110000,B00010000,B11111000,B00001100,
B10000001,B11100000,B00010000,B11100000,B00001100,
B10000000,B00000000,B00010000,B00000000,B00001100,
B10000000,B00000000,B00110000,B00000000,B00011100,
B11000000,B00000000,B00110000,B00000000,B00111100,
B11000000,B00000000,B01110000,B00000000,B01111100,
B11100000,B00000000,B11110000,B00000000,B11111100,
B11111000,B00000011,B11110000,B00000111,B11111100
};
//
// Use default bitmaps
//
#define STATUS_HOTEND_ANIM
#define STATUS_BED_ANIM
#define STATUS_LOGO_X 0
#define STATUS_HEATERS_X 50
#define STATUS_BED_X 74

@ -75,28 +75,21 @@
// Forum link to help with a tutorial, in French! : // Forum link to help with a tutorial, in French! :
// https://www.lesimprimantes3d.fr/forum/topic/18260-alfawise-u20x-u30-marlin-2x-firmware-alternatif/ // https://www.lesimprimantes3d.fr/forum/topic/18260-alfawise-u20x-u30-marlin-2x-firmware-alternatif/
// //
// 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE), // 1 - Select your Alfawise U30 or U20 or U20+ printer (NO MORE REQUIRED HERE)
// and the touchscreen version, either 1.1 or 1.2. Most recent in France are v1.2 (blue pcb)
// These defines are set in platformio.ini build parameters, sample for U20 -DU20 -DTS_V12 // These defines are set in platformio.ini build parameters, sample for U20 -DU20 -DTS_V12
// U20_PLUS is not tested, as we do not have a printer to test. // U20_PLUS was not tested, as we do not have a printer to test. Print bed PID settings MUST be tuned for it.
// Print bed PID settings MUST be tuned
//#define U20_PLUS // Valid platformio.ini submodel values are U20_PLUS U20 U30 LK1 LK2 LK4
//#define U20
//#define U30 // Valid platformio.ini touchscreens are TS_V11 TS_V12
// 2 - Select the screen controller type. Most common is ILI9341 - First option. If your screen remains white, // 2 - Select the screen controller type. Most common is ILI9341 - First option. If your screen remains white,
// Try the alternate setting - this should enable ST7789V or ILI9328. For other LCDs... code is needed // Try the alternate setting - this should enable ST7789V or ILI9328. For other LCDs... code is needed
// with the proper boot sequence to be developped. // with the proper boot sequence to be developped.
#define LCD_READ_ID 0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens #define LCD_READ_ID 0xD3 // Read display identification information in reg ID4 0xD3, for ILI9341 screens
//#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others //#define LCD_READ_ID 0x04 // Read display identification information in reg ID1 0x04 - ST7789V / ILI9328 or others
// 3 - Select the touch panel version, either 1.1 or 1.2. Most recent touch panel in France are V 1.2. Blue PCB
// V1.1 panels seem to be older, and came with green PCB. This selection only influence the calibration data
// Should calibration need to be redone, please follow the French Tutorial! (NO MORE REQUIRED HERE)
//#define TS_V11
//#define TS_V12
//=========================================================================== //===========================================================================
@ -173,6 +166,12 @@
#define CUSTOM_MACHINE_NAME "Alfawise U30" #define CUSTOM_MACHINE_NAME "Alfawise U30"
#elif defined(U20_PLUS) #elif defined(U20_PLUS)
#define CUSTOM_MACHINE_NAME "Alfawise U20+" #define CUSTOM_MACHINE_NAME "Alfawise U20+"
#elif defined(LK1)
#define CUSTOM_MACHINE_NAME "Longer3D LK1"
#elif defined(LK2)
#define CUSTOM_MACHINE_NAME "Longer3D LK2"
#elif defined(LK4)
#define CUSTOM_MACHINE_NAME "Longer3D LK4"
#endif #endif
// Printer's unique ID, used by some programs to differentiate between machines. // Printer's unique ID, used by some programs to differentiate between machines.
@ -579,27 +578,28 @@
//#define DEFAULT_bedKi 1.41 //#define DEFAULT_bedKi 1.41
//#define DEFAULT_bedKd 1675.16 //#define DEFAULT_bedKd 1675.16
#if ENABLED(U30) #if defined(U30) || defined(LK2) || defined(LK4)
//From M303 command for Alfawise U30 : //From M303 command for Alfawise U30 :
#define DEFAULT_bedKp 338.46 #define DEFAULT_bedKp 338.46
#define DEFAULT_bedKi 63.96 #define DEFAULT_bedKi 63.96
#define DEFAULT_bedKd 447.78 #define DEFAULT_bedKd 447.78
#endif #endif
#if ENABLED(U20) #if defined(U20) || defined(LK1)
//From M303 command for Alfawise U20 : //From M303 command for Alfawise U20 :
#define DEFAULT_bedKp 841.68 #define DEFAULT_bedKp 841.68
#define DEFAULT_bedKi 152.12 #define DEFAULT_bedKi 152.12
#define DEFAULT_bedKd 1164.25 #define DEFAULT_bedKd 1164.25
#endif #endif
#if ENABLED(U20_PLUS) // The PID setting MUST be updated. #if defined(U20_PLUS)
//From M303 command for Alfawise U20 : // These PID setting MUST be updated.
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#define DEFAULT_bedKp 841.68 #define DEFAULT_bedKp 841.68
#define DEFAULT_bedKi 152.12 #define DEFAULT_bedKi 152.12
#define DEFAULT_bedKd 1164.25 #define DEFAULT_bedKd 1164.25
#endif #endif
// FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED #endif // PIDTEMPBED
// @section extruder // @section extruder
@ -1102,19 +1102,19 @@
// @section machine // @section machine
#if ENABLED(U30) #if defined(U30) || defined(LK2) || defined(LK4)
#define X_BED_SIZE 220 #define X_BED_SIZE 220
#define Y_BED_SIZE 220 #define Y_BED_SIZE 220
#define Z_MACHINE_MAX 250 #define Z_MACHINE_MAX 250
#endif #endif
#if ENABLED(U20) #if defined(U20) || defined(LK1)
#define X_BED_SIZE 300 #define X_BED_SIZE 300
#define Y_BED_SIZE 300 #define Y_BED_SIZE 300
#define Z_MACHINE_MAX 400 #define Z_MACHINE_MAX 400
#endif #endif
#if ENABLED(U20_PLUS) #if defined(U20_PLUS)
#define X_BED_SIZE 400 #define X_BED_SIZE 400
#define Y_BED_SIZE 400 #define Y_BED_SIZE 400
#define Z_MACHINE_MAX 500 #define Z_MACHINE_MAX 500
@ -1403,7 +1403,7 @@
#if ENABLED(Z_SAFE_HOMING) #if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). #define Z_SAFE_HOMING_Y_POINT MIN_PROBE_Y // Y point for Z homing when homing all axes (G28).
#endif #endif
// Homing speeds (mm/m) // Homing speeds (mm/m)

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

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

Loading…
Cancel
Save