🚸 Update DWIN ProUI (#26003)
This commit is contained in:
parent
2218bab542
commit
858916d628
|
@ -310,8 +310,14 @@ void unified_bed_leveling::G29() {
|
||||||
// Check for commands that require the printer to be homed
|
// Check for commands that require the printer to be homed
|
||||||
if (may_move) {
|
if (may_move) {
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
// Send 'N' to force homing before G29 (internal only)
|
#if ALL(DWIN_LCD_PROUI, ZHOME_BEFORE_LEVELING)
|
||||||
if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
|
save_ubl_active_state_and_disable();
|
||||||
|
gcode.process_subcommands_now(F("G28Z"));
|
||||||
|
restore_ubl_active_state_and_leave();
|
||||||
|
#else
|
||||||
|
// Send 'N' to force homing before G29 (internal only)
|
||||||
|
if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
|
||||||
|
#endif
|
||||||
probe.use_probing_tool();
|
probe.use_probing_tool();
|
||||||
|
|
||||||
// Position bed horizontally and Z probe vertically.
|
// Position bed horizontally and Z probe vertically.
|
||||||
|
|
|
@ -144,7 +144,7 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_MARLINUI_MENU
|
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||||
|
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
#if ENABLED(HYBRID_THRESHOLD)
|
||||||
|
@ -207,7 +207,7 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_MARLINUI_MENU
|
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||||
|
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
#if ENABLED(HYBRID_THRESHOLD)
|
||||||
|
@ -269,7 +269,7 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_MARLINUI_MENU
|
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||||
|
|
||||||
#if ENABLED(HYBRID_THRESHOLD)
|
#if ENABLED(HYBRID_THRESHOLD)
|
||||||
|
@ -315,7 +315,7 @@ class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC266
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_MARLINUI_MENU
|
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||||
|
|
||||||
#if USE_SENSORLESS
|
#if USE_SENSORLESS
|
||||||
|
|
|
@ -49,28 +49,20 @@
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M73() {
|
void GcodeSuite::M73() {
|
||||||
|
|
||||||
#if ENABLED(DWIN_LCD_PROUI)
|
#if ENABLED(SET_PROGRESS_PERCENT)
|
||||||
|
if (parser.seenval('P'))
|
||||||
|
ui.set_progress((PROGRESS_SCALE) > 1
|
||||||
|
? parser.value_float() * (PROGRESS_SCALE)
|
||||||
|
: parser.value_byte()
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
DWIN_M73();
|
#if ENABLED(SET_REMAINING_TIME)
|
||||||
|
if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong());
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SET_PROGRESS_PERCENT)
|
|
||||||
if (parser.seenval('P'))
|
|
||||||
ui.set_progress((PROGRESS_SCALE) > 1
|
|
||||||
? parser.value_float() * (PROGRESS_SCALE)
|
|
||||||
: parser.value_byte()
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(SET_REMAINING_TIME)
|
|
||||||
if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(SET_INTERACTION_TIME)
|
|
||||||
if (parser.seenval('C')) ui.set_interaction_time(60 * parser.value_ulong());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#if ENABLED(SET_INTERACTION_TIME)
|
||||||
|
if (parser.seenval('C')) ui.set_interaction_time(60 * parser.value_ulong());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(M73_REPORT)
|
#if ENABLED(M73_REPORT)
|
||||||
|
|
|
@ -70,7 +70,9 @@ void GcodeSuite::G30() {
|
||||||
|
|
||||||
remember_feedrate_scaling_off();
|
remember_feedrate_scaling_off();
|
||||||
|
|
||||||
TERN_(DWIN_CREALITY_LCD_JYERSUI, process_subcommands_now(F("G28O")));
|
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||||
|
process_subcommands_now(F("G28O"));
|
||||||
|
#endif
|
||||||
|
|
||||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||||
|
|
||||||
|
|
|
@ -2718,14 +2718,18 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
#elif ENABLED(DWIN_LCD_PROUI)
|
#elif ENABLED(DWIN_LCD_PROUI)
|
||||||
#if !HAS_MEDIA
|
#if !HAS_MEDIA
|
||||||
#error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled."
|
#error "DWIN_LCD_PROUI requires SDSUPPORT to be enabled."
|
||||||
#elif ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
|
|
||||||
#error "DWIN_LCD_PROUI does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU."
|
|
||||||
#elif ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
|
|
||||||
#error "DWIN_LCD_PROUI does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU."
|
|
||||||
#elif ENABLED(LCD_BED_TRAMMING)
|
|
||||||
#error "DWIN_LCD_PROUI does not support LCD_BED_TRAMMING."
|
|
||||||
#elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY)
|
#elif ALL(LCD_BED_LEVELING, PROBE_MANUALLY)
|
||||||
#error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY."
|
#error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY."
|
||||||
|
#elif ENABLED(MEDIASORT_MENU_ITEM) && DISABLED(SDCARD_SORT_ALPHA)
|
||||||
|
#error "MEDIASORT_MENU_ITEM requires SDCARD_SORT_ALPHA."
|
||||||
|
#elif ENABLED(RUNOUT_TUNE_ITEM) && DISABLED(HAS_FILAMENT_SENSOR)
|
||||||
|
#error "RUNOUT_TUNE_ITEM requires HAS_FILAMENT_SENSOR."
|
||||||
|
#elif ENABLED(PLR_TUNE_ITEM) && DISABLED(POWER_LOSS_RECOVERY)
|
||||||
|
#error "PLR_TUNE_ITEM requires POWER_LOSS_RECOVERY."
|
||||||
|
#elif ENABLED(JD_TUNE_ITEM) && DISABLED(HAS_JUNCTION_DEVIATION)
|
||||||
|
#error "JD_TUNE_ITEM requires HAS_JUNCTION_DEVIATION."
|
||||||
|
#elif ENABLED(ADVK_TUNE_ITEM) && DISABLED(LIN_ADVANCE)
|
||||||
|
#error "ADVK_TUNE_ITEM requires LIN_ADVANCE."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,15 @@ typedef uint8_t fontid_t;
|
||||||
* 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28
|
* 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28
|
||||||
* 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64
|
* 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64
|
||||||
*/
|
*/
|
||||||
#define font6x12 0x00
|
#if DISABLED(TJC_DISPLAY)
|
||||||
|
#define font6x12 0x00
|
||||||
|
#define font20x40 0x06
|
||||||
|
#define font24x48 0x07
|
||||||
|
#define font28x56 0x08
|
||||||
|
#define font32x64 0x09
|
||||||
|
#endif
|
||||||
#define font8x16 0x01
|
#define font8x16 0x01
|
||||||
#define font10x20 0x02
|
#define font10x20 0x02
|
||||||
#define font12x24 0x03
|
#define font12x24 0x03
|
||||||
#define font14x28 0x04
|
#define font14x28 0x04
|
||||||
#define font16x32 0x05
|
#define font16x32 0x05
|
||||||
#define font20x40 0x06
|
|
||||||
#define font24x48 0x07
|
|
||||||
#define font28x56 0x08
|
|
||||||
#define font32x64 0x09
|
|
||||||
|
|
|
@ -91,4 +91,10 @@ constexpr xyze_float_t min_acceleration_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_A
|
||||||
|
|
||||||
constexpr xyze_float_t min_steps_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_STEPS_EDIT_VALUE),
|
constexpr xyze_float_t min_steps_edit_values = LOGICAL_AXIS_ARRAY_1(MIN_STEPS_EDIT_VALUE),
|
||||||
default_steps = DEFAULT_AXIS_STEPS_PER_UNIT,
|
default_steps = DEFAULT_AXIS_STEPS_PER_UNIT,
|
||||||
max_steps_edit_values = default_steps * float(DEFAULT_MAX_MULTIPLIER);
|
max_steps_edit_values =
|
||||||
|
#ifdef MAX_STEPS_EDIT_VALUES
|
||||||
|
MAX_STEPS_EDIT_VALUES
|
||||||
|
#else
|
||||||
|
default_steps * float(DEFAULT_MAX_MULTIPLIER)
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* Bed Level Tools for Pro UI
|
* Bed Level Tools for Pro UI
|
||||||
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 2.1.0
|
* Version: 3.2.0
|
||||||
* Date: 2022/08/27
|
* Date: 2023/05/03
|
||||||
*
|
*
|
||||||
* Based on the original work of: Henri-J-Norden
|
* Based on the original work of: Henri-J-Norden
|
||||||
* https://github.com/Jyers/Marlin/pull/126
|
* https://github.com/Jyers/Marlin/pull/126
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
BedLevelToolsClass bedLevelTools;
|
BedLevelToolsClass bedLevelTools;
|
||||||
|
|
||||||
#if ENABLED(USE_UBL_VIEWER)
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
bool BedLevelToolsClass::viewer_asymmetric_range = false;
|
bool BedLevelToolsClass::viewer_asymmetric_range = false;
|
||||||
bool BedLevelToolsClass::viewer_print_value = false;
|
bool BedLevelToolsClass::viewer_print_value = false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -170,15 +170,20 @@ void BedLevelToolsClass::MoveToZ() {
|
||||||
bedLevelTools.manual_move(bedLevelTools.mesh_x, bedLevelTools.mesh_y, true);
|
bedLevelTools.manual_move(bedLevelTools.mesh_x, bedLevelTools.mesh_y, true);
|
||||||
}
|
}
|
||||||
void BedLevelToolsClass::ProbeXY() {
|
void BedLevelToolsClass::ProbeXY() {
|
||||||
const uint16_t Clear = Z_CLEARANCE_DEPLOY_PROBE;
|
const uint16_t zclear = Z_CLEARANCE_DEPLOY_PROBE;
|
||||||
sprintf_P(cmd, PSTR("G28O\nG0Z%i\nG30X%sY%s"),
|
sprintf_P(cmd, PSTR("G0Z%i\nG30X%sY%s"),
|
||||||
Clear,
|
zclear,
|
||||||
dtostrf(bedlevel.get_mesh_x(bedLevelTools.mesh_x), 1, 2, str_1),
|
dtostrf(bedlevel.get_mesh_x(bedLevelTools.mesh_x), 1, 2, str_1),
|
||||||
dtostrf(bedlevel.get_mesh_y(bedLevelTools.mesh_y), 1, 2, str_2)
|
dtostrf(bedlevel.get_mesh_y(bedLevelTools.mesh_y), 1, 2, str_2)
|
||||||
);
|
);
|
||||||
gcode.process_subcommands_now(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BedLevelToolsClass::mesh_reset() {
|
||||||
|
ZERO(bedlevel.z_values);
|
||||||
|
TERN_(AUTO_BED_LEVELING_BILINEAR, bedlevel.refresh_bed_level());
|
||||||
|
}
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
float BedLevelToolsClass::get_max_value() {
|
float BedLevelToolsClass::get_max_value() {
|
||||||
float max = __FLT_MAX__ * -1;
|
float max = __FLT_MAX__ * -1;
|
||||||
|
@ -207,9 +212,11 @@ bool BedLevelToolsClass::meshvalidate() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(USE_UBL_VIEWER)
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
|
|
||||||
void BedLevelToolsClass::Draw_Bed_Mesh(int16_t selected /*= -1*/, uint8_t gridline_width /*= 1*/, uint16_t padding_x /*= 8*/, uint16_t padding_y_top /*= 40 + 53 - 7*/) {
|
constexpr uint8_t meshfont = TERN(TJC_DISPLAY, font8x16, font6x12);
|
||||||
|
|
||||||
|
void BedLevelToolsClass::Draw_Bed_Mesh(int16_t selected/*=-1*/, uint8_t gridline_width/*=1*/, uint16_t padding_x/*=8*/, uint16_t padding_y_top/*=(40 + 53 - 7)*/) {
|
||||||
drawing_mesh = true;
|
drawing_mesh = true;
|
||||||
const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x;
|
const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x;
|
||||||
const uint16_t cell_width_px = total_width_px / (GRID_MAX_POINTS_X);
|
const uint16_t cell_width_px = total_width_px / (GRID_MAX_POINTS_X);
|
||||||
|
@ -227,7 +234,6 @@ bool BedLevelToolsClass::meshvalidate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw value square grid
|
// Draw value square grid
|
||||||
char buf[8];
|
|
||||||
GRID_LOOP(x, y) {
|
GRID_LOOP(x, y) {
|
||||||
const auto start_x_px = padding_x + x * cell_width_px;
|
const auto start_x_px = padding_x + x * cell_width_px;
|
||||||
const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width;
|
const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width;
|
||||||
|
@ -246,20 +252,22 @@ bool BedLevelToolsClass::meshvalidate() {
|
||||||
LCD_SERIAL.flushTX();
|
LCD_SERIAL.flushTX();
|
||||||
|
|
||||||
// Draw value text on
|
// Draw value text on
|
||||||
|
char buf[8];
|
||||||
|
const uint8_t fs = DWINUI::fontWidth(meshfont);
|
||||||
if (viewer_print_value) {
|
if (viewer_print_value) {
|
||||||
int8_t offset_x, offset_y = cell_height_px / 2 - 6;
|
int8_t offset_x, offset_y = cell_height_px / 2 - fs;
|
||||||
if (isnan(bedlevel.z_values[x][y])) { // undefined
|
if (isnan(bedlevel.z_values[x][y])) { // undefined
|
||||||
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X"));
|
dwinDrawString(false, meshfont, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X"));
|
||||||
}
|
}
|
||||||
else { // has value
|
else { // has value
|
||||||
if (GRID_MAX_POINTS_X < 10)
|
if (GRID_MAX_POINTS_X < (ENABLED(TJC_DISPLAY) ? 8 : 10))
|
||||||
sprintf_P(buf, PSTR("%s"), dtostrf(abs(bedlevel.z_values[x][y]), 1, 2, str_1));
|
sprintf_P(buf, PSTR("%s"), dtostrf(abs(bedlevel.z_values[x][y]), 1, 2, str_1));
|
||||||
else
|
else
|
||||||
sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(bedlevel.z_values[x][y] - (int16_t)bedlevel.z_values[x][y]) * 100));
|
sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(bedlevel.z_values[x][y] - (int16_t)bedlevel.z_values[x][y]) * 100));
|
||||||
offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2;
|
offset_x = cell_width_px / 2 - (fs/2) * (strlen(buf)) - 2;
|
||||||
if (!(GRID_MAX_POINTS_X < 10))
|
if (!(GRID_MAX_POINTS_X < (ENABLED(TJC_DISPLAY) ? 8 : 10)))
|
||||||
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F("."));
|
dwinDrawString(false, meshfont, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y, F("."));
|
||||||
dwinDrawString(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf);
|
dwinDrawString(false, meshfont, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y, buf);
|
||||||
}
|
}
|
||||||
safe_delay(10);
|
safe_delay(10);
|
||||||
LCD_SERIAL.flushTX();
|
LCD_SERIAL.flushTX();
|
||||||
|
@ -286,6 +294,6 @@ bool BedLevelToolsClass::meshvalidate() {
|
||||||
drawing_mesh = false;
|
drawing_mesh = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_UBL_VIEWER
|
#endif // USE_GRID_MESHVIEWER
|
||||||
|
|
||||||
#endif // DWIN_LCD_PROUI && HAS_LEVELING
|
#endif // DWIN_LCD_PROUI && HAS_LEVELING
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* Bed Level Tools for Pro UI
|
* Bed Level Tools for Pro UI
|
||||||
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
* Extended by: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 2.1.0
|
* Version: 3.2.0
|
||||||
* Date: 2022/08/27
|
* Date: 2023/05/03
|
||||||
*
|
*
|
||||||
* Based on the original work of: Henri-J-Norden
|
* Based on the original work of: Henri-J-Norden
|
||||||
* https://github.com/Jyers/Marlin/pull/126
|
* https://github.com/Jyers/Marlin/pull/126
|
||||||
|
@ -47,14 +47,12 @@
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
|
||||||
//#define USE_UBL_VIEWER 1
|
|
||||||
|
|
||||||
#define UBL_Z_OFFSET_MIN -3.0
|
#define UBL_Z_OFFSET_MIN -3.0
|
||||||
#define UBL_Z_OFFSET_MAX 3.0
|
#define UBL_Z_OFFSET_MAX 3.0
|
||||||
|
|
||||||
class BedLevelToolsClass {
|
class BedLevelToolsClass {
|
||||||
public:
|
public:
|
||||||
#if ENABLED(USE_UBL_VIEWER)
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
static bool viewer_asymmetric_range;
|
static bool viewer_asymmetric_range;
|
||||||
static bool viewer_print_value;
|
static bool viewer_print_value;
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,11 +72,12 @@ public:
|
||||||
static void MoveToXY();
|
static void MoveToXY();
|
||||||
static void MoveToZ();
|
static void MoveToZ();
|
||||||
static void ProbeXY();
|
static void ProbeXY();
|
||||||
|
static void mesh_reset();
|
||||||
static float get_max_value();
|
static float get_max_value();
|
||||||
static float get_min_value();
|
static float get_min_value();
|
||||||
static bool meshvalidate();
|
static bool meshvalidate();
|
||||||
#if ENABLED(USE_UBL_VIEWER)
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7);
|
static void Draw_Bed_Mesh(int16_t selected=-1, uint8_t gridline_width=1, uint16_t padding_x=8, uint16_t padding_y_top=(40 + 53 - 7));
|
||||||
static void Set_Mesh_Viewer_Status();
|
static void Set_Mesh_Viewer_Status();
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -24,8 +24,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Enhanced implementation for PRO UI
|
* DWIN Enhanced implementation for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 3.21.2
|
* Version: 3.25.3
|
||||||
* Date: 2022/12/02
|
* Date: 2023/05/18
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
@ -79,7 +79,6 @@ enum processID : uint8_t {
|
||||||
|
|
||||||
enum tempcontrol_t : uint8_t {
|
enum tempcontrol_t : uint8_t {
|
||||||
#if DWIN_PID_TUNE
|
#if DWIN_PID_TUNE
|
||||||
PID_DONE,
|
|
||||||
PIDTEMP_START,
|
PIDTEMP_START,
|
||||||
PIDTEMPBED_START,
|
PIDTEMPBED_START,
|
||||||
PID_BAD_HEATER_ID,
|
PID_BAD_HEATER_ID,
|
||||||
|
@ -87,11 +86,11 @@ enum processID : uint8_t {
|
||||||
PID_TUNING_TIMEOUT,
|
PID_TUNING_TIMEOUT,
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(MPC_AUTOTUNE)
|
#if ENABLED(MPC_AUTOTUNE)
|
||||||
MPC_DONE,
|
|
||||||
MPCTEMP_START,
|
MPCTEMP_START,
|
||||||
MPC_TEMP_ERROR,
|
MPC_TEMP_ERROR,
|
||||||
MPC_INTERRUPTED
|
MPC_INTERRUPTED,
|
||||||
#endif
|
#endif
|
||||||
|
AUTOTUNE_DONE
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -141,6 +140,7 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool FullManualTramming = false;
|
bool FullManualTramming = false;
|
||||||
|
bool MediaSort = true;
|
||||||
bool MediaAutoMount = ENABLED(HAS_SD_EXTENDER);
|
bool MediaAutoMount = ENABLED(HAS_SD_EXTENDER);
|
||||||
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||||
uint8_t z_after_homing = DEF_Z_AFTER_HOMING;
|
uint8_t z_after_homing = DEF_Z_AFTER_HOMING;
|
||||||
|
@ -148,6 +148,8 @@ typedef struct {
|
||||||
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
|
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
|
||||||
LEDColor Led_Color = Def_Leds_Color;
|
LEDColor Led_Color = Def_Leds_Color;
|
||||||
#endif
|
#endif
|
||||||
|
bool AdaptiveStepSmoothing = true;
|
||||||
|
bool EnablePreview = true;
|
||||||
} HMI_data_t;
|
} HMI_data_t;
|
||||||
|
|
||||||
extern HMI_data_t HMI_data;
|
extern HMI_data_t HMI_data;
|
||||||
|
@ -155,8 +157,8 @@ static constexpr size_t eeprom_data_size = sizeof(HMI_data_t);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int8_t Color[3]; // Color components
|
int8_t Color[3]; // Color components
|
||||||
#if DWIN_PID_TUNE
|
#if ANY(DWIN_PID_TUNE, MPCTEMP)
|
||||||
tempcontrol_t pidresult = PID_DONE;
|
tempcontrol_t tempcontrol = AUTOTUNE_DONE;
|
||||||
#endif
|
#endif
|
||||||
uint8_t Select = 0; // Auxiliary selector variable
|
uint8_t Select = 0; // Auxiliary selector variable
|
||||||
AxisEnum axis = X_AXIS; // Axis Select
|
AxisEnum axis = X_AXIS; // Axis Select
|
||||||
|
@ -167,17 +169,13 @@ typedef struct {
|
||||||
bool printing_flag:1; // sd or host printing
|
bool printing_flag:1; // sd or host printing
|
||||||
bool abort_flag:1; // sd or host was aborted
|
bool abort_flag:1; // sd or host was aborted
|
||||||
bool pause_flag:1; // printing is paused
|
bool pause_flag:1; // printing is paused
|
||||||
bool percent_flag:1; // percent was override by M73
|
|
||||||
bool remain_flag:1; // remain was override by M73
|
|
||||||
bool select_flag:1; // Popup button selected
|
bool select_flag:1; // Popup button selected
|
||||||
bool home_flag:1; // homing in course
|
bool home_flag:1; // homing in course
|
||||||
bool heat_flag:1; // 0: heating done 1: during heating
|
|
||||||
} HMI_flag_t;
|
} HMI_flag_t;
|
||||||
|
|
||||||
extern HMI_value_t HMI_value;
|
extern HMI_value_t HMI_value;
|
||||||
extern HMI_flag_t hmiFlag;
|
extern HMI_flag_t hmiFlag;
|
||||||
extern uint8_t checkkey;
|
extern uint8_t checkkey;
|
||||||
extern millis_t dwin_heat_time;
|
|
||||||
|
|
||||||
// Popups
|
// Popups
|
||||||
#if HAS_HOTEND || HAS_HEATED_BED
|
#if HAS_HOTEND || HAS_HEATED_BED
|
||||||
|
@ -206,12 +204,6 @@ void AutoHome();
|
||||||
REPEAT_1(PREHEAT_COUNT, _DOPREHEAT)
|
REPEAT_1(PREHEAT_COUNT, _DOPREHEAT)
|
||||||
#endif
|
#endif
|
||||||
void DoCoolDown();
|
void DoCoolDown();
|
||||||
#if ENABLED(PIDTEMP)
|
|
||||||
void HotendPID();
|
|
||||||
#endif
|
|
||||||
#if ENABLED(PIDTEMPBED)
|
|
||||||
void BedPID();
|
|
||||||
#endif
|
|
||||||
#if ENABLED(BAUD_RATE_GCODE)
|
#if ENABLED(BAUD_RATE_GCODE)
|
||||||
void HMI_SetBaudRate();
|
void HMI_SetBaudRate();
|
||||||
void SetBaud115K();
|
void SetBaud115K();
|
||||||
|
@ -236,7 +228,7 @@ void ParkHead();
|
||||||
#if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
|
#if ENABLED(HOST_SHUTDOWN_MENU_ITEM) && defined(SHUTDOWN_ACTION)
|
||||||
void HostShutDown();
|
void HostShutDown();
|
||||||
#endif
|
#endif
|
||||||
#if !HAS_BED_PROBE
|
#if DISABLED(HAS_BED_PROBE)
|
||||||
void HomeZandDisable();
|
void HomeZandDisable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -252,7 +244,6 @@ void DWIN_DrawStatusLine(const char *text = ""); // Draw simple status text
|
||||||
void DWIN_RedrawDash(); // Redraw Dash and Status line
|
void DWIN_RedrawDash(); // Redraw Dash and Status line
|
||||||
void DWIN_RedrawScreen(); // Redraw all screen elements
|
void DWIN_RedrawScreen(); // Redraw all screen elements
|
||||||
void HMI_MainMenu(); // Main process screen
|
void HMI_MainMenu(); // Main process screen
|
||||||
void HMI_SelectFile(); // File page
|
|
||||||
void HMI_Printing(); // Print page
|
void HMI_Printing(); // Print page
|
||||||
void HMI_ReturnScreen(); // Return to previous screen before popups
|
void HMI_ReturnScreen(); // Return to previous screen before popups
|
||||||
void HMI_WaitForUser();
|
void HMI_WaitForUser();
|
||||||
|
@ -278,10 +269,8 @@ void DWIN_Print_Aborted();
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if HAS_FILAMENT_SENSOR
|
||||||
void DWIN_FilamentRunout(const uint8_t extruder);
|
void DWIN_FilamentRunout(const uint8_t extruder);
|
||||||
#endif
|
#endif
|
||||||
void DWIN_M73();
|
|
||||||
void DWIN_Print_Header(const char *text);
|
void DWIN_Print_Header(const char *text);
|
||||||
void DWIN_SetColorDefaults();
|
void DWIN_SetColorDefaults();
|
||||||
void DWIN_ApplyColor();
|
|
||||||
void DWIN_CopySettingsTo(char * const buff);
|
void DWIN_CopySettingsTo(char * const buff);
|
||||||
void DWIN_CopySettingsFrom(const char * const buff);
|
void DWIN_CopySettingsFrom(const char * const buff);
|
||||||
void DWIN_SetDataDefaults();
|
void DWIN_SetDataDefaults();
|
||||||
|
@ -291,7 +280,6 @@ void DWIN_RebootScreen();
|
||||||
void DWIN_Popup_Pause(FSTR_P const fmsg, uint8_t button=0);
|
void DWIN_Popup_Pause(FSTR_P const fmsg, uint8_t button=0);
|
||||||
void Draw_Popup_FilamentPurge();
|
void Draw_Popup_FilamentPurge();
|
||||||
void Goto_FilamentPurge();
|
void Goto_FilamentPurge();
|
||||||
void HMI_FilamentPurge();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Utility and extensions
|
// Utility and extensions
|
||||||
|
@ -331,8 +319,6 @@ void Draw_FilSet_Menu();
|
||||||
void Draw_ParkPos_Menu();
|
void Draw_ParkPos_Menu();
|
||||||
#endif
|
#endif
|
||||||
void Draw_PhySet_Menu();
|
void Draw_PhySet_Menu();
|
||||||
void Draw_SelectColors_Menu();
|
|
||||||
void Draw_GetColor_Menu();
|
|
||||||
#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
|
#if ALL(CASE_LIGHT_MENU, CASELIGHT_USES_BRIGHTNESS)
|
||||||
void Draw_CaseLight_Menu();
|
void Draw_CaseLight_Menu();
|
||||||
#endif
|
#endif
|
||||||
|
@ -369,16 +355,36 @@ void Draw_Steps_Menu();
|
||||||
void Draw_EditMesh_Menu();
|
void Draw_EditMesh_Menu();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if HAS_TRINAMIC_CONFIG
|
||||||
|
void Draw_TrinamicConfig_menu();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Custom colors editing
|
||||||
|
#if HAS_CUSTOM_COLORS
|
||||||
|
void DWIN_ApplyColor();
|
||||||
|
void Draw_SelectColors_Menu();
|
||||||
|
void Draw_GetColor_Menu();
|
||||||
|
#endif
|
||||||
|
|
||||||
// PID
|
// PID
|
||||||
#if DWIN_PID_TUNE
|
#if DWIN_PID_TUNE
|
||||||
#include "../../../module/temperature.h"
|
#include "../../../module/temperature.h"
|
||||||
void DWIN_StartM303(const bool seenC, const int c, const bool seenS, const heater_id_t hid, const celsius_t temp);
|
void DWIN_StartM303(const bool seenC, const int c, const bool seenS, const heater_id_t hid, const celsius_t temp);
|
||||||
void DWIN_PidTuning(tempcontrol_t result);
|
void DWIN_PidTuning(tempcontrol_t result);
|
||||||
#if ENABLED(PIDTEMP)
|
#endif
|
||||||
|
#if ENABLED(PIDTEMP)
|
||||||
|
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||||
|
void HotendPID();
|
||||||
|
#endif
|
||||||
|
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||||
void Draw_HotendPID_Menu();
|
void Draw_HotendPID_Menu();
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(PIDTEMPBED)
|
#endif
|
||||||
|
#if ENABLED(PIDTEMPBED)
|
||||||
|
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||||
|
void BedPID();
|
||||||
|
#endif
|
||||||
|
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||||
void Draw_BedPID_Menu();
|
void Draw_BedPID_Menu();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Enhanced implementation for PRO UI
|
* DWIN Enhanced implementation for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 3.10.1
|
* Version: 3.12.1
|
||||||
* Date: 2022/03/06
|
* Date: 2023/01/22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -134,6 +134,26 @@ void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Draw an Icon from SRAM without background transparency for DACAI Screens support
|
||||||
|
void DACAI_ICON_Show(uint16_t x, uint16_t y, uint16_t addr) {
|
||||||
|
NOMORE(x, DWIN_WIDTH - 1);
|
||||||
|
NOMORE(y, DWIN_HEIGHT - 1);
|
||||||
|
size_t i = 0;
|
||||||
|
dwinByte(i, 0x70);
|
||||||
|
dwinWord(i, x);
|
||||||
|
dwinWord(i, y);
|
||||||
|
dwinWord(i, addr);
|
||||||
|
dwinSend(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dwinIconShow(uint16_t x, uint16_t y, uint16_t addr) {
|
||||||
|
#if ENABLED(DACAI_DISPLAY)
|
||||||
|
DACAI_ICON_Show(x, y, addr);
|
||||||
|
#else
|
||||||
|
dwinIconShow(0, 0, 1, x, y, addr);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Write the contents of the 32KB SRAM data memory into the designated image memory space.
|
// Write the contents of the 32KB SRAM data memory into the designated image memory space.
|
||||||
// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes
|
// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes
|
||||||
void DWIN_SRAMToPic(uint8_t picID) {
|
void DWIN_SRAMToPic(uint8_t picID) {
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Enhanced implementation for PRO UI
|
* DWIN Enhanced implementation for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 3.10.1
|
* Version: 3.12.1
|
||||||
* Date: 2022/03/06
|
* Date: 2023/01/22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common/dwin_api.h"
|
#include "../common/dwin_api.h"
|
||||||
|
@ -71,6 +71,11 @@ void DWIN_Frame_AreaCopy(bool IBD, bool BIR, bool BFI, uint8_t cacheID, uint16_t
|
||||||
// data: address of the buffer with data
|
// data: address of the buffer with data
|
||||||
void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data);
|
void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data);
|
||||||
|
|
||||||
|
// Draw an Icon from SRAM
|
||||||
|
// x/y: Upper-left point
|
||||||
|
// addr: SRAM address
|
||||||
|
void dwinIconShow(uint16_t x, uint16_t y, uint16_t addr);
|
||||||
|
|
||||||
// Write the contents of the 32KB SRAM data memory into the designated image memory space.
|
// Write the contents of the 32KB SRAM data memory into the designated image memory space.
|
||||||
// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes
|
// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes
|
||||||
void DWIN_SRAMToPic(uint8_t picID);
|
void DWIN_SRAMToPic(uint8_t picID);
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Enhanced implementation for PRO UI
|
* DWIN Enhanced implementation for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 3.20.1
|
* Version: 3.21.1
|
||||||
* Date: 2022/10/25
|
* Date: 2023/03/21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
#if ENABLED(DWIN_LCD_PROUI)
|
#if ENABLED(DWIN_LCD_PROUI)
|
||||||
|
|
||||||
#include "dwin_defines.h"
|
#include "dwin_defines.h"
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
#include "dwinui.h"
|
||||||
|
|
||||||
xy_int_t DWINUI::cursor = { 0 };
|
xy_int_t DWINUI::cursor = { 0 };
|
||||||
|
@ -60,16 +59,18 @@ void DWINUI::setFont(fontid_t fid) { fontid = fid; }
|
||||||
// Get font character width
|
// Get font character width
|
||||||
uint8_t DWINUI::fontWidth(fontid_t fid) {
|
uint8_t DWINUI::fontWidth(fontid_t fid) {
|
||||||
switch (fid) {
|
switch (fid) {
|
||||||
case font6x12 : return 6;
|
#if DISABLED(TJC_DISPLAY)
|
||||||
|
case font6x12 : return 6;
|
||||||
|
case font20x40: return 20;
|
||||||
|
case font24x48: return 24;
|
||||||
|
case font28x56: return 28;
|
||||||
|
case font32x64: return 32;
|
||||||
|
#endif
|
||||||
case font8x16 : return 8;
|
case font8x16 : return 8;
|
||||||
case font10x20: return 10;
|
case font10x20: return 10;
|
||||||
case font12x24: return 12;
|
case font12x24: return 12;
|
||||||
case font14x28: return 14;
|
case font14x28: return 14;
|
||||||
case font16x32: return 16;
|
case font16x32: return 16;
|
||||||
case font20x40: return 20;
|
|
||||||
case font24x48: return 24;
|
|
||||||
case font28x56: return 28;
|
|
||||||
case font32x64: return 32;
|
|
||||||
default: return 0;
|
default: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,16 +78,18 @@ uint8_t DWINUI::fontWidth(fontid_t fid) {
|
||||||
// Get font character height
|
// Get font character height
|
||||||
uint8_t DWINUI::fontHeight(fontid_t fid) {
|
uint8_t DWINUI::fontHeight(fontid_t fid) {
|
||||||
switch (fid) {
|
switch (fid) {
|
||||||
|
#if DISABLED(TJC_DISPLAY)
|
||||||
case font6x12 : return 12;
|
case font6x12 : return 12;
|
||||||
|
case font20x40: return 40;
|
||||||
|
case font24x48: return 48;
|
||||||
|
case font28x56: return 56;
|
||||||
|
case font32x64: return 64;
|
||||||
|
#endif
|
||||||
case font8x16 : return 16;
|
case font8x16 : return 16;
|
||||||
case font10x20: return 20;
|
case font10x20: return 20;
|
||||||
case font12x24: return 24;
|
case font12x24: return 24;
|
||||||
case font14x28: return 28;
|
case font14x28: return 28;
|
||||||
case font16x32: return 32;
|
case font16x32: return 32;
|
||||||
case font20x40: return 40;
|
|
||||||
case font24x48: return 48;
|
|
||||||
case font28x56: return 56;
|
|
||||||
case font32x64: return 64;
|
|
||||||
default: return 0;
|
default: return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,15 +264,13 @@ void DWINUI::Draw_Circle(uint16_t color, uint16_t x, uint16_t y, uint8_t r) {
|
||||||
// y: ordinate of the center of the circle
|
// y: ordinate of the center of the circle
|
||||||
// r: circle radius
|
// r: circle radius
|
||||||
void DWINUI::Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) {
|
void DWINUI::Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) {
|
||||||
int a = 0, b = 0;
|
dwinDrawLine(bcolor, x - r, y, x + r, y);
|
||||||
while (a <= b) {
|
uint16_t b = 1;
|
||||||
b = SQRT(sq(r) - sq(a)); // b=sqrt(r*r-a*a);
|
while (b <= r) {
|
||||||
if (a == 0) b--;
|
uint16_t a = SQRT(sq(r) - sq(b));
|
||||||
dwinDrawLine(bcolor, x-b,y-a,x+b,y-a);
|
dwinDrawLine(bcolor, x - a, y + b, x + a, y + b);
|
||||||
dwinDrawLine(bcolor, x-a,y-b,x+a,y-b);
|
dwinDrawLine(bcolor, x - a, y - b, x + a, y - b);
|
||||||
dwinDrawLine(bcolor, x-b,y+a,x+b,y+a);
|
b += TERN(TJC_DISPLAY, 2, 1);
|
||||||
dwinDrawLine(bcolor, x-a,y+b,x+a,y+b);
|
|
||||||
a++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Enhanced implementation for PRO UI
|
* DWIN Enhanced implementation for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 3.18.1
|
* Version: 3.21.1
|
||||||
* Date: 2022/07/05
|
* Date: 2023/03/21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -68,7 +68,8 @@
|
||||||
#define ICON_HomeOffsetY ICON_StepY
|
#define ICON_HomeOffsetY ICON_StepY
|
||||||
#define ICON_HomeOffsetZ ICON_StepZ
|
#define ICON_HomeOffsetZ ICON_StepZ
|
||||||
#define ICON_HSMode ICON_StockConfiguration
|
#define ICON_HSMode ICON_StockConfiguration
|
||||||
#define ICON_InvertE0 ICON_StepE
|
#define ICON_InputShaping ICON_MaxAccelerated
|
||||||
|
#define ICON_JDmm ICON_MaxJerk
|
||||||
#define ICON_Tram ICON_SetEndTemp
|
#define ICON_Tram ICON_SetEndTemp
|
||||||
#define ICON_Level ICON_HotendTemp
|
#define ICON_Level ICON_HotendTemp
|
||||||
#define ICON_Lock ICON_Cool
|
#define ICON_Lock ICON_Cool
|
||||||
|
@ -82,6 +83,7 @@
|
||||||
#define ICON_MeshEditZ ICON_MoveZ
|
#define ICON_MeshEditZ ICON_MoveZ
|
||||||
#define ICON_MeshNext ICON_Axis
|
#define ICON_MeshNext ICON_Axis
|
||||||
#define ICON_MeshPoints ICON_SetEndTemp
|
#define ICON_MeshPoints ICON_SetEndTemp
|
||||||
|
#define ICON_MeshReset ICON_StockConfiguration
|
||||||
#define ICON_MeshSave ICON_WriteEEPROM
|
#define ICON_MeshSave ICON_WriteEEPROM
|
||||||
#define ICON_MeshViewer ICON_HotendTemp
|
#define ICON_MeshViewer ICON_HotendTemp
|
||||||
#define ICON_MoveZ0 ICON_HotendTemp
|
#define ICON_MoveZ0 ICON_HotendTemp
|
||||||
|
@ -132,8 +134,14 @@
|
||||||
#define ICON_SetPreheat8 ICON_SetCustomPreheat
|
#define ICON_SetPreheat8 ICON_SetCustomPreheat
|
||||||
#define ICON_SetPreheat9 ICON_SetCustomPreheat
|
#define ICON_SetPreheat9 ICON_SetCustomPreheat
|
||||||
#define ICON_SetPreheat10 ICON_SetCustomPreheat
|
#define ICON_SetPreheat10 ICON_SetCustomPreheat
|
||||||
|
#define ICON_ShapingX ICON_MoveX
|
||||||
|
#define ICON_ShapingY ICON_MoveY
|
||||||
#define ICON_Sound ICON_Cool
|
#define ICON_Sound ICON_Cool
|
||||||
#define ICON_TBSetup ICON_Contact
|
#define ICON_TMCSet ICON_PrintSize
|
||||||
|
#define ICON_TMCXSet ICON_MoveX
|
||||||
|
#define ICON_TMCYSet ICON_MoveY
|
||||||
|
#define ICON_TMCZSet ICON_MoveZ
|
||||||
|
#define ICON_TMCESet ICON_Extruder
|
||||||
#define ICON_UBLActive ICON_HotendTemp
|
#define ICON_UBLActive ICON_HotendTemp
|
||||||
#define ICON_UBLActive ICON_HotendTemp
|
#define ICON_UBLActive ICON_HotendTemp
|
||||||
#define ICON_UBLSlot ICON_ResumeEEPROM
|
#define ICON_UBLSlot ICON_ResumeEEPROM
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Endstops diagnostic page for PRO UI
|
* DWIN Endstops diagnostic page for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 1.3.3
|
* Version: 1.4.3
|
||||||
* Date: 2022/10/07
|
* Date: 2023/05/10
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -35,10 +35,8 @@
|
||||||
|
|
||||||
#include "../../../core/types.h"
|
#include "../../../core/types.h"
|
||||||
#include "../../marlinui.h"
|
#include "../../marlinui.h"
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin_popup.h"
|
|
||||||
#include "dwin.h"
|
#include "dwin.h"
|
||||||
|
#include "dwin_popup.h"
|
||||||
|
|
||||||
#if HAS_FILAMENT_SENSOR
|
#if HAS_FILAMENT_SENSOR
|
||||||
#include "../../../feature/runout.h"
|
#include "../../../feature/runout.h"
|
||||||
|
|
|
@ -24,14 +24,14 @@
|
||||||
/**
|
/**
|
||||||
* DWIN End Stops diagnostic page for PRO UI
|
* DWIN End Stops diagnostic page for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 1.3.2
|
* Version: 1.4.3
|
||||||
* Date: 2022/10/07
|
* Date: 2023/05/10
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ESDiagClass {
|
class ESDiagClass {
|
||||||
public:
|
public:
|
||||||
void Draw();
|
static void Draw();
|
||||||
void Update();
|
static void Update();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ESDiagClass ESDiag;
|
extern ESDiagClass ESDiag;
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* DWIN G-code thumbnail preview
|
* DWIN G-code thumbnail preview
|
||||||
* Author: Miguel A. Risco-Castillo
|
* Author: Miguel A. Risco-Castillo
|
||||||
* version: 3.1.2
|
* version: 3.3.2
|
||||||
* Date: 2022/09/03
|
* Date: 2023/06/18
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -35,13 +35,14 @@
|
||||||
#include "../../marlinui.h"
|
#include "../../marlinui.h"
|
||||||
#include "../../../sd/cardreader.h"
|
#include "../../../sd/cardreader.h"
|
||||||
#include "../../../MarlinCore.h" // for wait_for_user
|
#include "../../../MarlinCore.h" // for wait_for_user
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin.h"
|
#include "dwin.h"
|
||||||
#include "dwin_popup.h"
|
#include "dwin_popup.h"
|
||||||
#include "base64.hpp"
|
#include "base64.hpp"
|
||||||
#include "gcode_preview.h"
|
#include "gcode_preview.h"
|
||||||
|
|
||||||
|
#define THUMBWIDTH 230
|
||||||
|
#define THUMBHEIGHT 180
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[13] = ""; //8.3 + null
|
char name[13] = ""; //8.3 + null
|
||||||
uint32_t thumbstart = 0;
|
uint32_t thumbstart = 0;
|
||||||
|
@ -104,7 +105,7 @@ void Get_Value(char *buf, const char * const key, float &value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Has_Preview() {
|
bool Has_Preview() {
|
||||||
const char * tbstart = "; thumbnail begin 230x180";
|
const char * tbstart = "; thumbnail begin " STRINGIFY(THUMBWIDTH) "x" STRINGIFY(THUMBHEIGHT);
|
||||||
char * posptr = 0;
|
char * posptr = 0;
|
||||||
uint8_t nbyte = 1;
|
uint8_t nbyte = 1;
|
||||||
uint32_t indx = 0;
|
uint32_t indx = 0;
|
||||||
|
@ -187,6 +188,8 @@ bool Has_Preview() {
|
||||||
card.closefile();
|
card.closefile();
|
||||||
buf64[readed] = 0;
|
buf64[readed] = 0;
|
||||||
|
|
||||||
|
fileprop.thumbwidth = THUMBWIDTH;
|
||||||
|
fileprop.thumbheight = THUMBHEIGHT;
|
||||||
fileprop.thumbsize = decode_base64(buf64, fileprop.thumbdata); card.closefile();
|
fileprop.thumbsize = decode_base64(buf64, fileprop.thumbdata); card.closefile();
|
||||||
DWINUI::WriteToSRAM(0x00, fileprop.thumbsize, fileprop.thumbdata);
|
DWINUI::WriteToSRAM(0x00, fileprop.thumbsize, fileprop.thumbdata);
|
||||||
delete[] fileprop.thumbdata;
|
delete[] fileprop.thumbdata;
|
||||||
|
@ -218,7 +221,7 @@ void Preview_DrawFromSD() {
|
||||||
}
|
}
|
||||||
DWINUI::Draw_Button(BTN_Print, 26, 290);
|
DWINUI::Draw_Button(BTN_Print, 26, 290);
|
||||||
DWINUI::Draw_Button(BTN_Cancel, 146, 290);
|
DWINUI::Draw_Button(BTN_Cancel, 146, 290);
|
||||||
dwinIconShow(0, 0, 1, 21, 90, 0x00);
|
Preview_Show();
|
||||||
Draw_Select_Highlight(true, 290);
|
Draw_Select_Highlight(true, 290);
|
||||||
dwinUpdateLCD();
|
dwinUpdateLCD();
|
||||||
}
|
}
|
||||||
|
@ -229,15 +232,17 @@ void Preview_DrawFromSD() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preview_Invalidate() {
|
void Preview_Invalidate() {
|
||||||
fileprop.thumbstart = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Preview_Valid() {
|
|
||||||
return !!fileprop.thumbstart;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Preview_Reset() {
|
|
||||||
fileprop.thumbsize = 0;
|
fileprop.thumbsize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Preview_Valid() {
|
||||||
|
return !!fileprop.thumbsize;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Preview_Show() {
|
||||||
|
const uint8_t xpos = (DWIN_WIDTH - fileprop.thumbwidth) / 2;
|
||||||
|
const uint8_t ypos = (205 - fileprop.thumbheight) / 2 + 87;
|
||||||
|
dwinIconShow(xpos, ypos, 0x00);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // HAS_GCODE_PREVIEW && DWIN_LCD_PROUI
|
#endif // HAS_GCODE_PREVIEW && DWIN_LCD_PROUI
|
||||||
|
|
|
@ -31,4 +31,4 @@
|
||||||
void Preview_DrawFromSD();
|
void Preview_DrawFromSD();
|
||||||
void Preview_Invalidate();
|
void Preview_Invalidate();
|
||||||
bool Preview_Valid();
|
bool Preview_Valid();
|
||||||
void Preview_Reset();
|
void Preview_Show();
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* Menu functions for ProUI
|
* Menu functions for ProUI
|
||||||
* Author: Miguel A. Risco-Castillo
|
* Author: Miguel A. Risco-Castillo
|
||||||
* Version: 1.9.1
|
* Version: 1.10.1
|
||||||
* Date: 2022/12/02
|
* Date: 2022/05/01
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -32,8 +32,6 @@
|
||||||
#if ENABLED(DWIN_LCD_PROUI)
|
#if ENABLED(DWIN_LCD_PROUI)
|
||||||
|
|
||||||
#include "../common/encoder.h"
|
#include "../common/encoder.h"
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin.h"
|
#include "dwin.h"
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
|
||||||
|
@ -58,11 +56,6 @@ void Draw_Title(TitleClass* title) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw_Menu(MenuClass* menu) {
|
|
||||||
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
|
|
||||||
dwinDrawRectangle(1, DWINUI::backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Draw_Menu_Cursor(const int8_t line) {
|
void Draw_Menu_Cursor(const int8_t line) {
|
||||||
const uint16_t ypos = MYPOS(line);
|
const uint16_t ypos = MYPOS(line);
|
||||||
DWINUI::Draw_Box(1, HMI_data.Cursor_Color, {0, ypos, 15, MLINE - 1});
|
DWINUI::Draw_Box(1, HMI_data.Cursor_Color, {0, ypos, 15, MLINE - 1});
|
||||||
|
@ -79,7 +72,7 @@ void Erase_Menu_Text(const int8_t line) {
|
||||||
DWINUI::Draw_Box(1, HMI_data.Background_Color, {LBLX, ypos, DWIN_WIDTH - LBLX, MLINE - 2});
|
DWINUI::Draw_Box(1, HMI_data.Background_Color, {LBLX, ypos, DWIN_WIDTH - LBLX, MLINE - 2});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw_Menu_Line(const uint8_t line, const uint8_t icon /*=0*/, const char * const label /*=nullptr*/, bool more /*=false*/, bool selected /*=false*/) {
|
void Draw_Menu_Line(const uint8_t line, const uint8_t icon/*=0*/, const char * const label/*=nullptr*/, bool more/*=false*/, bool selected/*=false*/) {
|
||||||
if (icon) DWINUI::Draw_Icon(icon, ICOX, MBASE(line) - 3);
|
if (icon) DWINUI::Draw_Icon(icon, ICOX, MBASE(line) - 3);
|
||||||
if (label) DWINUI::Draw_String(LBLX, MBASE(line) - 1, (char*)label);
|
if (label) DWINUI::Draw_String(LBLX, MBASE(line) - 1, (char*)label);
|
||||||
if (more) DWINUI::Draw_Icon(ICON_More, VALX + 16, MBASE(line) - 3);
|
if (more) DWINUI::Draw_Icon(ICON_More, VALX + 16, MBASE(line) - 3);
|
||||||
|
@ -87,7 +80,7 @@ void Draw_Menu_Line(const uint8_t line, const uint8_t icon /*=0*/, const char *
|
||||||
dwinDrawHLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240);
|
dwinDrawHLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw_Menu_Line(const uint8_t line, const uint8_t icon /*=0*/, FSTR_P label /*=nullptr*/, bool more /*=false*/, bool selected /*=false*/) {
|
void Draw_Menu_Line(const uint8_t line, const uint8_t icon/*=0*/, FSTR_P label/*=nullptr*/, bool more/*=false*/, bool selected/*=false*/) {
|
||||||
Draw_Menu_Line(line, icon, FTOP(label), more, selected);
|
Draw_Menu_Line(line, icon, FTOP(label), more, selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +99,7 @@ void Toggle_Chkb_Line(bool &checked) {
|
||||||
Show_Chkb_Line(checked);
|
Show_Chkb_Line(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const int32_t value /*=0*/) {
|
void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const int32_t value/*=0*/) {
|
||||||
DWINUI::Draw_Signed_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value);
|
DWINUI::Draw_Signed_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +182,7 @@ void DrawItemEdit(const bool selected) {
|
||||||
// val: value / scaled value
|
// val: value / scaled value
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
checkkey = process;
|
checkkey = process;
|
||||||
MenuData.MinValue = lo;
|
MenuData.MinValue = lo;
|
||||||
MenuData.MaxValue = hi;
|
MenuData.MaxValue = hi;
|
||||||
|
@ -207,7 +200,7 @@ void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp,
|
||||||
// val: value
|
// val: value
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
SetOnClick(process, lo, hi, 0, val, Apply, LiveUpdate);
|
SetOnClick(process, lo, hi, 0, val, Apply, LiveUpdate);
|
||||||
DrawItemEdit(true);
|
DrawItemEdit(true);
|
||||||
}
|
}
|
||||||
|
@ -219,7 +212,7 @@ void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const
|
||||||
// val: value
|
// val: value
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
const int32_t value = round(val * POW(10, dp));
|
const int32_t value = round(val * POW(10, dp));
|
||||||
SetOnClick(process, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate);
|
SetOnClick(process, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate);
|
||||||
DrawItemEdit(true);
|
DrawItemEdit(true);
|
||||||
|
@ -231,7 +224,7 @@ void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp
|
||||||
// val: value
|
// val: value
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
SetValueOnClick(SetInt, lo, hi, val, Apply, LiveUpdate);
|
SetValueOnClick(SetInt, lo, hi, val, Apply, LiveUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +233,7 @@ void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (
|
||||||
// hi: high limit
|
// hi: high limit
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
MenuData.P_Int = (int16_t*)static_cast<MenuItemPtrClass*>(CurrentMenu->SelectedItem())->value;
|
MenuData.P_Int = (int16_t*)static_cast<MenuItemPtrClass*>(CurrentMenu->SelectedItem())->value;
|
||||||
const int32_t value = *MenuData.P_Int;
|
const int32_t value = *MenuData.P_Int;
|
||||||
SetValueOnClick(SetPInt, lo, hi, value, Apply, LiveUpdate);
|
SetValueOnClick(SetPInt, lo, hi, value, Apply, LiveUpdate);
|
||||||
|
@ -252,7 +245,7 @@ void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() /*= null
|
||||||
// hi: high limit
|
// hi: high limit
|
||||||
// dp: decimal places
|
// dp: decimal places
|
||||||
// val: value
|
// val: value
|
||||||
void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
SetValueOnClick(SetFloat, lo, hi, dp, val, Apply, LiveUpdate);
|
SetValueOnClick(SetFloat, lo, hi, dp, val, Apply, LiveUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +254,7 @@ void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val
|
||||||
// hi: high limit
|
// hi: high limit
|
||||||
// LiveUpdate: live update function when the encoder changes
|
// LiveUpdate: live update function when the encoder changes
|
||||||
// Apply: update function when the encoder is pressed
|
// Apply: update function when the encoder is pressed
|
||||||
void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)() /*= nullptr*/, void (*LiveUpdate)() /*= nullptr*/) {
|
void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)()/*=nullptr*/, void (*LiveUpdate)()/*=nullptr*/) {
|
||||||
MenuData.P_Float = (float*)static_cast<MenuItemPtrClass*>(CurrentMenu->SelectedItem())->value;
|
MenuData.P_Float = (float*)static_cast<MenuItemPtrClass*>(CurrentMenu->SelectedItem())->value;
|
||||||
SetValueOnClick(SetPFloat, lo, hi, dp, *MenuData.P_Float, Apply, LiveUpdate);
|
SetValueOnClick(SetPFloat, lo, hi, dp, *MenuData.P_Float, Apply, LiveUpdate);
|
||||||
}
|
}
|
||||||
|
@ -290,7 +283,7 @@ int8_t HMI_Get(bool draw) {
|
||||||
const int32_t lo = MenuData.MinValue;
|
const int32_t lo = MenuData.MinValue;
|
||||||
const int32_t hi = MenuData.MaxValue;
|
const int32_t hi = MenuData.MaxValue;
|
||||||
const int32_t cval = MenuData.Value;
|
const int32_t cval = MenuData.Value;
|
||||||
EncoderState encoder_diffState = get_encoder_state();
|
EncoderState encoder_diffState = TERN(SMOOTH_ENCODER_MENUITEMS, get_encoder_state(), encoderReceiveAnalyze());
|
||||||
if (encoder_diffState != ENCODER_DIFF_NO) {
|
if (encoder_diffState != ENCODER_DIFF_NO) {
|
||||||
if (applyEncoder(encoder_diffState, MenuData.Value)) {
|
if (applyEncoder(encoder_diffState, MenuData.Value)) {
|
||||||
encoderRate.enabled = false;
|
encoderRate.enabled = false;
|
||||||
|
@ -354,7 +347,8 @@ MenuClass::MenuClass() {
|
||||||
|
|
||||||
void MenuClass::draw() {
|
void MenuClass::draw() {
|
||||||
MenuTitle.draw();
|
MenuTitle.draw();
|
||||||
Draw_Menu(this);
|
DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color, HMI_data.StatusBg_Color);
|
||||||
|
dwinDrawRectangle(1, DWINUI::backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1);
|
||||||
for (int8_t i = 0; i < MenuItemCount; i++)
|
for (int8_t i = 0; i < MenuItemCount; i++)
|
||||||
MenuItems[i]->draw(i - topline);
|
MenuItems[i]->draw(i - topline);
|
||||||
Draw_Menu_Cursor(line());
|
Draw_Menu_Cursor(line());
|
||||||
|
@ -407,7 +401,7 @@ void CustomMenuItemClass::draw(int8_t line) {
|
||||||
if (onDraw != nullptr) (*onDraw)(static_cast<MenuItemClass*>(this), line);
|
if (onDraw != nullptr) (*onDraw)(static_cast<MenuItemClass*>(this), line);
|
||||||
};
|
};
|
||||||
|
|
||||||
void CustomMenuItemClass::redraw(bool erase /*=false*/) {
|
void CustomMenuItemClass::redraw(bool erase/*=false*/) {
|
||||||
const int8_t line = CurrentMenu->line(this->pos);
|
const int8_t line = CurrentMenu->line(this->pos);
|
||||||
if (erase) Erase_Menu_Text(line);
|
if (erase) Erase_Menu_Text(line);
|
||||||
draw(line);
|
draw(line);
|
||||||
|
@ -507,8 +501,8 @@ MenuItemClass* EditItemAdd(uint8_t cicon, const char * const text, OnDrawItem on
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitMenu() {
|
void InitMenu() {
|
||||||
|
CurrentMenu = nullptr;
|
||||||
PreviousMenu = nullptr;
|
PreviousMenu = nullptr;
|
||||||
InvalidateMenu();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SetMenu(MenuClass* &menu, FSTR_P title, int8_t totalitems) {
|
bool SetMenu(MenuClass* &menu, FSTR_P title, int8_t totalitems) {
|
||||||
|
@ -534,14 +528,18 @@ bool SetMenu(MenuClass* &menu, frame_rect_t cn, FSTR_P title, int8_t totalitems)
|
||||||
return NotCurrent;
|
return NotCurrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvalidateMenu() {
|
void ResetMenu(MenuClass* &menu) {
|
||||||
if (CurrentMenu) {
|
if (menu) {
|
||||||
CurrentMenu->topline = 0;
|
menu->topline = 0;
|
||||||
CurrentMenu->selected = 0;
|
menu->selected = 0;
|
||||||
CurrentMenu = nullptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InvalidateMenu() {
|
||||||
|
ResetMenu(CurrentMenu);
|
||||||
|
CurrentMenu = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateMenu(MenuClass* &menu) {
|
void UpdateMenu(MenuClass* &menu) {
|
||||||
if (!menu) return;
|
if (!menu) return;
|
||||||
if (CurrentMenu != menu) {
|
if (CurrentMenu != menu) {
|
||||||
|
@ -551,9 +549,13 @@ void UpdateMenu(MenuClass* &menu) {
|
||||||
menu->draw();
|
menu->draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReDrawMenu(bool force /*= false*/) {
|
void ReDrawMenu(bool force/*=false*/) {
|
||||||
if (CurrentMenu && (force || checkkey==Menu)) CurrentMenu->draw();
|
if (CurrentMenu && (force || checkkey == Menu)) CurrentMenu->draw();
|
||||||
if (force) DrawItemEdit(true);
|
if (force) DrawItemEdit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReDrawItem() {
|
||||||
|
static_cast<MenuItemClass*>(CurrentMenu->SelectedItem())->redraw(false);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // DWIN_LCD_PROUI
|
#endif // DWIN_LCD_PROUI
|
||||||
|
|
|
@ -24,14 +24,17 @@
|
||||||
/**
|
/**
|
||||||
* Menu functions for ProUI
|
* Menu functions for ProUI
|
||||||
* Author: Miguel A. Risco-Castillo
|
* Author: Miguel A. Risco-Castillo
|
||||||
* Version: 1.9.1
|
* Version: 1.10.1
|
||||||
* Date: 2022/12/02
|
* Date: 2022/05/01
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dwinui.h"
|
#include "dwinui.h"
|
||||||
|
|
||||||
#define MENU_CHAR_LIMIT 24
|
#define MENU_CHAR_LIMIT 24
|
||||||
#define MENU_MAX_ITEMS TERN(SDSORT_LIMIT, SDSORT_LIMIT, 64)
|
|
||||||
|
#ifndef MENU_MAX_ITEMS
|
||||||
|
#define MENU_MAX_ITEMS 100
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t MaxValue = 0; // Auxiliar max integer/scaled float value
|
int32_t MaxValue = 0; // Auxiliar max integer/scaled float value
|
||||||
|
@ -123,7 +126,6 @@ extern MenuClass *PreviousMenu;
|
||||||
// Menuitem Drawing functions =================================================
|
// Menuitem Drawing functions =================================================
|
||||||
|
|
||||||
void Draw_Title(TitleClass* title);
|
void Draw_Title(TitleClass* title);
|
||||||
void Draw_Menu(MenuClass* menu);
|
|
||||||
void Draw_Menu_Cursor(const int8_t line);
|
void Draw_Menu_Cursor(const int8_t line);
|
||||||
void Erase_Menu_Cursor(const int8_t line);
|
void Erase_Menu_Cursor(const int8_t line);
|
||||||
void Erase_Menu_Text(const int8_t line);
|
void Erase_Menu_Text(const int8_t line);
|
||||||
|
@ -150,13 +152,13 @@ void onDrawChkbMenu(MenuItemClass* menuitem, int8_t line);
|
||||||
|
|
||||||
// On click functions =========================================================
|
// On click functions =========================================================
|
||||||
|
|
||||||
void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr);
|
void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)()=nullptr, void (*LiveUpdate)()=nullptr);
|
||||||
|
|
||||||
// HMI user control functions =================================================
|
// HMI user control functions =================================================
|
||||||
|
|
||||||
|
@ -175,6 +177,9 @@ void InitMenu();
|
||||||
bool SetMenu(MenuClass* &menu, FSTR_P title, int8_t totalitems);
|
bool SetMenu(MenuClass* &menu, FSTR_P title, int8_t totalitems);
|
||||||
bool SetMenu(MenuClass* &menu, frame_rect_t cn, FSTR_P title, int8_t totalitems);
|
bool SetMenu(MenuClass* &menu, frame_rect_t cn, FSTR_P title, int8_t totalitems);
|
||||||
|
|
||||||
|
// Reset top line and selected item
|
||||||
|
void ResetMenu(MenuClass* &menu);
|
||||||
|
|
||||||
// Invalidate CurrentMenu to prepare for full menu drawing
|
// Invalidate CurrentMenu to prepare for full menu drawing
|
||||||
void InvalidateMenu();
|
void InvalidateMenu();
|
||||||
|
|
||||||
|
@ -182,7 +187,10 @@ void InvalidateMenu();
|
||||||
void UpdateMenu(MenuClass* &menu);
|
void UpdateMenu(MenuClass* &menu);
|
||||||
|
|
||||||
//Redraw the current Menu if it is valid
|
//Redraw the current Menu if it is valid
|
||||||
void ReDrawMenu(bool force = false);
|
void ReDrawMenu(bool force=false);
|
||||||
|
|
||||||
|
//Redraw selected menu item
|
||||||
|
void ReDrawItem();
|
||||||
|
|
||||||
// Clear MenuItems array and free MenuItems elements
|
// Clear MenuItems array and free MenuItems elements
|
||||||
void MenuItemsClear();
|
void MenuItemsClear();
|
||||||
|
@ -196,7 +204,7 @@ bool IsMenu(MenuClass* menu);
|
||||||
// Add elements to the MenuItems array
|
// Add elements to the MenuItems array
|
||||||
CustomMenuItemClass* MenuItemAdd(OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
CustomMenuItemClass* MenuItemAdd(OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
||||||
MenuItemClass* MenuItemAdd(uint8_t cicon, const char * const text=nullptr, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
MenuItemClass* MenuItemAdd(uint8_t cicon, const char * const text=nullptr, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
||||||
inline MenuItemClass* MenuItemAdd(uint8_t cicon, FSTR_P text = nullptr, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr) {
|
inline MenuItemClass* MenuItemAdd(uint8_t cicon, FSTR_P text=nullptr, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr) {
|
||||||
return MenuItemAdd(cicon, FTOP(text), ondraw, onclick);
|
return MenuItemAdd(cicon, FTOP(text), ondraw, onclick);
|
||||||
}
|
}
|
||||||
MenuItemClass* MenuItemAdd(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
MenuItemClass* MenuItemAdd(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, OnDrawItem ondraw=nullptr, OnClickItem onclick=nullptr);
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
/**
|
/**
|
||||||
* Mesh Viewer for PRO UI
|
* Mesh Viewer for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* version: 3.14.1
|
* version: 4.2.1
|
||||||
* Date: 2022/04/11
|
* Date: 2023/05/05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfigPre.h"
|
#include "../../../inc/MarlinConfigPre.h"
|
||||||
|
@ -33,90 +33,99 @@
|
||||||
|
|
||||||
#include "../../../core/types.h"
|
#include "../../../core/types.h"
|
||||||
#include "../../marlinui.h"
|
#include "../../marlinui.h"
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin.h"
|
#include "dwin.h"
|
||||||
#include "dwin_popup.h"
|
#include "dwin_popup.h"
|
||||||
#include "../../../feature/bedlevel/bedlevel.h"
|
#include "../../../feature/bedlevel/bedlevel.h"
|
||||||
#include "meshviewer.h"
|
#include "meshviewer.h"
|
||||||
|
|
||||||
#if ENABLED(USE_UBL_VIEWER)
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
#include "bedlevel_tools.h"
|
#include "bedlevel_tools.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool meshredraw; // Redraw mesh points
|
||||||
|
uint8_t sizex, sizey; // Mesh XY size
|
||||||
|
uint8_t rmax; // Maximum radius
|
||||||
|
#define margin 25 // XY Margins
|
||||||
|
#define rmin 5 // Minimum radius
|
||||||
|
#define zmin -20 // rmin at z=-0.20
|
||||||
|
#define zmax 20 // rmax at z= 0.20
|
||||||
|
#define width DWIN_WIDTH - 2 * margin
|
||||||
|
#define r(z) ((z - zmin) * (rmax - rmin) / (zmax - zmin) + rmin)
|
||||||
|
#define px(xp) (margin + (xp) * (width) / (sizex - 1))
|
||||||
|
#define py(yp) (30 + DWIN_WIDTH - margin - (yp) * (width) / (sizey - 1))
|
||||||
|
|
||||||
|
constexpr uint8_t meshfont = TERN(TJC_DISPLAY, font8x16, font6x12);
|
||||||
|
|
||||||
MeshViewerClass MeshViewer;
|
MeshViewerClass MeshViewer;
|
||||||
|
|
||||||
void MeshViewerClass::DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8_t sizey) {
|
float MeshViewerClass::max, MeshViewerClass::min;
|
||||||
const int8_t mx = 25, my = 25; // Margins
|
|
||||||
const int16_t stx = (DWIN_WIDTH - 2 * mx) / (sizex - 1), // Steps
|
void MeshViewerClass::DrawMeshGrid(const uint8_t csizex, const uint8_t csizey) {
|
||||||
sty = (DWIN_WIDTH - 2 * my) / (sizey - 1);
|
sizex = csizex;
|
||||||
const int8_t rmax = _MIN(mx - 2, stx / 2);
|
sizey = csizey;
|
||||||
const int8_t rmin = 7;
|
rmax = _MIN(margin - 2, 0.5 * (width) / (sizex - 1));
|
||||||
int16_t zmesh[sizex][sizey];
|
min = 100;
|
||||||
#define px(xp) (mx + (xp) * stx)
|
max = -100;
|
||||||
#define py(yp) (30 + DWIN_WIDTH - my - (yp) * sty)
|
|
||||||
#define rm(z) ((z - minz) * (rmax - rmin) / _MAX(1, (maxz - minz)) + rmin)
|
|
||||||
#define DrawMeshValue(xp, yp, zv) DWINUI::Draw_Signed_Float(font6x12, 1, 2, px(xp) - 18, py(yp) - 6, zv)
|
|
||||||
#define DrawMeshHLine(yp) dwinDrawHLine(HMI_data.SplitLine_Color, px(0), py(yp), DWIN_WIDTH - 2 * mx)
|
|
||||||
#define DrawMeshVLine(xp) dwinDrawVLine(HMI_data.SplitLine_Color, px(xp), py(sizey - 1), DWIN_WIDTH - 2 * my)
|
|
||||||
int16_t maxz =-32000; int16_t minz = 32000;
|
|
||||||
for (uint8_t y = 0; y < sizey; ++y) for (uint8_t x = 0; x < sizex; ++x) {
|
|
||||||
const float v = isnan(zval[x][y]) ? 0 : round(zval[x][y] * 100);
|
|
||||||
zmesh[x][y] = v;
|
|
||||||
NOLESS(maxz, v);
|
|
||||||
NOMORE(minz, v);
|
|
||||||
}
|
|
||||||
max = (float)maxz / 100;
|
|
||||||
min = (float)minz / 100;
|
|
||||||
DWINUI::ClearMainArea();
|
DWINUI::ClearMainArea();
|
||||||
dwinDrawRectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(sizex - 1), py(sizey - 1));
|
dwinDrawRectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(sizex - 1), py(sizey - 1));
|
||||||
for (uint8_t x = 1; x < sizex - 1; ++x) DrawMeshVLine(x);
|
for (uint8_t x = 1; x < sizex - 1; ++x) dwinDrawVLine(HMI_data.SplitLine_Color, px(x), py(sizey - 1), width);
|
||||||
for (uint8_t y = 1; y < sizey - 1; ++y) DrawMeshHLine(y);
|
for (uint8_t y = 1; y < sizey - 1; ++y) dwinDrawHLine(HMI_data.SplitLine_Color, px(0), py(y), width);
|
||||||
for (uint8_t y = 0; y < sizey; ++y) {
|
}
|
||||||
hal.watchdog_refresh();
|
|
||||||
for (uint8_t x = 0; x < sizex; ++x) {
|
void MeshViewerClass::DrawMeshPoint(const uint8_t x, const uint8_t y, const float z) {
|
||||||
uint16_t color = DWINUI::RainbowInt(zmesh[x][y], _MIN(-5, minz), _MAX(5, maxz));
|
const uint8_t fs = DWINUI::fontWidth(meshfont);
|
||||||
uint8_t radius = rm(zmesh[x][y]);
|
const int16_t v = isnan(z) ? 0 : round(z * 100);
|
||||||
DWINUI::Draw_FillCircle(color, px(x), py(y), radius);
|
NOLESS(max, z);
|
||||||
if (sizex < 9) {
|
NOMORE(min, z);
|
||||||
if (zmesh[x][y] == 0) DWINUI::Draw_Float(font6x12, 1, 2, px(x) - 12, py(y) - 6, 0);
|
const uint16_t color = DWINUI::RainbowInt(v, zmin, zmax);
|
||||||
else DWINUI::Draw_Signed_Float(font6x12, 1, 2, px(x) - 18, py(y) - 6, zval[x][y]);
|
DWINUI::Draw_FillCircle(color, px(x), py(y), r(_MAX(_MIN(v,zmax),zmin)));
|
||||||
}
|
TERN_(TJC_DISPLAY, delay(100));
|
||||||
else {
|
if (sizex < (ENABLED(TJC_DISPLAY) ? 8 : 9)) {
|
||||||
char str_1[9];
|
if (v == 0) DWINUI::Draw_Float(meshfont, 1, 2, px(x) - 2*fs, py(y) - fs, 0);
|
||||||
str_1[0] = 0;
|
else DWINUI::Draw_Signed_Float(meshfont, 1, 2, px(x) - 3*fs, py(y) - fs, z);
|
||||||
switch (zmesh[x][y]) {
|
}
|
||||||
case -999 ... -100:
|
else {
|
||||||
DWINUI::Draw_Signed_Float(font6x12, 1, 1, px(x) - 18, py(y) - 6, zval[x][y]);
|
char str_1[9];
|
||||||
break;
|
str_1[0] = '\0';
|
||||||
case -99 ... -1:
|
switch (v) {
|
||||||
sprintf_P(str_1, PSTR("-.%02i"), -zmesh[x][y]);
|
case -999 ... -100:
|
||||||
break;
|
DWINUI::Draw_Signed_Float(meshfont, 1, 1, px(x) - 3*fs, py(y) - fs, z);
|
||||||
case 0:
|
break;
|
||||||
dwinDrawString(false, font6x12, DWINUI::textcolor, DWINUI::backcolor, px(x) - 4, py(y) - 6, "0");
|
case -99 ... -1:
|
||||||
break;
|
sprintf_P(str_1, PSTR("-.%02i"), -v);
|
||||||
case 1 ... 99:
|
break;
|
||||||
sprintf_P(str_1, PSTR(".%02i"), zmesh[x][y]);
|
case 0:
|
||||||
break;
|
dwinDrawString(false, meshfont, DWINUI::textcolor, DWINUI::backcolor, px(x) - 4, py(y) - fs, "0");
|
||||||
case 100 ... 999:
|
break;
|
||||||
DWINUI::Draw_Signed_Float(font6x12, 1, 1, px(x) - 18, py(y) - 6, zval[x][y]);
|
case 1 ... 99:
|
||||||
break;
|
sprintf_P(str_1, PSTR(".%02i"), v);
|
||||||
}
|
break;
|
||||||
if (str_1[0])
|
case 100 ... 999:
|
||||||
dwinDrawString(false, font6x12, DWINUI::textcolor, DWINUI::backcolor, px(x) - 12, py(y) - 6, str_1);
|
DWINUI::Draw_Signed_Float(meshfont, 1, 1, px(x) - 3 * fs, py(y) - fs, z);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
if (str_1[0])
|
||||||
|
dwinDrawString(false, meshfont, DWINUI::textcolor, DWINUI::backcolor, px(x) - 2 * fs, py(y) - fs, str_1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshViewerClass::Draw(bool withsave /*= false*/) {
|
void MeshViewerClass::DrawMesh(const bed_mesh_t zval, const uint8_t csizex, const uint8_t csizey) {
|
||||||
|
DrawMeshGrid(csizex, csizey);
|
||||||
|
for (uint8_t y = 0; y < csizey; ++y) {
|
||||||
|
hal.watchdog_refresh();
|
||||||
|
for (uint8_t x = 0; x < csizex; ++x) DrawMeshPoint(x, y, zval[x][y]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MeshViewerClass::Draw(const bool withsave/*=false*/, const bool redraw/*=true*/) {
|
||||||
Title.ShowCaption(GET_TEXT_F(MSG_MESH_VIEWER));
|
Title.ShowCaption(GET_TEXT_F(MSG_MESH_VIEWER));
|
||||||
#if USE_UBL_VIEWER
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
DWINUI::ClearMainArea();
|
DWINUI::ClearMainArea();
|
||||||
bedLevelTools.viewer_print_value = true;
|
bedLevelTools.viewer_print_value = true;
|
||||||
bedLevelTools.Draw_Bed_Mesh(-1, 1, 8, 10 + TITLE_HEIGHT);
|
bedLevelTools.Draw_Bed_Mesh(-1, 1, 8, 10 + TITLE_HEIGHT);
|
||||||
#else
|
#else
|
||||||
DrawMesh(bedlevel.z_values, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y);
|
if (redraw) DrawMesh(bedlevel.z_values, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y);
|
||||||
|
else DWINUI::Draw_Box(1, HMI_data.Background_Color, { 89, 305, 99, 38 });
|
||||||
#endif
|
#endif
|
||||||
if (withsave) {
|
if (withsave) {
|
||||||
DWINUI::Draw_Button(BTN_Save, 26, 305);
|
DWINUI::Draw_Button(BTN_Save, 26, 305);
|
||||||
|
@ -126,19 +135,22 @@ void MeshViewerClass::Draw(bool withsave /*= false*/) {
|
||||||
else
|
else
|
||||||
DWINUI::Draw_Button(BTN_Continue, 86, 305);
|
DWINUI::Draw_Button(BTN_Continue, 86, 305);
|
||||||
|
|
||||||
#if USE_UBL_VIEWER
|
#if ENABLED(USE_GRID_MESHVIEWER)
|
||||||
bedLevelTools.Set_Mesh_Viewer_Status();
|
bedLevelTools.Set_Mesh_Viewer_Status();
|
||||||
#else
|
#else
|
||||||
char str_1[6], str_2[6] = "";
|
char str_1[6], str_2[6] = "";
|
||||||
ui.status_printf(0, F("Mesh minZ: %s, maxZ: %s"),
|
ui.status_printf(0, F("Mesh minZ: %s, maxZ: %s"), dtostrf(min, 1, 2, str_1), dtostrf(max, 1, 2, str_2));
|
||||||
dtostrf(min, 1, 2, str_1),
|
|
||||||
dtostrf(max, 1, 2, str_2)
|
|
||||||
);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw_MeshViewer() { MeshViewer.Draw(true); }
|
void Draw_MeshViewer() { MeshViewer.Draw(true, meshredraw); }
|
||||||
|
|
||||||
void onClick_MeshViewer() { if (hmiFlag.select_flag) SaveMesh(); HMI_ReturnScreen(); }
|
void onClick_MeshViewer() { if (hmiFlag.select_flag) SaveMesh(); HMI_ReturnScreen(); }
|
||||||
void Goto_MeshViewer() { if (leveling_is_valid()) Goto_Popup(Draw_MeshViewer, onClick_MeshViewer); else HMI_ReturnScreen(); }
|
|
||||||
|
void Goto_MeshViewer(const bool redraw) {
|
||||||
|
meshredraw = redraw;
|
||||||
|
if (leveling_is_valid()) Goto_Popup(Draw_MeshViewer, onClick_MeshViewer);
|
||||||
|
else HMI_ReturnScreen();
|
||||||
|
}
|
||||||
|
|
||||||
#endif // DWIN_LCD_PROUI && HAS_MESH
|
#endif // DWIN_LCD_PROUI && HAS_MESH
|
||||||
|
|
|
@ -24,17 +24,19 @@
|
||||||
/**
|
/**
|
||||||
* Mesh Viewer for PRO UI
|
* Mesh Viewer for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* version: 3.14.1
|
* version: 4.2.1
|
||||||
* Date: 2022/04/11
|
* Date: 2023/05/05
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MeshViewerClass {
|
class MeshViewerClass {
|
||||||
public:
|
public:
|
||||||
float max, min;
|
static float max, min;
|
||||||
void Draw(bool withsave = false);
|
static void DrawMeshGrid(const uint8_t csizex, const uint8_t csizey);
|
||||||
void DrawMesh(bed_mesh_t zval, const uint8_t sizex, const uint8_t sizey);
|
static void DrawMeshPoint(const uint8_t x, const uint8_t y, const float z);
|
||||||
|
static void Draw(const bool withsave=false, const bool redraw=true);
|
||||||
|
static void DrawMesh(const bed_mesh_t zval, const uint8_t csizex, const uint8_t csizey);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern MeshViewerClass MeshViewer;
|
extern MeshViewerClass MeshViewer;
|
||||||
|
|
||||||
void Goto_MeshViewer();
|
void Goto_MeshViewer(const bool redraw);
|
||||||
|
|
|
@ -23,20 +23,18 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Single var plot
|
* DWIN Single var plot
|
||||||
* Author: Miguel A. Risco-Castillo
|
* Author: Miguel A. Risco-Castillo
|
||||||
* Version: 2.1.2
|
* Version: 2.2.3
|
||||||
* Date: 2022/11/20
|
* Date: 2023/01/29
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../../../inc/MarlinConfig.h"
|
#include "../../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ALL(DWIN_LCD_PROUI, SHOW_TUNING_GRAPH)
|
#if ALL(DWIN_LCD_PROUI, SHOW_TUNING_GRAPH)
|
||||||
|
|
||||||
#include "plot.h"
|
#include "dwin.h"
|
||||||
#include "../../../core/types.h"
|
#include "../../../core/types.h"
|
||||||
#include "../../marlinui.h"
|
#include "../../marlinui.h"
|
||||||
#include "dwin_lcd.h"
|
#include "plot.h"
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin.h"
|
|
||||||
|
|
||||||
#define Plot_Bg_Color RGB( 1, 12, 8)
|
#define Plot_Bg_Color RGB( 1, 12, 8)
|
||||||
|
|
||||||
|
@ -46,7 +44,7 @@ uint16_t grphpoints, r, x2, y2 = 0;
|
||||||
frame_rect_t grphframe = {0};
|
frame_rect_t grphframe = {0};
|
||||||
float scale = 0;
|
float scale = 0;
|
||||||
|
|
||||||
void PlotClass::Draw(const frame_rect_t &frame, const celsius_t max, const_float_t ref/*=0*/) {
|
void PlotClass::Draw(const frame_rect_t &frame, const_float_t max, const_float_t ref/*=0*/) {
|
||||||
grphframe = frame;
|
grphframe = frame;
|
||||||
grphpoints = 0;
|
grphpoints = 0;
|
||||||
scale = frame.h / max;
|
scale = frame.h / max;
|
||||||
|
|
|
@ -24,15 +24,15 @@
|
||||||
/**
|
/**
|
||||||
* DWIN Single var plot
|
* DWIN Single var plot
|
||||||
* Author: Miguel A. Risco-Castillo
|
* Author: Miguel A. Risco-Castillo
|
||||||
* Version: 2.1.2
|
* Version: 2.2.3
|
||||||
* Date: 2022/11/20
|
* Date: 2023/01/29
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dwinui.h"
|
#include "dwinui.h"
|
||||||
|
|
||||||
class PlotClass {
|
class PlotClass {
|
||||||
public:
|
public:
|
||||||
static void Draw(const frame_rect_t &frame, const celsius_t max, const_float_t ref=0);
|
static void Draw(const frame_rect_t &frame, const_float_t max, const_float_t ref=0);
|
||||||
static void Update(const_float_t value);
|
static void Update(const_float_t value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
/**
|
/**
|
||||||
* Print Stats page for PRO UI
|
* Print Stats page for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 1.4.2
|
* Version: 1.4.0
|
||||||
* Date: 2022/12/03
|
* Date: 2022/12/03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -37,10 +37,8 @@
|
||||||
#include "../../../MarlinCore.h"
|
#include "../../../MarlinCore.h"
|
||||||
#include "../../marlinui.h"
|
#include "../../marlinui.h"
|
||||||
#include "../../../module/printcounter.h"
|
#include "../../../module/printcounter.h"
|
||||||
#include "dwin_lcd.h"
|
|
||||||
#include "dwinui.h"
|
|
||||||
#include "dwin_popup.h"
|
|
||||||
#include "dwin.h"
|
#include "dwin.h"
|
||||||
|
#include "dwin_popup.h"
|
||||||
|
|
||||||
PrintStatsClass PrintStats;
|
PrintStatsClass PrintStats;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/**
|
/**
|
||||||
* Print Stats page for PRO UI
|
* Print Stats page for PRO UI
|
||||||
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
* Author: Miguel A. Risco-Castillo (MRISCOC)
|
||||||
* Version: 1.4.2
|
* Version: 1.4.0
|
||||||
* Date: 2022/12/03
|
* Date: 2022/12/03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -68,12 +68,12 @@ namespace Language_de {
|
||||||
LSTR MSG_FILAMENT_SET = _UxGT("Fila. Einstellungen");
|
LSTR MSG_FILAMENT_SET = _UxGT("Fila. Einstellungen");
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management");
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Manuell Nivellierung");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Manuell Nivellierung");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Vorne Links");
|
LSTR MSG_TRAM_FL = _UxGT("Vorne Links");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Vorne Rechts");
|
LSTR MSG_TRAM_FR = _UxGT("Vorne Rechts");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Mitte");
|
LSTR MSG_TRAM_C = _UxGT("Mitte");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Hinten Links");
|
LSTR MSG_TRAM_BL = _UxGT("Hinten Links");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Hinten Rechts");
|
LSTR MSG_TRAM_BR = _UxGT("Hinten Rechts");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("manuelles Netz");
|
LSTR MSG_MANUAL_MESH = _UxGT("Manuelles Netz");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Netz auto. erstellen");
|
LSTR MSG_AUTO_MESH = _UxGT("Netz auto. erstellen");
|
||||||
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Z-Achsen ausgleichen");
|
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Z-Achsen ausgleichen");
|
||||||
LSTR MSG_ITERATION = _UxGT("G34 Iteration: %i");
|
LSTR MSG_ITERATION = _UxGT("G34 Iteration: %i");
|
||||||
|
|
|
@ -64,6 +64,8 @@ namespace Language_en {
|
||||||
LSTR MSG_MEDIA_READ_ERROR = MEDIA_TYPE_EN _UxGT(" read error");
|
LSTR MSG_MEDIA_READ_ERROR = MEDIA_TYPE_EN _UxGT(" read error");
|
||||||
LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB device removed");
|
LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB device removed");
|
||||||
LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB start failed");
|
LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB start failed");
|
||||||
|
LSTR MSG_MEDIA_SORT = _UxGT("Sort ") MEDIA_TYPE_EN;
|
||||||
|
LSTR MSG_MEDIA_UPDATE = MEDIA_TYPE_EN _UxGT(" Update");
|
||||||
LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow");
|
LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow");
|
||||||
LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters
|
LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters
|
||||||
LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops");
|
LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops");
|
||||||
|
@ -86,11 +88,11 @@ namespace Language_en {
|
||||||
LSTR MSG_FILAMENT_SET = _UxGT("Filament Settings");
|
LSTR MSG_FILAMENT_SET = _UxGT("Filament Settings");
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management");
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Manual Leveling");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Manual Leveling");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Front Left");
|
LSTR MSG_TRAM_FL = _UxGT("Front Left");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Front Right");
|
LSTR MSG_TRAM_FR = _UxGT("Front Right");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Center");
|
LSTR MSG_TRAM_C = _UxGT("Center");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Back Left");
|
LSTR MSG_TRAM_BL = _UxGT("Back Left");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Back Right");
|
LSTR MSG_TRAM_BR = _UxGT("Back Right");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("Manual Mesh");
|
LSTR MSG_MANUAL_MESH = _UxGT("Manual Mesh");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Auto Build Mesh");
|
LSTR MSG_AUTO_MESH = _UxGT("Auto Build Mesh");
|
||||||
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align");
|
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align");
|
||||||
|
@ -187,6 +189,7 @@ namespace Language_en {
|
||||||
LSTR MSG_MESH_CENTER = _UxGT("Center Area");
|
LSTR MSG_MESH_CENTER = _UxGT("Center Area");
|
||||||
LSTR MSG_MESH_EDIT_Z = _UxGT("Z Value");
|
LSTR MSG_MESH_EDIT_Z = _UxGT("Z Value");
|
||||||
LSTR MSG_MESH_CANCEL = _UxGT("Mesh cancelled");
|
LSTR MSG_MESH_CANCEL = _UxGT("Mesh cancelled");
|
||||||
|
LSTR MSG_MESH_RESET = _UxGT("Mesh reset");
|
||||||
LSTR MSG_CUSTOM_COMMANDS = _UxGT("Custom Commands");
|
LSTR MSG_CUSTOM_COMMANDS = _UxGT("Custom Commands");
|
||||||
LSTR MSG_M48_TEST = _UxGT("M48 Probe Test");
|
LSTR MSG_M48_TEST = _UxGT("M48 Probe Test");
|
||||||
LSTR MSG_M48_POINT = _UxGT("M48 Point");
|
LSTR MSG_M48_POINT = _UxGT("M48 Point");
|
||||||
|
@ -364,7 +367,7 @@ namespace Language_en {
|
||||||
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
|
LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *");
|
||||||
LSTR MSG_PID_CYCLE = _UxGT("PID Cycles");
|
LSTR MSG_PID_CYCLE = _UxGT("PID Cycles");
|
||||||
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
|
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
|
||||||
LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("PID Autotune failed!");
|
LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Autotune failed!");
|
||||||
LSTR MSG_BAD_HEATER_ID = _UxGT("Bad extruder.");
|
LSTR MSG_BAD_HEATER_ID = _UxGT("Bad extruder.");
|
||||||
LSTR MSG_TEMP_TOO_HIGH = _UxGT("Temperature too high.");
|
LSTR MSG_TEMP_TOO_HIGH = _UxGT("Temperature too high.");
|
||||||
LSTR MSG_TIMEOUT = _UxGT("Timeout.");
|
LSTR MSG_TIMEOUT = _UxGT("Timeout.");
|
||||||
|
@ -395,6 +398,7 @@ namespace Language_en {
|
||||||
LSTR MSG_VN_JERK = _UxGT("Max @ Jerk");
|
LSTR MSG_VN_JERK = _UxGT("Max @ Jerk");
|
||||||
LSTR MSG_VE_JERK = _UxGT("Max E Jerk");
|
LSTR MSG_VE_JERK = _UxGT("Max E Jerk");
|
||||||
LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev");
|
LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev");
|
||||||
|
LSTR MSG_STEP_SMOOTHING = _UxGT("Step Smoothing");
|
||||||
LSTR MSG_MAX_SPEED = _UxGT("Max Speed (mm/s)");
|
LSTR MSG_MAX_SPEED = _UxGT("Max Speed (mm/s)");
|
||||||
LSTR MSG_VMAX_A = _UxGT("Max ") STR_A _UxGT(" Speed");
|
LSTR MSG_VMAX_A = _UxGT("Max ") STR_A _UxGT(" Speed");
|
||||||
LSTR MSG_VMAX_B = _UxGT("Max ") STR_B _UxGT(" Speed");
|
LSTR MSG_VMAX_B = _UxGT("Max ") STR_B _UxGT(" Speed");
|
||||||
|
@ -418,6 +422,12 @@ namespace Language_en {
|
||||||
LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping");
|
LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping");
|
||||||
LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency");
|
LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency");
|
||||||
LSTR MSG_SHAPING_ZETA = _UxGT("@ damping");
|
LSTR MSG_SHAPING_ZETA = _UxGT("@ damping");
|
||||||
|
LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frequency");
|
||||||
|
LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frequency");
|
||||||
|
LSTR MSG_SHAPING_A_ZETA = STR_A _UxGT(" damping ");
|
||||||
|
LSTR MSG_SHAPING_B_ZETA = STR_B _UxGT(" damping ");
|
||||||
|
LSTR MSG_SHAPING_X_ENABLE = _UxGT("Enable X shaping");
|
||||||
|
LSTR MSG_SHAPING_Y_ENABLE = _UxGT("Enable Y shaping");
|
||||||
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit");
|
LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit");
|
||||||
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor");
|
LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor");
|
||||||
LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm");
|
LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm");
|
||||||
|
@ -460,7 +470,7 @@ namespace Language_en {
|
||||||
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: EEPROM Version");
|
LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: EEPROM Version");
|
||||||
LSTR MSG_ERR_EEPROM_CORRUPT = _UxGT("Err: EEPROM Corrupt");
|
LSTR MSG_ERR_EEPROM_CORRUPT = _UxGT("Err: EEPROM Corrupt");
|
||||||
LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored");
|
LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored");
|
||||||
LSTR MSG_MEDIA_UPDATE = MEDIA_TYPE_EN _UxGT(" Update");
|
LSTR MSG_HAS_PREVIEW = _UxGT("Has preview");
|
||||||
LSTR MSG_RESET_PRINTER = _UxGT("Reset Printer");
|
LSTR MSG_RESET_PRINTER = _UxGT("Reset Printer");
|
||||||
LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh");
|
LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh");
|
||||||
LSTR MSG_INFO_SCREEN = _UxGT("Info Screen");
|
LSTR MSG_INFO_SCREEN = _UxGT("Info Screen");
|
||||||
|
@ -507,7 +517,7 @@ namespace Language_en {
|
||||||
LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object");
|
LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object");
|
||||||
LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {");
|
LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object {");
|
||||||
LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Print Job");
|
LSTR MSG_CONTINUE_PRINT_JOB = _UxGT("Continue Print Job");
|
||||||
LSTR MSG_MEDIA_MENU = _UxGT("Print from ") MEDIA_TYPE_EN;
|
LSTR MSG_MEDIA_MENU = _UxGT("Select from ") MEDIA_TYPE_EN;
|
||||||
LSTR MSG_TURN_OFF = _UxGT("Turn off the printer");
|
LSTR MSG_TURN_OFF = _UxGT("Turn off the printer");
|
||||||
LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops");
|
LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops");
|
||||||
#else
|
#else
|
||||||
|
@ -826,6 +836,10 @@ namespace Language_en {
|
||||||
#endif
|
#endif
|
||||||
LSTR MSG_TMC_DRIVERS = _UxGT("TMC Drivers");
|
LSTR MSG_TMC_DRIVERS = _UxGT("TMC Drivers");
|
||||||
LSTR MSG_TMC_CURRENT = _UxGT("Driver Current");
|
LSTR MSG_TMC_CURRENT = _UxGT("Driver Current");
|
||||||
|
LSTR MSG_TMC_ACURRENT = STR_A _UxGT("Driver Current");
|
||||||
|
LSTR MSG_TMC_BCURRENT = STR_B _UxGT("Driver Current");
|
||||||
|
LSTR MSG_TMC_CCURRENT = STR_C _UxGT("Driver Current");
|
||||||
|
LSTR MSG_TMC_ECURRENT = _UxGT("E Driver Current");
|
||||||
LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold");
|
LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold");
|
||||||
LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing");
|
LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing");
|
||||||
LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode");
|
LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode");
|
||||||
|
|
|
@ -81,11 +81,11 @@ namespace Language_it {
|
||||||
LSTR MSG_FILAMENT_SET = _UxGT("Impostaz.filamento");
|
LSTR MSG_FILAMENT_SET = _UxGT("Impostaz.filamento");
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Gestione filamento");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Gestione filamento");
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Livel.manuale");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Livel.manuale");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Davanti Sinistra");
|
LSTR MSG_TRAM_FL = _UxGT("Davanti Sinistra");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Davanti Destra");
|
LSTR MSG_TRAM_FR = _UxGT("Davanti Destra");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Centro");
|
LSTR MSG_TRAM_C = _UxGT("Centro");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Dietro Sinistra");
|
LSTR MSG_TRAM_BL = _UxGT("Dietro Sinistra");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Dietro Destra");
|
LSTR MSG_TRAM_BR = _UxGT("Dietro Destra");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("Mesh Manuale");
|
LSTR MSG_MANUAL_MESH = _UxGT("Mesh Manuale");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Generaz.Autom.Mesh");
|
LSTR MSG_AUTO_MESH = _UxGT("Generaz.Autom.Mesh");
|
||||||
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Allineam.automat. Z");
|
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Allineam.automat. Z");
|
||||||
|
|
|
@ -894,11 +894,11 @@ namespace Language_ru {
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Управл.филаментом");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Управл.филаментом");
|
||||||
#endif
|
#endif
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Ручное выравнивание");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Ручное выравнивание");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Передний левый");
|
LSTR MSG_TRAM_FL = _UxGT("Передний левый");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Передний правый");
|
LSTR MSG_TRAM_FR = _UxGT("Передний правый");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Центр");
|
LSTR MSG_TRAM_C = _UxGT("Центр");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Задний левый");
|
LSTR MSG_TRAM_BL = _UxGT("Задний левый");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Задний правый");
|
LSTR MSG_TRAM_BR = _UxGT("Задний правый");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("Сетка вручную");
|
LSTR MSG_MANUAL_MESH = _UxGT("Сетка вручную");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Сетка автоматически");
|
LSTR MSG_AUTO_MESH = _UxGT("Сетка автоматически");
|
||||||
LSTR MSG_ERR_M428_TOO_FAR = _UxGT("Ошибка: слишком далеко!");
|
LSTR MSG_ERR_M428_TOO_FAR = _UxGT("Ошибка: слишком далеко!");
|
||||||
|
|
|
@ -82,11 +82,11 @@ namespace Language_sk {
|
||||||
LSTR MSG_FILAMENT_SET = _UxGT("Nastav. filamentu");
|
LSTR MSG_FILAMENT_SET = _UxGT("Nastav. filamentu");
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Správa filamentu");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Správa filamentu");
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Ručné rovnanie");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Ručné rovnanie");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Ľavý predný");
|
LSTR MSG_TRAM_FL = _UxGT("Ľavý predný");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Pravý predný");
|
LSTR MSG_TRAM_FR = _UxGT("Pravý predný");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Stred");
|
LSTR MSG_TRAM_C = _UxGT("Stred");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Ľavý zadný");
|
LSTR MSG_TRAM_BL = _UxGT("Ľavý zadný");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Pravý zadný");
|
LSTR MSG_TRAM_BR = _UxGT("Pravý zadný");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("Ručná mriežka");
|
LSTR MSG_MANUAL_MESH = _UxGT("Ručná mriežka");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Automat. mriežka");
|
LSTR MSG_AUTO_MESH = _UxGT("Automat. mriežka");
|
||||||
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto-zarovn. Z");
|
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto-zarovn. Z");
|
||||||
|
|
|
@ -71,11 +71,11 @@ namespace Language_tr {
|
||||||
LSTR MSG_FILAMENT_SET = _UxGT("Filament Ayarları");
|
LSTR MSG_FILAMENT_SET = _UxGT("Filament Ayarları");
|
||||||
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Yönetimi");
|
LSTR MSG_FILAMENT_MAN = _UxGT("Filament Yönetimi");
|
||||||
LSTR MSG_MANUAL_LEVELING = _UxGT("Manuel Seviyeleme");
|
LSTR MSG_MANUAL_LEVELING = _UxGT("Manuel Seviyeleme");
|
||||||
LSTR MSG_LEVBED_FL = _UxGT("Sol Ön");
|
LSTR MSG_TRAM_FL = _UxGT("Sol Ön");
|
||||||
LSTR MSG_LEVBED_FR = _UxGT("Ön Sağ");
|
LSTR MSG_TRAM_FR = _UxGT("Ön Sağ");
|
||||||
LSTR MSG_LEVBED_C = _UxGT("Orta");
|
LSTR MSG_TRAM_C = _UxGT("Orta");
|
||||||
LSTR MSG_LEVBED_BL = _UxGT("Arka Sol");
|
LSTR MSG_TRAM_BL = _UxGT("Arka Sol");
|
||||||
LSTR MSG_LEVBED_BR = _UxGT("Arka Sağ");
|
LSTR MSG_TRAM_BR = _UxGT("Arka Sağ");
|
||||||
LSTR MSG_MANUAL_MESH = _UxGT("Manuel Mesh");
|
LSTR MSG_MANUAL_MESH = _UxGT("Manuel Mesh");
|
||||||
LSTR MSG_AUTO_MESH = _UxGT("Oto Mesh Oluştur");
|
LSTR MSG_AUTO_MESH = _UxGT("Oto Mesh Oluştur");
|
||||||
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Oto. Z-Hizalama");
|
LSTR MSG_AUTO_Z_ALIGN = _UxGT("Oto. Z-Hizalama");
|
||||||
|
|
|
@ -2633,10 +2633,12 @@ hal_timer_t Stepper::block_phase_isr() {
|
||||||
oversampling_factor = 0; // Assume no axis smoothing (via oversampling)
|
oversampling_factor = 0; // Assume no axis smoothing (via oversampling)
|
||||||
// Decide if axis smoothing is possible
|
// Decide if axis smoothing is possible
|
||||||
uint32_t max_rate = current_block->nominal_rate; // Get the step event rate
|
uint32_t max_rate = current_block->nominal_rate; // Get the step event rate
|
||||||
while (max_rate < MIN_STEP_ISR_FREQUENCY) { // As long as more ISRs are possible...
|
if (TERN1(DWIN_LCD_PROUI, HMI_data.AdaptiveStepSmoothing)) {
|
||||||
max_rate <<= 1; // Try to double the rate
|
while (max_rate < MIN_STEP_ISR_FREQUENCY) { // As long as more ISRs are possible...
|
||||||
if (max_rate < MIN_STEP_ISR_FREQUENCY) // Don't exceed the estimated ISR limit
|
max_rate <<= 1; // Try to double the rate
|
||||||
++oversampling_factor; // Increase the oversampling (used for left-shift)
|
if (max_rate < MIN_STEP_ISR_FREQUENCY) // Don't exceed the estimated ISR limit
|
||||||
|
++oversampling_factor; // Increase the oversampling (used for left-shift)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -910,7 +910,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||||
TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color));
|
TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color));
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
|
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
|
||||||
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(PID_DONE));
|
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(AUTOTUNE_DONE));
|
||||||
|
|
||||||
goto EXIT_M303;
|
goto EXIT_M303;
|
||||||
}
|
}
|
||||||
|
@ -928,7 +928,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||||
TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color));
|
TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color));
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
|
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE));
|
||||||
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(PID_DONE));
|
TERN_(DWIN_PID_TUNE, DWIN_PidTuning(AUTOTUNE_DONE));
|
||||||
|
|
||||||
EXIT_M303:
|
EXIT_M303:
|
||||||
TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true);
|
TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true);
|
||||||
|
@ -1305,7 +1305,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED);
|
SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED);
|
||||||
TERN_(DWIN_LCD_PROUI, DWIN_MPCTuning(MPC_DONE));
|
TERN_(DWIN_LCD_PROUI, DWIN_MPCTuning(AUTOTUNE_DONE));
|
||||||
|
|
||||||
SERIAL_ECHOLNPGM("MPC_BLOCK_HEAT_CAPACITY ", mpc.block_heat_capacity);
|
SERIAL_ECHOLNPGM("MPC_BLOCK_HEAT_CAPACITY ", mpc.block_heat_capacity);
|
||||||
SERIAL_ECHOLNPGM("MPC_SENSOR_RESPONSIVENESS ", p_float_t(mpc.sensor_responsiveness, 4));
|
SERIAL_ECHOLNPGM("MPC_SENSOR_RESPONSIVENESS ", p_float_t(mpc.sensor_responsiveness, 4));
|
||||||
|
@ -4391,7 +4391,7 @@ void Temperature::isr() {
|
||||||
// If wait_for_heatup is set, temperature was reached, no cancel
|
// If wait_for_heatup is set, temperature was reached, no cancel
|
||||||
if (wait_for_heatup) {
|
if (wait_for_heatup) {
|
||||||
wait_for_heatup = false;
|
wait_for_heatup = false;
|
||||||
#if HAS_DWIN_E3V2_BASIC
|
#if ENABLED(DWIN_CREALITY_LCD)
|
||||||
hmiFlag.heat_flag = 0;
|
hmiFlag.heat_flag = 0;
|
||||||
duration_t elapsed = print_job_timer.duration(); // Print timer
|
duration_t elapsed = print_job_timer.duration(); // Print timer
|
||||||
dwin_heat_time = elapsed.value;
|
dwin_heat_time = elapsed.value;
|
||||||
|
|
Loading…
Reference in a new issue