Changes supporting "Prussia3D" MK3 (#21617)
This commit is contained in:
parent
f52351d116
commit
6bb10b1898
@ -2539,7 +2539,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD)
|
#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD)
|
||||||
#ifdef PREHEAT_5_LABEL
|
#ifdef PREHEAT_6_LABEL
|
||||||
|
#define PREHEAT_COUNT 6
|
||||||
|
#elif defined(PREHEAT_5_LABEL)
|
||||||
#define PREHEAT_COUNT 5
|
#define PREHEAT_COUNT 5
|
||||||
#elif defined(PREHEAT_4_LABEL)
|
#elif defined(PREHEAT_4_LABEL)
|
||||||
#define PREHEAT_COUNT 4
|
#define PREHEAT_COUNT 4
|
||||||
|
@ -281,7 +281,9 @@
|
|||||||
#define STATUS_HOTEND8_WIDTH STATUS_HOTEND7_WIDTH
|
#define STATUS_HOTEND8_WIDTH STATUS_HOTEND7_WIDTH
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
constexpr uint8_t status_hotend_width[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_WIDTH, STATUS_HOTEND2_WIDTH, STATUS_HOTEND3_WIDTH, STATUS_HOTEND4_WIDTH, STATUS_HOTEND5_WIDTH, STATUS_HOTEND6_WIDTH, STATUS_HOTEND7_WIDTH, STATUS_HOTEND8_WIDTH);
|
#define _SHNAME(N,T) STATUS_HOTEND##N##_##T,
|
||||||
|
|
||||||
|
constexpr uint8_t status_hotend_width[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, WIDTH) };
|
||||||
#define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
|
#define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
|
||||||
|
|
||||||
#ifndef STATUS_HOTEND1_BYTEWIDTH
|
#ifndef STATUS_HOTEND1_BYTEWIDTH
|
||||||
@ -309,7 +311,7 @@
|
|||||||
#define STATUS_HOTEND8_BYTEWIDTH BW(STATUS_HOTEND8_WIDTH)
|
#define STATUS_HOTEND8_BYTEWIDTH BW(STATUS_HOTEND8_WIDTH)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
constexpr uint8_t status_hotend_bytewidth[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_BYTEWIDTH, STATUS_HOTEND2_BYTEWIDTH, STATUS_HOTEND3_BYTEWIDTH, STATUS_HOTEND4_BYTEWIDTH, STATUS_HOTEND5_BYTEWIDTH, STATUS_HOTEND6_BYTEWIDTH, STATUS_HOTEND7_BYTEWIDTH, STATUS_HOTEND8_BYTEWIDTH);
|
constexpr uint8_t status_hotend_bytewidth[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, BYTEWIDTH) };
|
||||||
#define STATUS_HOTEND_BYTEWIDTH(N) status_hotend_bytewidth[N]
|
#define STATUS_HOTEND_BYTEWIDTH(N) status_hotend_bytewidth[N]
|
||||||
|
|
||||||
#ifndef STATUS_HOTEND1_X
|
#ifndef STATUS_HOTEND1_X
|
||||||
@ -339,7 +341,7 @@
|
|||||||
#define STATUS_HOTEND8_X STATUS_HOTEND7_X + STATUS_HEATERS_XSPACE
|
#define STATUS_HOTEND8_X STATUS_HOTEND7_X + STATUS_HEATERS_XSPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X, STATUS_HOTEND7_X, STATUS_HOTEND8_X);
|
constexpr uint8_t status_hotend_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, X) };
|
||||||
#define STATUS_HOTEND_X(N) status_hotend_x[N]
|
#define STATUS_HOTEND_X(N) status_hotend_x[N]
|
||||||
#elif HAS_MULTI_HOTEND
|
#elif HAS_MULTI_HOTEND
|
||||||
#define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X)
|
#define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X)
|
||||||
@ -370,13 +372,15 @@
|
|||||||
#ifndef STATUS_HOTEND8_TEXT_X
|
#ifndef STATUS_HOTEND8_TEXT_X
|
||||||
#define STATUS_HOTEND8_TEXT_X STATUS_HOTEND7_TEXT_X + STATUS_HEATERS_XSPACE
|
#define STATUS_HOTEND8_TEXT_X STATUS_HOTEND7_TEXT_X + STATUS_HEATERS_XSPACE
|
||||||
#endif
|
#endif
|
||||||
constexpr uint8_t status_hotend_text_x[] = ARRAY_N(HOTENDS, STATUS_HOTEND1_TEXT_X, STATUS_HOTEND2_TEXT_X, STATUS_HOTEND3_TEXT_X, STATUS_HOTEND4_TEXT_X, STATUS_HOTEND5_TEXT_X, STATUS_HOTEND6_TEXT_X, STATUS_HOTEND7_TEXT_X, STATUS_HOTEND8_TEXT_X);
|
constexpr uint8_t status_hotend_text_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, TEXT_X) };
|
||||||
#define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N]
|
#define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N]
|
||||||
#else
|
#else
|
||||||
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HOTEND1_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
|
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HOTEND1_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef _SHNAME
|
||||||
|
|
||||||
#if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS)
|
#if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS)
|
||||||
#define TEST_BITMAP_OFF status_hotend1_a_bmp
|
#define TEST_BITMAP_OFF status_hotend1_a_bmp
|
||||||
#define TEST_BITMAP_ON status_hotend1_b_bmp
|
#define TEST_BITMAP_ON status_hotend1_b_bmp
|
||||||
|
@ -112,25 +112,10 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
|||||||
#if PREHEAT_COUNT
|
#if PREHEAT_COUNT
|
||||||
preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load()
|
preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load()
|
||||||
PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
|
PGM_P MarlinUI::get_preheat_label(const uint8_t m) {
|
||||||
#ifdef PREHEAT_1_LABEL
|
#define _PDEF(N) static PGMSTR(preheat_##N##_label, PREHEAT_##N##_LABEL);
|
||||||
static PGMSTR(preheat_0_label, PREHEAT_1_LABEL);
|
|
||||||
#endif
|
|
||||||
#ifdef PREHEAT_2_LABEL
|
|
||||||
static PGMSTR(preheat_1_label, PREHEAT_2_LABEL);
|
|
||||||
#endif
|
|
||||||
#ifdef PREHEAT_3_LABEL
|
|
||||||
static PGMSTR(preheat_2_label, PREHEAT_3_LABEL);
|
|
||||||
#endif
|
|
||||||
#ifdef PREHEAT_4_LABEL
|
|
||||||
static PGMSTR(preheat_3_label, PREHEAT_4_LABEL);
|
|
||||||
#endif
|
|
||||||
#ifdef PREHEAT_5_LABEL
|
|
||||||
static PGMSTR(preheat_4_label, PREHEAT_5_LABEL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _PLBL(N) preheat_##N##_label,
|
#define _PLBL(N) preheat_##N##_label,
|
||||||
static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT(PREHEAT_COUNT, _PLBL) };
|
REPEAT_S(1, INCREMENT(PREHEAT_COUNT), _PDEF);
|
||||||
|
static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT_S(1, INCREMENT(PREHEAT_COUNT), _PLBL) };
|
||||||
return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
|
return (PGM_P)pgm_read_ptr(&preheat_labels[m]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2780,25 +2780,20 @@ void MarlinSettings::reset() {
|
|||||||
// Preheat parameters
|
// Preheat parameters
|
||||||
//
|
//
|
||||||
#if PREHEAT_COUNT
|
#if PREHEAT_COUNT
|
||||||
|
#define _PITEM(N,T) PREHEAT_##N##_##T,
|
||||||
#if HAS_HOTEND
|
#if HAS_HOTEND
|
||||||
constexpr uint16_t hpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND, PREHEAT_3_TEMP_HOTEND, PREHEAT_4_TEMP_HOTEND, PREHEAT_5_TEMP_HOTEND);
|
constexpr uint16_t hpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, TEMP_HOTEND) };
|
||||||
#endif
|
#endif
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
constexpr uint16_t bpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED, PREHEAT_3_TEMP_BED, PREHEAT_4_TEMP_BED, PREHEAT_5_TEMP_BED);
|
constexpr uint16_t bpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, TEMP_BED) };
|
||||||
#endif
|
#endif
|
||||||
#if HAS_FAN
|
#if HAS_FAN
|
||||||
constexpr uint8_t fpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED, PREHEAT_3_FAN_SPEED, PREHEAT_4_FAN_SPEED, PREHEAT_5_FAN_SPEED);
|
constexpr uint8_t fpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, FAN_SPEED) };
|
||||||
#endif
|
#endif
|
||||||
LOOP_L_N(i, PREHEAT_COUNT) {
|
LOOP_L_N(i, PREHEAT_COUNT) {
|
||||||
#if HAS_HOTEND
|
TERN_(HAS_HOTEND, ui.material_preset[i].hotend_temp = hpre[i]);
|
||||||
ui.material_preset[i].hotend_temp = hpre[i];
|
TERN_(HAS_HEATED_BED, ui.material_preset[i].bed_temp = bpre[i]);
|
||||||
#endif
|
TERN_(HAS_FAN, ui.material_preset[i].fan_speed = fpre[i]);
|
||||||
#if HAS_HEATED_BED
|
|
||||||
ui.material_preset[i].bed_temp = bpre[i];
|
|
||||||
#endif
|
|
||||||
#if HAS_FAN
|
|
||||||
ui.material_preset[i].fan_speed = fpre[i];
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
#include "env_validate.h"
|
#include "env_validate.h"
|
||||||
|
|
||||||
#define BOARD_INFO_NAME "Einsy Rambo"
|
#define BOARD_INFO_NAME "Einsy Rambo"
|
||||||
|
#define DEFAULT_MACHINE_NAME "Prusa MK3"
|
||||||
|
|
||||||
|
//#define MK3_FAN_PINS
|
||||||
|
|
||||||
//
|
//
|
||||||
// TMC2130 Configuration_adv defaults for EinsyRambo
|
// TMC2130 Configuration_adv defaults for EinsyRambo
|
||||||
@ -123,11 +126,19 @@
|
|||||||
#define HEATER_BED_PIN 4
|
#define HEATER_BED_PIN 4
|
||||||
|
|
||||||
#ifndef FAN_PIN
|
#ifndef FAN_PIN
|
||||||
|
#ifdef MK3_FAN_PINS
|
||||||
|
#define FAN_PIN 6
|
||||||
|
#else
|
||||||
#define FAN_PIN 8
|
#define FAN_PIN 8
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef FAN1_PIN
|
#ifndef FAN1_PIN
|
||||||
#define FAN1_PIN 6
|
#ifdef MK3_FAN_PINS
|
||||||
|
#define FAN_PIN -1
|
||||||
|
#else
|
||||||
|
#define FAN_PIN 6
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -192,3 +203,5 @@
|
|||||||
|
|
||||||
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
|
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||||
#endif // HAS_WIRED_LCD
|
#endif // HAS_WIRED_LCD
|
||||||
|
|
||||||
|
#undef MK3_FAN_PINS
|
||||||
|
Loading…
Reference in New Issue
Block a user