🚸 Update ProUI Plot graph - part 2 (#26563)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
@@ -3558,7 +3558,7 @@
|
||||
* Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
|
||||
* to set spindle speed, spindle direction, and laser power.
|
||||
*
|
||||
* SuperPid is a router/spindle speed controller used in the CNC milling community.
|
||||
* SuperPID is a router/spindle speed controller used in the CNC milling community.
|
||||
* Marlin can be used to turn the spindle on and off. It can also be used to set
|
||||
* the spindle speed from 5,000 to 30,000 RPM.
|
||||
*
|
||||
|
@@ -77,8 +77,6 @@
|
||||
#include "lcd/e3v2/common/encoder.h"
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "lcd/e3v2/proui/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "lcd/e3v2/jyersui/dwin.h"
|
||||
#endif
|
||||
@@ -1594,11 +1592,11 @@ void setup() {
|
||||
SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n");
|
||||
#endif
|
||||
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
SETUP_RUN(dwinInitScreen());
|
||||
#endif
|
||||
|
||||
#if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC
|
||||
#if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD)
|
||||
SETUP_RUN(ui.reset_status(true)); // Show service messages or keep current status
|
||||
#endif
|
||||
|
||||
|
@@ -95,7 +95,7 @@ public:
|
||||
static void report_current_mesh();
|
||||
static void report_state();
|
||||
static void save_ubl_active_state_and_disable();
|
||||
static void restore_ubl_active_state_and_leave();
|
||||
static void restore_ubl_active_state(const bool is_done=true);
|
||||
static void display_map(const uint8_t) __O0;
|
||||
static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const xy_pos_t&, const bool=false, MeshFlags *done_flags=nullptr) __O0;
|
||||
static mesh_index_pair find_furthest_invalid_mesh_point() __O0;
|
||||
|
@@ -309,7 +309,7 @@ void unified_bed_leveling::G29() {
|
||||
#if ALL(DWIN_LCD_PROUI, ZHOME_BEFORE_LEVELING)
|
||||
save_ubl_active_state_and_disable();
|
||||
gcode.process_subcommands_now(F("G28Z"));
|
||||
restore_ubl_active_state_and_leave();
|
||||
restore_ubl_active_state(false); // ...without telling ExtUI "done"
|
||||
#else
|
||||
// Send 'N' to force homing before G29 (internal only)
|
||||
if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
|
||||
@@ -425,7 +425,7 @@ void unified_bed_leveling::G29() {
|
||||
if (parser.seen_test('J')) {
|
||||
save_ubl_active_state_and_disable();
|
||||
tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
|
||||
restore_ubl_active_state_and_leave();
|
||||
restore_ubl_active_state();
|
||||
#if ENABLED(UBL_G29_J_RECENTER)
|
||||
do_blocking_move_to_xy(0.5f * ((MESH_MIN_X) + (MESH_MAX_X)), 0.5f * ((MESH_MIN_Y) + (MESH_MAX_Y)));
|
||||
#endif
|
||||
@@ -754,7 +754,6 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
|
||||
TERN_(HAS_MARLINUI_MENU, ui.capture());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
|
||||
save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained
|
||||
grid_count_t count = GRID_MAX_POINTS;
|
||||
@@ -768,7 +767,6 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, ".");
|
||||
TERN_(HAS_STATUS_MESSAGE, ui.status_printf(0, F(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS)));
|
||||
TERN_(HAS_BACKLIGHT_TIMEOUT, ui.refresh_backlight_timeout());
|
||||
TERN_(DWIN_LCD_PROUI, dwinRedrawScreen());
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
if (ui.button_pressed()) {
|
||||
@@ -778,8 +776,7 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
ui.quick_feedback();
|
||||
ui.release();
|
||||
probe.stow(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
return restore_ubl_active_state_and_leave();
|
||||
return restore_ubl_active_state();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -815,15 +812,12 @@ void unified_bed_leveling::shift_mesh_height() {
|
||||
|
||||
probe.move_z_after_probing();
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
|
||||
do_blocking_move_to_xy(
|
||||
constrain(nearby.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X),
|
||||
constrain(nearby.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y)
|
||||
);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingDone());
|
||||
restore_ubl_active_state();
|
||||
}
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
@@ -932,7 +926,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
if (param.V_verbosity > 1)
|
||||
SERIAL_ECHOLNPGM("Business Card is ", p_float_t(thickness, 4), "mm thick.");
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
restore_ubl_active_state();
|
||||
|
||||
return thickness;
|
||||
}
|
||||
@@ -987,7 +981,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
if (_click_and_hold([]{
|
||||
SERIAL_ECHOLNPGM("\nMesh only partially populated.");
|
||||
do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE);
|
||||
})) return restore_ubl_active_state_and_leave();
|
||||
})) return restore_ubl_active_state();
|
||||
|
||||
// Store the Z position minus the shim height
|
||||
z_values[lpos.x][lpos.y] = current_position.z - thick;
|
||||
@@ -1002,10 +996,8 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
|
||||
if (do_ubl_mesh_map) display_map(param.T_map_type); // show user where we're probing
|
||||
|
||||
restore_ubl_active_state_and_leave();
|
||||
restore_ubl_active_state();
|
||||
do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1111,7 +1103,7 @@ void set_message_with_feedback(FSTR_P const fstr) {
|
||||
} while (lpos.x >= 0 && --param.R_repetition > 0);
|
||||
|
||||
if (do_ubl_mesh_map) display_map(param.T_map_type);
|
||||
restore_ubl_active_state_and_leave();
|
||||
restore_ubl_active_state();
|
||||
|
||||
do_blocking_move_to_xy_z(pos, Z_TWEEN_SAFE_CLEARANCE);
|
||||
|
||||
@@ -1263,18 +1255,21 @@ void unified_bed_leveling::save_ubl_active_state_and_disable() {
|
||||
set_bed_leveling_enabled(false);
|
||||
}
|
||||
|
||||
void unified_bed_leveling::restore_ubl_active_state_and_leave() {
|
||||
void unified_bed_leveling::restore_ubl_active_state(const bool is_done/*=true*/) {
|
||||
TERN_(HAS_MARLINUI_MENU, ui.release());
|
||||
#if ENABLED(UBL_DEVEL_DEBUGGING)
|
||||
if (--ubl_state_recursion_chk) {
|
||||
SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
|
||||
SERIAL_ECHOLNPGM("restore_ubl_active_state() called too many times.");
|
||||
set_message_with_feedback(GET_TEXT_F(MSG_UBL_RESTORE_ERROR));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
set_bed_leveling_enabled(ubl_state_at_invocation);
|
||||
|
||||
if (is_done) {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
}
|
||||
|
||||
mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() {
|
||||
|
||||
|
@@ -186,13 +186,13 @@ void HostUI::action(FSTR_P const fstr, const bool eol) {
|
||||
switch (response) {
|
||||
|
||||
case 0: // "Purge More" button
|
||||
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(M600_PURGE_MORE_RESUMABLE)
|
||||
pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 1: // "Continue" / "Disable Runout" button
|
||||
#if ALL(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(M600_PURGE_MORE_RESUMABLE)
|
||||
pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // Simulate menu selection
|
||||
#endif
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
|
@@ -23,6 +23,8 @@
|
||||
/**
|
||||
* feature/pause.cpp - Pause feature support functions
|
||||
* This may be combined with related G-codes if features are consolidated.
|
||||
*
|
||||
* Note: Calls to ui.pause_show_message are passed to either ExtUI or MarlinUI.
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
@@ -60,8 +62,6 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#include "../lcd/marlinui.h"
|
||||
@@ -148,7 +148,7 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P
|
||||
thermalManager.setTargetHotend(thermalManager.extrude_min_temp, active_extruder);
|
||||
#endif
|
||||
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode); UNUSED(mode);
|
||||
ui.pause_show_message(PAUSE_MESSAGE_HEATING, mode);
|
||||
|
||||
if (wait) return thermalManager.wait_for_hotend(active_extruder);
|
||||
|
||||
@@ -288,8 +288,8 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
|
||||
// Show "Purge More" / "Resume" menu and wait for reply
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
wait_for_user = false;
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI)
|
||||
ui.pause_show_message(PAUSE_MESSAGE_OPTION); // MarlinUI and MKS UI also set PAUSE_RESPONSE_WAIT_FOR
|
||||
#else
|
||||
pause_menu_response = PAUSE_RESPONSE_WAIT_FOR;
|
||||
#endif
|
||||
|
@@ -48,8 +48,8 @@ uint8_t PrintJobRecovery::queue_index_r;
|
||||
uint32_t PrintJobRecovery::cmd_sdpos, // = 0
|
||||
PrintJobRecovery::sdpos[BUFSIZE];
|
||||
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
bool PrintJobRecovery::dwin_flag; // = false
|
||||
#if HAS_PLR_UI_FLAG
|
||||
bool PrintJobRecovery::ui_flag_resume; // = false
|
||||
#endif
|
||||
|
||||
#include "../sd/cardreader.h"
|
||||
|
@@ -151,8 +151,8 @@ class PrintJobRecovery {
|
||||
static uint32_t cmd_sdpos, //!< SD position of the next command
|
||||
sdpos[BUFSIZE]; //!< SD positions of queued commands
|
||||
|
||||
#if HAS_DWIN_E3V2_BASIC
|
||||
static bool dwin_flag;
|
||||
#if HAS_PLR_UI_FLAG
|
||||
static bool ui_flag_resume; //!< Flag the UI to show a dialog to Resume (M1000) or Cancel (M1000C)
|
||||
#endif
|
||||
|
||||
static void init();
|
||||
|
@@ -68,8 +68,6 @@ bool FilamentMonitorBase::enabled = true,
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
void event_filament_runout(const uint8_t extruder) {
|
||||
@@ -88,7 +86,6 @@ void event_filament_runout(const uint8_t extruder) {
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder)));
|
||||
TERN_(DWIN_LCD_PROUI, dwinFilamentRunout(extruder));
|
||||
|
||||
#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
|
||||
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
|
||||
|
@@ -144,7 +144,6 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
@@ -153,7 +152,6 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr int8_t sgt_min = -64,
|
||||
sgt_max = 63;
|
||||
@@ -207,13 +205,11 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
void refresh_hybrid_thrs() { set_pwm_thrs(this->stored.hybrid_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
|
||||
@@ -269,7 +265,6 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if ENABLED(HYBRID_THRESHOLD)
|
||||
@@ -278,7 +273,6 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr uint8_t sgt_min = 0,
|
||||
sgt_max = 255;
|
||||
@@ -315,13 +309,11 @@ class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC266
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_MARLINUI_MENU, DWIN_LCD_PROUI)
|
||||
void refresh_stepper_current() { rms_current(this->val_mA); }
|
||||
|
||||
#if USE_SENSORLESS
|
||||
void refresh_homing_thrs() { homing_threshold(this->stored.homing_thrs); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static constexpr int8_t sgt_min = -64,
|
||||
sgt_max = 63;
|
||||
|
@@ -51,8 +51,6 @@
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -77,7 +75,7 @@ static void pre_g29_return(const bool retry, const bool did) {
|
||||
TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE, false));
|
||||
}
|
||||
if (did) {
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinLevelingDone());
|
||||
TERN_(DWIN_CREALITY_LCD, dwinLevelingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingDone());
|
||||
}
|
||||
}
|
||||
@@ -425,8 +423,6 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#if ENABLED(AUTO_BED_LEVELING_3POINT)
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling");
|
||||
points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
#endif
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
@@ -436,11 +432,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP,
|
||||
#if ALL(DWIN_LCD_PROUI, HAS_HEATED_BED)
|
||||
hmiData.bedLevT
|
||||
#else
|
||||
LEVELING_BED_TEMP
|
||||
#endif
|
||||
TERN(EXTENSIBLE_UI, ExtUI::getLevelingBedTemp(), LEVELING_BED_TEMP)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
@@ -40,8 +40,6 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -144,7 +142,6 @@ void GcodeSuite::G29() {
|
||||
queue.inject(F("G29S2"));
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onLevelingStart());
|
||||
TERN_(DWIN_LCD_PROUI, dwinLevelingStart());
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -170,7 +167,6 @@ void GcodeSuite::G29() {
|
||||
// Save Z for the previous mesh position
|
||||
bedlevel.set_zigzag_z(mbl_probe_index - 1, current_position.z);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
|
||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||
}
|
||||
// If there's another point to sample, move there with optional lift.
|
||||
@@ -237,7 +233,6 @@ void GcodeSuite::G29() {
|
||||
if (parser.seenval('Z')) {
|
||||
bedlevel.z_values[ix][iy] = parser.value_linear_units();
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ix, iy, bedlevel.z_values[ix][iy]));
|
||||
}
|
||||
else
|
||||
return echo_not_entered('Z');
|
||||
|
@@ -33,8 +33,6 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -69,7 +67,6 @@ void GcodeSuite::M421() {
|
||||
float &zval = bedlevel.z_values[ij.x][ij.y]; // Altering this Mesh Point
|
||||
zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh
|
||||
TERN_(DWIN_LCD_PROUI, dwinMeshUpdate(ij.x, ij.y, zval));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -52,8 +52,6 @@
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LASER_FEATURE)
|
||||
@@ -223,7 +221,7 @@ void GcodeSuite::G28() {
|
||||
set_and_report_grblstate(M_HOMING);
|
||||
#endif
|
||||
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingStart());
|
||||
TERN_(DWIN_CREALITY_LCD, dwinHomingStart());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart());
|
||||
|
||||
planner.synchronize(); // Wait for planner moves to finish!
|
||||
@@ -652,7 +650,7 @@ void GcodeSuite::G28() {
|
||||
|
||||
ui.refresh();
|
||||
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinHomingDone());
|
||||
TERN_(DWIN_CREALITY_LCD, dwinHomingDone());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHomingDone());
|
||||
|
||||
report_current_position();
|
||||
|
@@ -25,12 +25,13 @@
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#endif
|
||||
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
/**
|
||||
* M302: Allow cold extrudes, or set the minimum extrude temperature
|
||||
*
|
||||
@@ -50,13 +51,14 @@ void GcodeSuite::M302() {
|
||||
const bool seen_S = parser.seen('S');
|
||||
if (seen_S) {
|
||||
thermalManager.extrude_min_temp = parser.value_celsius();
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0);
|
||||
TERN_(DWIN_LCD_PROUI, hmiData.extMinT = thermalManager.extrude_min_temp);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onSetMinExtrusionTemp(thermalManager.extrude_min_temp));
|
||||
}
|
||||
|
||||
if (parser.seen('P'))
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0) || parser.value_bool();
|
||||
else if (!seen_S) {
|
||||
const bool seen_P = parser.seen('P');
|
||||
if (seen_P || seen_S) {
|
||||
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0) || (seen_P && parser.value_bool());
|
||||
}
|
||||
else {
|
||||
// Report current state
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLN(F("Cold extrudes are "), thermalManager.allow_cold_extrude ? F("en") : F("dis"), F("abled (min temp "), thermalManager.extrude_min_temp, F("C)"));
|
||||
|
@@ -24,8 +24,8 @@
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
void GcodeSuite::M997() {
|
||||
|
||||
TERN_(DWIN_LCD_PROUI, dwinRebootScreen());
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onFirmwareFlash());
|
||||
|
||||
flashFirmware(parser.intval('S'));
|
||||
|
||||
|
@@ -37,8 +37,6 @@
|
||||
#include "../../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../../../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../../lcd/e3v2/proui/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented
|
||||
#endif
|
||||
@@ -76,12 +74,12 @@ void GcodeSuite::M1000() {
|
||||
if (!force_resume && parser.seen_test('S')) {
|
||||
#if HAS_MARLINUI_MENU
|
||||
ui.goto_screen(menu_job_recovery);
|
||||
#elif HAS_DWIN_E3V2_BASIC
|
||||
recovery.dwin_flag = true;
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
|
||||
jyersDWIN.popupHandler(Popup_Resume);
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onPowerLossResume();
|
||||
#elif HAS_PLR_UI_FLAG
|
||||
recovery.ui_flag_resume = true;
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented
|
||||
jyersDWIN.popupHandler(Popup_Resume);
|
||||
#else
|
||||
SERIAL_ECHO_MSG("Resume requires LCD.");
|
||||
#endif
|
||||
|
@@ -35,9 +35,6 @@
|
||||
#include "../../lcd/marlinui.h"
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin_popup.h"
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
@@ -66,16 +63,20 @@ void GcodeSuite::M0_M1() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif ENABLED(DWIN_LCD_PROUI) // ExtUI with icon, string, button title
|
||||
|
||||
if (parser.string_arg)
|
||||
ExtUI::onUserConfirmRequired(ICON_Continue_1, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
|
||||
else
|
||||
ExtUI::onUserConfirmRequired(ICON_Stop_1, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
|
||||
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
|
||||
if (parser.string_arg)
|
||||
ExtUI::onUserConfirmRequired(parser.string_arg); // String in an SRAM buffer
|
||||
else
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT));
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
if (parser.string_arg)
|
||||
dwinPopupConfirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
|
||||
else
|
||||
dwinPopupConfirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
|
||||
|
||||
#else
|
||||
|
||||
if (parser.string_arg) {
|
||||
|
@@ -29,10 +29,6 @@
|
||||
#include "../../sd/cardreader.h"
|
||||
#include "../../libs/numtostr.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M73: Set percentage complete (for display on LCD)
|
||||
*
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#include "../../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define VERBOSE_SINGLE_PROBE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* G30: Do a single Z probe at the given XY (default: current)
|
||||
*
|
||||
@@ -66,9 +70,7 @@ void GcodeSuite::G30() {
|
||||
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
process_subcommands_now(F("G28O"));
|
||||
#endif
|
||||
TERN_(VERBOSE_SINGLE_PROBE, process_subcommands_now(F("G28O")));
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||
|
||||
@@ -83,9 +85,7 @@ void GcodeSuite::G30() {
|
||||
F( " Z:"), p_float_t(measured_z, 3)
|
||||
);
|
||||
msg.echoln();
|
||||
#if ANY(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
ui.set_status(msg);
|
||||
#endif
|
||||
TERN_(VERBOSE_SINGLE_PROBE, ui.set_status(msg));
|
||||
}
|
||||
|
||||
restore_feedrate_and_scaling();
|
||||
|
@@ -27,8 +27,8 @@
|
||||
#include "../gcode.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../../lcd/marlinui.h"
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -36,9 +36,9 @@
|
||||
*/
|
||||
void GcodeSuite::M524() {
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
|
||||
ui.abort_print();
|
||||
ExtUI::stopPrint(); // Calls ui.abort_print() which does the same as below
|
||||
|
||||
#else
|
||||
|
||||
|
@@ -35,10 +35,14 @@
|
||||
|
||||
/**
|
||||
* M75: Start print timer
|
||||
*
|
||||
* ProUI: If the print fails to start and any text is
|
||||
* included in the command, print it in the header.
|
||||
*/
|
||||
void GcodeSuite::M75() {
|
||||
startOrResumeJob();
|
||||
startOrResumeJob(); // ... ExtUI::onPrintTimerStarted()
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
// TODO: Remove if M75 <string> is never used
|
||||
if (!IS_SD_PRINTING()) dwinPrintHeader(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
|
||||
#endif
|
||||
}
|
||||
@@ -47,7 +51,7 @@ void GcodeSuite::M75() {
|
||||
* M76: Pause print timer
|
||||
*/
|
||||
void GcodeSuite::M76() {
|
||||
TERN(DWIN_LCD_PROUI, ui.pause_print(), print_job_timer.pause());
|
||||
print_job_timer.pause(); // ... ExtUI::onPrintTimerPaused()
|
||||
TERN_(HOST_PAUSE_M76, hostui.pause());
|
||||
}
|
||||
|
||||
|
@@ -31,8 +31,6 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(PROUI_PID_TUNE)
|
||||
#include "../../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -68,8 +66,7 @@ void GcodeSuite::M303() {
|
||||
default:
|
||||
SERIAL_ECHOPGM(STR_PID_AUTOTUNE);
|
||||
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_BAD_HEATER_ID));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_BAD_HEATER_ID));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_BAD_HEATER_ID));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,7 +76,7 @@ void GcodeSuite::M303() {
|
||||
const celsius_t temp = seenS ? parser.value_celsius() : default_temp;
|
||||
const bool u = parser.boolval('U');
|
||||
|
||||
TERN_(PROUI_PID_TUNE, dwinStartM303(seenC, c, seenS, hid, temp));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(c, hid, temp));
|
||||
|
||||
IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));
|
||||
|
||||
|
@@ -1035,16 +1035,13 @@
|
||||
#endif
|
||||
|
||||
// Extensible UI serial touch screens. (See src/lcd/extui)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE)
|
||||
#if ANY(HAS_DGUS_LCD, MALYAN_LCD, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT, TOUCH_UI_FTDI_EVE, DWIN_LCD_PROUI)
|
||||
#define IS_EXTUI 1 // Just for sanity check.
|
||||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
|
||||
// Aliases for LCD features
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
|
||||
#define HAS_DWIN_E3V2_BASIC 1
|
||||
#endif
|
||||
#if ANY(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#define HAS_DWIN_E3V2 1
|
||||
#endif
|
||||
|
||||
@@ -1058,6 +1055,7 @@
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#define DO_LIST_BIN_FILES 1
|
||||
#define LCD_BRIGHTNESS_DEFAULT 127
|
||||
#define STATUS_DO_CLEAR_EMPTY
|
||||
#endif
|
||||
|
||||
// Serial Controllers require LCD_SERIAL_PORT
|
||||
@@ -1092,6 +1090,7 @@
|
||||
* - draw_kill_screen
|
||||
* - kill_screen
|
||||
* - draw_status_message
|
||||
* (calling advance_status_scroll, status_and_len for a scrolling status message)
|
||||
*/
|
||||
#define HAS_DISPLAY 1
|
||||
#endif
|
||||
|
@@ -323,6 +323,13 @@
|
||||
#define HAS_LINEAR_E_JERK 1
|
||||
#endif
|
||||
|
||||
// Some displays can toggle Adaptive Step Smoothing.
|
||||
// The state is saved to EEPROM.
|
||||
// In future this may be added to a G-code such as M205 A.
|
||||
#if ALL(ADAPTIVE_STEP_SMOOTHING, DWIN_LCD_PROUI)
|
||||
#define ADAPTIVE_STEP_SMOOTHING_TOGGLE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Temperature Sensors; define what sensor(s) we have.
|
||||
*/
|
||||
@@ -1381,6 +1388,11 @@
|
||||
#endif
|
||||
|
||||
// Power-Loss Recovery
|
||||
#if ENABLED(POWER_LOSS_RECOVERY) && defined(PLR_BED_THRESHOLD)
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#ifdef PLR_BED_THRESHOLD
|
||||
#define HAS_PLR_BED_THRESHOLD 1
|
||||
#endif
|
||||
#if ANY(DWIN_CREALITY_LCD, DWIN_LCD_PROUI)
|
||||
#define HAS_PLR_UI_FLAG 1 // recovery.ui_flag_resume
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -2487,9 +2487,6 @@
|
||||
// PID heating
|
||||
#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER)
|
||||
#define HAS_PID_HEATING 1
|
||||
#if ENABLED(DWIN_LCD_PROUI) && ANY(PIDTEMP, PIDTEMPBED)
|
||||
#define PROUI_PID_TUNE 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Thermal protection
|
||||
@@ -3047,8 +3044,8 @@
|
||||
* Advanced Pause - Filament Change
|
||||
*/
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
|
||||
#define M600_PURGE_MORE_RESUMABLE 1
|
||||
#if ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) || ALL(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT)
|
||||
#define M600_PURGE_MORE_RESUMABLE 1 // UI provides some way to Purge More / Resume
|
||||
#endif
|
||||
#ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
#include "HAL_LCD_class_defines.h"
|
||||
#include "u8g/HAL_LCD_class_defines.h"
|
||||
|
||||
//#define ALTERNATIVE_LCD
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
// use this file to create the public interface for device drivers that are NOT in the U8G library
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <U8glib-HAL.h>
|
||||
|
||||
#include HAL_PATH(../.., u8g/LCD_defines.h)
|
||||
#include HAL_PATH(../../.., u8g/LCD_defines.h)
|
||||
|
||||
#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT
|
||||
uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
|
@@ -65,7 +65,7 @@
|
||||
* beginning.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
@@ -53,7 +53,7 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
@@ -53,7 +53,7 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB && DISABLED(TFT_CLASSIC_UI)
|
||||
|
@@ -53,12 +53,12 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT)
|
||||
|
||||
#include "HAL_LCD_com_defines.h"
|
||||
#include "marlinui_DOGM.h"
|
||||
#include "../marlinui_DOGM.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#define HAS_LCD_IO 1
|
||||
#endif
|
||||
|
||||
#include "../tft_io/tft_io.h"
|
||||
#include "../../tft_io/tft_io.h"
|
||||
TFT_IO tftio;
|
||||
|
||||
#define WIDTH LCD_PIXEL_WIDTH
|
||||
@@ -74,12 +74,12 @@ TFT_IO tftio;
|
||||
#define PAGE_HEIGHT 8
|
||||
|
||||
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
|
||||
#include "../tft_io/touch_calibration.h"
|
||||
#include "../marlinui.h"
|
||||
#include "../../tft_io/touch_calibration.h"
|
||||
#include "../../marlinui.h"
|
||||
#endif
|
||||
|
||||
#include "../touch/touch_buttons.h"
|
||||
#include "../scaled_tft.h"
|
||||
#include "../../touch/touch_buttons.h"
|
||||
#include "../../scaled_tft.h"
|
||||
|
||||
#define X_HI (UPSCALE(TFT_PIXEL_OFFSET_X, WIDTH) - 1)
|
||||
#define Y_HI (UPSCALE(TFT_PIXEL_OFFSET_Y, HEIGHT) - 1)
|
@@ -53,7 +53,7 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if HAS_MARLINUI_U8GLIB
|
||||
|
@@ -23,11 +23,11 @@
|
||||
// NOTE - the HAL version of the rrd device uses a generic ST7920 device.
|
||||
// See u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ANY(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32)
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
|
||||
#if IS_U8GLIB_ST7920
|
||||
|
||||
@@ -184,7 +184,7 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8
|
||||
#pragma GCC reset_options
|
||||
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
#include "../../HAL/shared/HAL_ST7920.h"
|
||||
#include "../../../HAL/shared/HAL_ST7920.h"
|
||||
void ST7920_cs() { ST7920_CS(); }
|
||||
void ST7920_ncs() { ST7920_NCS(); }
|
||||
void ST7920_set_cmd() { ST7920_SET_CMD(); }
|
@@ -24,8 +24,8 @@
|
||||
// NOTE - the HAL version of the rrd device uses a generic ST7920 device. See the
|
||||
// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../HAL/shared/Delay.h"
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../../HAL/shared/Delay.h"
|
||||
|
||||
#define ST7920_CLK_PIN LCD_PINS_D4
|
||||
#define ST7920_DAT_PIN LCD_PINS_EN
|
@@ -153,6 +153,7 @@ void dwinFrameClear(const uint16_t color) {
|
||||
dwinSend(i);
|
||||
}
|
||||
|
||||
#if DISABLED(TJC_DISPLAY)
|
||||
// Draw a point
|
||||
// color: point color
|
||||
// width: point width 0x01-0x0F
|
||||
@@ -168,6 +169,7 @@ void dwinDrawPoint(uint16_t color, uint8_t width, uint8_t height, uint16_t x, ui
|
||||
dwinWord(i, y);
|
||||
dwinSend(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Draw a line
|
||||
// color: Line segment color
|
||||
|
@@ -113,13 +113,6 @@ void dwinUpdateLCD();
|
||||
// color: Clear screen color
|
||||
void dwinFrameClear(const uint16_t color);
|
||||
|
||||
// Draw a point
|
||||
// color: point color
|
||||
// width: point width 0x01-0x0F
|
||||
// height: point height 0x01-0x0F
|
||||
// x,y: upper left point
|
||||
void dwinDrawPoint(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y);
|
||||
|
||||
// Draw a line
|
||||
// color: Line segment color
|
||||
// xStart/yStart: Start point
|
||||
@@ -158,6 +151,19 @@ inline void dwinDrawBox(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t
|
||||
dwinDrawRectangle(mode, color, xStart, yStart, xStart + xSize - 1, yStart + ySize - 1);
|
||||
}
|
||||
|
||||
// Draw a point
|
||||
// color: point color
|
||||
// width: point width 0x01-0x0F
|
||||
// height: point height 0x01-0x0F
|
||||
// x,y: upper left point
|
||||
#if ENABLED(TJC_DISPLAY)
|
||||
inline void dwinDrawPoint(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) {
|
||||
dwinDrawBox(1, color, x, y, 1, 1);
|
||||
}
|
||||
#else
|
||||
void dwinDrawPoint(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y);
|
||||
#endif
|
||||
|
||||
// Move a screen area
|
||||
// mode: 0, circle shift; 1, translation
|
||||
// dir: 0=left, 1=right, 2=up, 3=down
|
||||
|
@@ -130,7 +130,7 @@
|
||||
|
||||
#define ICON_Folder ICON_More
|
||||
#define ICON_AdvSet ICON_Language
|
||||
#define ICON_HomeOffset ICON_AdvSet
|
||||
#define ICON_HomeOffset ICON_PrintSize
|
||||
#define ICON_HomeOffsetX ICON_StepX
|
||||
#define ICON_HomeOffsetY ICON_StepY
|
||||
#define ICON_HomeOffsetZ ICON_StepZ
|
||||
@@ -138,8 +138,8 @@
|
||||
#define ICON_ProbeOffsetX ICON_StepX
|
||||
#define ICON_ProbeOffsetY ICON_StepY
|
||||
#define ICON_ProbeOffsetZ ICON_StepZ
|
||||
#define ICON_PIDNozzle ICON_SetEndTemp
|
||||
#define ICON_PIDBed ICON_SetBedTemp
|
||||
#define ICON_PIDNozzle ICON_HotendTemp
|
||||
#define ICON_PIDBed ICON_BedTemp
|
||||
#define ICON_FWRetract ICON_StepE
|
||||
#define ICON_FWRetLength ICON_StepE
|
||||
#define ICON_FWRetSpeed ICON_Setspeed
|
||||
|
@@ -4169,8 +4169,8 @@ void eachMomentUpdate() {
|
||||
gotoMainMenu();
|
||||
}
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off
|
||||
recovery.dwin_flag = false;
|
||||
else if (DWIN_lcd_sd_status && recovery.ui_flag_resume) { // Resume interrupted print
|
||||
recovery.ui_flag_resume = false;
|
||||
|
||||
auto update_selection = [&](const bool sel) {
|
||||
hmiFlag.select_flag = sel;
|
||||
@@ -4197,7 +4197,7 @@ void eachMomentUpdate() {
|
||||
if (encoder_diffState == ENCODER_DIFF_ENTER) {
|
||||
recovery_flag = false;
|
||||
if (hmiFlag.select_flag) break;
|
||||
TERN_(POWER_LOSS_RECOVERY, queue.inject(F("M1000C")));
|
||||
queue.inject(F("M1000C"));
|
||||
hmiStartFrame(true);
|
||||
return;
|
||||
}
|
||||
|
@@ -158,6 +158,8 @@
|
||||
#define MAX_ETEMP thermalManager.hotend_max_target(0)
|
||||
#define MIN_BEDTEMP 0
|
||||
#define MAX_BEDTEMP BED_MAX_TARGET
|
||||
#define MIN_CHAMBERTEMP 0
|
||||
#define MAX_CHAMBERTEMP CHAMBER_MAX_TARGET
|
||||
|
||||
#define DWIN_VAR_UPDATE_INTERVAL 500
|
||||
#define DWIN_UPDATE_INTERVAL 1000
|
||||
@@ -243,12 +245,17 @@ Menu *stepsMenu = nullptr;
|
||||
#if ANY(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
|
||||
Menu *hotendMPCMenu = nullptr;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMP) && ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
|
||||
#if ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
|
||||
#if ENABLED(PIDTEMP)
|
||||
Menu *hotendPIDMenu = nullptr;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED) && ANY(PID_EDIT_MENU, PID_AUTOTUNE_MENU)
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
Menu *bedPIDMenu = nullptr;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
Menu *chamberPIDMenu = nullptr;
|
||||
#endif
|
||||
#endif
|
||||
#if CASELIGHT_USES_BRIGHTNESS
|
||||
Menu *caseLightMenu = nullptr;
|
||||
#endif
|
||||
@@ -418,49 +425,50 @@ void popupPauseOrStop() {
|
||||
drawSelectHighlight(true);
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
else
|
||||
dwinPopupConfirmCancel(ICON_BLTouch, select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT));
|
||||
else {
|
||||
switch (select_print.now) {
|
||||
case PRINT_PAUSE_RESUME: dwinPopupConfirmCancel(ICON_Pause_1, GET_TEXT_F(MSG_PAUSE_PRINT)); break;
|
||||
case PRINT_STOP: dwinPopupConfirmCancel(ICON_Stop_1, GET_TEXT_F(MSG_STOP_PRINT)); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_HOTEND
|
||||
|
||||
void popupETempTooLow() {
|
||||
if (hmiIsChinese()) {
|
||||
hmiSaveProcessID(ID_WaitResponse);
|
||||
DWINUI::clearMainArea();
|
||||
drawPopupBkgd();
|
||||
DWINUI::drawIcon(ICON_TempTooLow, 102, 105);
|
||||
dwinFrameAreaCopy(1, 103, 371, 136, 386, 69, 240);
|
||||
dwinFrameAreaCopy(1, 170, 371, 270, 386, 102, 240);
|
||||
DWINUI::drawIconWB(ICON_Confirm_C, 86, 280);
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
else
|
||||
dwinPopupConfirm(ICON_TempTooLow, GET_TEXT_F(MSG_HOTEND_TOO_COLD), GET_TEXT_F(MSG_PLEASE_PREHEAT));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if HAS_HOTEND || HAS_HEATED_BED
|
||||
void dwinPopupTemperature(const bool toohigh) {
|
||||
#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER
|
||||
void dwinPopupTemperature(const int_fast8_t heater_id, const uint8_t state) {
|
||||
hmiSaveProcessID(ID_WaitResponse);
|
||||
if (hmiIsChinese()) {
|
||||
DWINUI::clearMainArea();
|
||||
drawPopupBkgd();
|
||||
if (toohigh) {
|
||||
if (state == 1) {
|
||||
DWINUI::drawIcon(ICON_TempTooHigh, 102, 165);
|
||||
dwinFrameAreaCopy(1, 103, 371, 237, 386, 52, 285);
|
||||
dwinFrameAreaCopy(1, 151, 389, 185, 402, 187, 285);
|
||||
dwinFrameAreaCopy(1, 189, 389, 271, 402, 95, 310);
|
||||
}
|
||||
else {
|
||||
else if (state == 0) {
|
||||
DWINUI::drawIcon(ICON_TempTooLow, 102, 165);
|
||||
dwinFrameAreaCopy(1, 103, 371, 270, 386, 52, 285);
|
||||
dwinFrameAreaCopy(1, 189, 389, 271, 402, 95, 310);
|
||||
}
|
||||
else {
|
||||
// Chinese "Temp Error"
|
||||
}
|
||||
}
|
||||
else {
|
||||
FSTR_P heaterstr = nullptr;
|
||||
if (TERN0(HAS_HEATED_BED, heater_id == H_BED)) heaterstr = F("Bed");
|
||||
else if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) heaterstr = F("Chamber");
|
||||
else if (TERN0(HAS_HOTEND, heater_id >= 0)) heaterstr = F("Nozzle");
|
||||
FSTR_P errorstr;
|
||||
uint8_t icon;
|
||||
switch (state) {
|
||||
case 0: errorstr = GET_TEXT_F(MSG_TEMP_TOO_LOW); icon = ICON_TempTooLow; break;
|
||||
case 1: errorstr = GET_TEXT_F(MSG_TEMP_TOO_HIGH); icon = ICON_TempTooHigh; break;
|
||||
default: errorstr = GET_TEXT_F(MSG_ERR_HEATING_FAILED); icon = ICON_Temperature; break; // May be thermal runaway, temp malfunction, etc.
|
||||
}
|
||||
dwinShowPopup(icon, heaterstr, errorstr, BTN_Continue);
|
||||
}
|
||||
else
|
||||
dwinShowPopup(toohigh ? ICON_TempTooHigh : ICON_TempTooLow, F("Nozzle or Bed temperature"), toohigh ? F("is too high") : F("is too low"), BTN_Continue);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -581,12 +589,13 @@ void ICON_ResumeOrPause() {
|
||||
if (checkkey == ID_PrintProcess) (print_job_timer.isPaused() || hmiFlag.pause_flag) ? ICON_Resume() : ICON_Pause();
|
||||
}
|
||||
|
||||
// Update filename on print
|
||||
void dwinPrintHeader(const char *text = nullptr) {
|
||||
// Print a string (up to 30 characters) in the header,
|
||||
// e.g., The filename or string sent with M75.
|
||||
void dwinPrintHeader(const char * const cstr/*=nullptr*/) {
|
||||
static char headertxt[31] = ""; // Print header text
|
||||
if (text) {
|
||||
const int8_t size = _MIN(30U, strlen_P(text));
|
||||
for (uint8_t i = 0; i < size; ++i) headertxt[i] = text[i];
|
||||
if (cstr) {
|
||||
const int8_t size = _MIN(30U, strlen(cstr));
|
||||
for (uint8_t i = 0; i < size; ++i) headertxt[i] = cstr[i];
|
||||
headertxt[size] = '\0';
|
||||
}
|
||||
if (checkkey == ID_PrintProcess || checkkey == ID_PrintDone) {
|
||||
@@ -601,7 +610,7 @@ void drawPrintProcess() {
|
||||
else
|
||||
title.showCaption(GET_TEXT_F(MSG_PRINTING));
|
||||
DWINUI::clearMainArea();
|
||||
dwinPrintHeader(nullptr);
|
||||
dwinPrintHeader();
|
||||
drawPrintLabels();
|
||||
DWINUI::drawIcon(ICON_PrintTime, 15, 173);
|
||||
DWINUI::drawIcon(ICON_RemainTime, 150, 171);
|
||||
@@ -629,7 +638,7 @@ void drawPrintDone() {
|
||||
TERN_(SET_REMAINING_TIME, ui.reset_remaining_time());
|
||||
title.showCaption(GET_TEXT_F(MSG_PRINT_DONE));
|
||||
DWINUI::clearMainArea();
|
||||
dwinPrintHeader(nullptr);
|
||||
dwinPrintHeader();
|
||||
#if HAS_GCODE_PREVIEW
|
||||
const bool haspreview = preview.valid();
|
||||
if (haspreview) {
|
||||
@@ -1031,7 +1040,7 @@ void hmiSDCardUpdate() {
|
||||
currentMenu = nullptr;
|
||||
drawPrintFileMenu();
|
||||
}
|
||||
if (!DWIN_lcd_sd_status && sdPrinting()) ui.abort_print(); // Media removed while printing
|
||||
if (!DWIN_lcd_sd_status && sdPrinting()) ExtUI::stopPrint(); // Media removed while printing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1060,7 +1069,7 @@ void dwinDrawDashboard() {
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
DWINUI::drawIcon(ICON_BedTemp, 10, 416);
|
||||
DWINUI::drawIcon(ICON_SetBedTemp, 10, 416);
|
||||
DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 28, 417, thermalManager.wholeDegBed());
|
||||
DWINUI::drawString(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 25 + 3 * STAT_CHR_W + 5, 417, F("/"));
|
||||
DWINUI::drawInt(DWIN_FONT_STAT, hmiData.colorIndicator, hmiData.colorBackground, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed());
|
||||
@@ -1155,8 +1164,8 @@ void hmiMainMenu() {
|
||||
// Pause or Stop popup
|
||||
void onClickPauseOrStop() {
|
||||
switch (select_print.now) {
|
||||
case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ui.pause_print(); break; // Confirm pause
|
||||
case PRINT_STOP: if (hmiFlag.select_flag) ui.abort_print(); break; // Stop confirmed then abort print
|
||||
case PRINT_PAUSE_RESUME: if (hmiFlag.select_flag) ExtUI::pausePrint(); break; // Confirm pause
|
||||
case PRINT_STOP: if (hmiFlag.select_flag) ExtUI::stopPrint(); break; // Stop confirmed then abort print
|
||||
default: break;
|
||||
}
|
||||
return gotoPrintProcess();
|
||||
@@ -1190,7 +1199,7 @@ void hmiPrinting() {
|
||||
case PRINT_SETUP: drawTuneMenu(); break;
|
||||
case PRINT_PAUSE_RESUME:
|
||||
if (printingIsPaused()) { // If printer is already in pause
|
||||
ui.resume_print();
|
||||
ExtUI::resumePrint();
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -1213,6 +1222,20 @@ void drawMainArea() {
|
||||
#if HAS_ESDIAG
|
||||
case ID_ESDiagProcess: drawEndStopDiag(); break;
|
||||
#endif
|
||||
#if ENABLED(PROUI_ITEM_PLOT)
|
||||
case ID_PlotProcess:
|
||||
switch (hmiValue.tempControl) {
|
||||
#if ENABLED(PIDTEMP)
|
||||
case PIDTEMP_START: drawHPlot(); break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case PIDTEMPBED_START: drawBPlot(); break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case PIDTEMPCHAMBER_START: drawCPlot(); break;
|
||||
#endif
|
||||
} break;
|
||||
#endif
|
||||
case ID_Popup: popupDraw(); break;
|
||||
#if HAS_LOCKSCREEN
|
||||
case ID_Locked: lockScreen.draw(); break;
|
||||
@@ -1280,12 +1303,14 @@ void eachMomentUpdate() {
|
||||
if (checkkey == ID_PIDProcess) {
|
||||
TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) plot.update(thermalManager.wholeDegHotend(0)));
|
||||
TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) plot.update(thermalManager.wholeDegBed()));
|
||||
TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PIDTEMPCHAMBER_START) plot.update(thermalManager.wholeDegChamber()));
|
||||
}
|
||||
TERN_(MPCTEMP, if (checkkey == ID_MPCProcess) plot.update(thermalManager.wholeDegHotend(0)));
|
||||
#if ENABLED(PROUI_ITEM_PLOT)
|
||||
if (checkkey == ID_PlotProcess) {
|
||||
TERN_(PIDTEMP, if (hmiValue.tempControl == PIDTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); })
|
||||
TERN_(PIDTEMPBED, if (hmiValue.tempControl == PIDTEMPBED_START) { plot.update(thermalManager.wholeDegBed()); })
|
||||
TERN_(PIDTEMPCHAMBER, if (hmiValue.tempControl == PIDTEMPCHAMBER_START) { plot.update(thermalManager.wholeDegChamber()); })
|
||||
TERN_(MPCTEMP, if (hmiValue.tempControl == MPCTEMP_START) { plot.update(thermalManager.wholeDegHotend(0)); })
|
||||
if (hmiFlag.abort_flag || hmiFlag.pause_flag || print_job_timer.isPaused()) {
|
||||
hmiReturnScreen();
|
||||
@@ -1357,8 +1382,8 @@ void eachMomentUpdate() {
|
||||
drawPrintProgressElapsed();
|
||||
}
|
||||
}
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // Resume print before power off
|
||||
#if HAS_PLR_UI_FLAG
|
||||
else if (DWIN_lcd_sd_status && recovery.ui_flag_resume) { // Resume interrupted print
|
||||
return gotoPowerLossRecovery();
|
||||
}
|
||||
#endif
|
||||
@@ -1368,6 +1393,7 @@ void eachMomentUpdate() {
|
||||
}
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
|
||||
void popupPowerLossRecovery() {
|
||||
DWINUI::clearMainArea();
|
||||
drawPopupBkgd();
|
||||
@@ -1407,7 +1433,7 @@ void eachMomentUpdate() {
|
||||
}
|
||||
|
||||
void gotoPowerLossRecovery() {
|
||||
recovery.dwin_flag = false;
|
||||
recovery.ui_flag_resume = false;
|
||||
LCD_MESSAGE(MSG_CONTINUE_PRINT_JOB);
|
||||
gotoPopup(popupPowerLossRecovery, onClickPowerLossRecovery);
|
||||
}
|
||||
@@ -1435,7 +1461,8 @@ void dwinHandleScreen() {
|
||||
|
||||
TERN_(HAS_BED_PROBE, case ID_Leveling:)
|
||||
case ID_Homing:
|
||||
case ID_PIDProcess:
|
||||
TERN_(HAS_PID_HEATING, case ID_PIDProcess:)
|
||||
TERN_(MPCTEMP, case ID_MPCProcess:)
|
||||
case ID_NothingToDo:
|
||||
default: break;
|
||||
}
|
||||
@@ -1449,7 +1476,9 @@ bool idIsPopUp() { // If ID is popup...
|
||||
case ID_WaitResponse:
|
||||
case ID_Popup:
|
||||
case ID_Homing:
|
||||
case ID_PIDProcess:
|
||||
TERN_(HAS_PID_HEATING, case ID_PIDProcess:)
|
||||
TERN_(MPCTEMP, case ID_MPCProcess:)
|
||||
TERN_(PROUI_ITEM_PLOT, case ID_PlotProcess:)
|
||||
return true;
|
||||
default: break;
|
||||
}
|
||||
@@ -1482,7 +1511,11 @@ void dwinHomingStart() {
|
||||
hmiFlag.home_flag = true;
|
||||
hmiSaveProcessID(ID_Homing);
|
||||
title.showCaption(GET_TEXT_F(MSG_HOMING));
|
||||
#if ANY(TJC_DISPLAY, DACAI_DISPLAY)
|
||||
dwinShowPopup(ICON_BLTouch, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
|
||||
#else
|
||||
dwinShowPopup(ICON_Printer_0, GET_TEXT_F(MSG_HOMING), GET_TEXT_F(MSG_PLEASE_WAIT));
|
||||
#endif
|
||||
}
|
||||
|
||||
void dwinHomingDone() {
|
||||
@@ -1499,22 +1532,7 @@ void dwinLevelingStart() {
|
||||
title.showCaption(GET_TEXT_F(MSG_BED_LEVELING));
|
||||
dwinShowPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), GET_TEXT_F(MSG_PLEASE_WAIT));
|
||||
#if ALL(AUTO_BED_LEVELING_UBL, PREHEAT_BEFORE_LEVELING)
|
||||
#if HAS_BED_PROBE
|
||||
if (!DEBUGGING(DRYRUN)) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, hmiData.bedLevT);
|
||||
#else
|
||||
#if HAS_HOTEND
|
||||
if (!DEBUGGING(DRYRUN) && thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) {
|
||||
thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
if (!DEBUGGING(DRYRUN) && thermalManager.degTargetBed() < hmiData.bedLevT) {
|
||||
thermalManager.setTargetBed(hmiData.bedLevT);
|
||||
thermalManager.wait_for_bed_heating();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#elif ENABLED(MESH_BED_LEVELING)
|
||||
drawManualMeshMenu();
|
||||
@@ -1551,7 +1569,7 @@ void dwinLevelingDone() {
|
||||
case MPCTEMP_START:
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_MPC_AUTOTUNE));
|
||||
DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("MPC target: Celsius"));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for NOZZLE is running."));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE));
|
||||
_maxtemp = thermalManager.hotend_maxtemp[0];
|
||||
_target = 200;
|
||||
break;
|
||||
@@ -1560,18 +1578,27 @@ void dwinLevelingDone() {
|
||||
case PIDTEMP_START:
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius"));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for NOZZLE is running."));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_NOZZLE));
|
||||
_maxtemp = thermalManager.hotend_maxtemp[0];
|
||||
_target = hmiData.hotendPidT;
|
||||
_target = hmiData.hotendPIDT;
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case PIDTEMPBED_START:
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius"));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, F("for BED is running."));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_BED));
|
||||
_maxtemp = BED_MAXTEMP;
|
||||
_target = hmiData.bedPidT;
|
||||
_target = hmiData.bedPIDT;
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case PIDTEMPCHAMBER_START:
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 70, GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
DWINUI::drawString(hmiData.colorPopupTxt, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("PID target: Celsius"));
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 92, GET_TEXT_F(MSG_PID_FOR_CHAMBER));
|
||||
_maxtemp = CHAMBER_MAXTEMP;
|
||||
_target = hmiData.chamberPIDT;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
@@ -1597,18 +1624,26 @@ void dwinLevelingDone() {
|
||||
case PIDTEMP_START:
|
||||
#endif
|
||||
title.showCaption(GET_TEXT_F(MSG_HOTEND_TEMP_GRAPH));
|
||||
DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Nozzle Temperature"));
|
||||
DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_NOZZLE));
|
||||
_maxtemp = thermalManager.hotend_max_target(0);
|
||||
_target = thermalManager.degTargetHotend(0);
|
||||
break;
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case PIDTEMPBED_START:
|
||||
title.showCaption(GET_TEXT_F(MSG_BED_TEMP_GRAPH));
|
||||
DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Bed Temperature"));
|
||||
DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_BED));
|
||||
_maxtemp = BED_MAX_TARGET;
|
||||
_target = thermalManager.degTargetBed();
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case PIDTEMPCHAMBER_START:
|
||||
title.showCaption(GET_TEXT_F(MSG_CHAMBER_TEMP_GRAPH));
|
||||
DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, GET_TEXT_F(MSG_TEMP_CHAMBER));
|
||||
_maxtemp = CHAMBER_MAX_TARGET;
|
||||
_target = thermalManager.degTargetChamber();
|
||||
break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
|
||||
@@ -1616,7 +1651,6 @@ void dwinLevelingDone() {
|
||||
plot.draw(gfrm, _maxtemp, _target);
|
||||
DWINUI::drawInt(false, 2, hmiData.colorStatusTxt, hmiData.colorPopupBg, 3, gfrm.x + 80, gfrm.y - DWINUI::fontHeight() - 4, _target);
|
||||
DWINUI::drawButton(BTN_Continue, 86, 305);
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
|
||||
void drawHPlot() {
|
||||
@@ -1626,29 +1660,33 @@ void dwinLevelingDone() {
|
||||
void drawBPlot() {
|
||||
TERN_(PIDTEMPBED, dwinDrawPlot(PIDTEMPBED_START));
|
||||
}
|
||||
void drawCPlot() {
|
||||
TERN_(PIDTEMPCHAMBER, dwinDrawPlot(PIDTEMPCHAMBER_START));
|
||||
}
|
||||
|
||||
#endif // PROUI_ITEM_PLOT
|
||||
|
||||
#endif // PROUI_TUNING_GRAPH
|
||||
|
||||
#if PROUI_PID_TUNE
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
void dwinStartM303(const bool seenC, const int c, const bool seenS, const heater_id_t hid, const celsius_t temp) {
|
||||
if (seenC) hmiData.pidCycles = c;
|
||||
if (seenS) {
|
||||
void dwinStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
hmiData.pidCycles = count;
|
||||
switch (hid) {
|
||||
#if ENABLED(PIDTEMP)
|
||||
case 0 ... HOTENDS - 1: hmiData.hotendPidT = temp; break;
|
||||
case 0 ... HOTENDS - 1: hmiData.hotendPIDT = temp; break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case H_BED: hmiData.bedPidT = temp; break;
|
||||
case H_BED: hmiData.bedPIDT = temp; break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case H_CHAMBER: hmiData.chamberPIDT = temp; break;
|
||||
#endif
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dwinPidTuning(tempcontrol_t result) {
|
||||
void dwinPIDTuning(tempcontrol_t result) {
|
||||
hmiValue.tempControl = result;
|
||||
switch (result) {
|
||||
#if ENABLED(PIDTEMP)
|
||||
@@ -1657,22 +1695,20 @@ void dwinLevelingDone() {
|
||||
#if PROUI_TUNING_GRAPH
|
||||
dwinDrawPIDMPCPopup();
|
||||
#else
|
||||
dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for Nozzle is running."));
|
||||
dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_NOZZLE));
|
||||
#endif
|
||||
break;
|
||||
case PID_TEMP_TOO_HIGH:
|
||||
checkkey = last_checkkey;
|
||||
dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH));
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case PIDTEMPBED_START:
|
||||
hmiSaveProcessID(ID_PIDProcess);
|
||||
#if PROUI_TUNING_GRAPH
|
||||
dwinDrawPIDMPCPopup();
|
||||
#else
|
||||
dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for BED is running."));
|
||||
dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_BED));
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case PIDTEMPCHAMBER_START:
|
||||
hmiSaveProcessID(ID_PIDProcess);
|
||||
dwinDrawPopup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_PID_FOR_CHAMBER));
|
||||
break;
|
||||
#endif
|
||||
case PID_BAD_HEATER_ID:
|
||||
@@ -1683,17 +1719,22 @@ void dwinLevelingDone() {
|
||||
checkkey = last_checkkey;
|
||||
dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_PID_TIMEOUT));
|
||||
break;
|
||||
case PID_TEMP_TOO_HIGH:
|
||||
checkkey = last_checkkey;
|
||||
dwinPopupConfirm(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE_FAILED), GET_TEXT_F(MSG_TEMP_TOO_HIGH));
|
||||
break;
|
||||
case AUTOTUNE_DONE:
|
||||
checkkey = last_checkkey;
|
||||
dwinPopupConfirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_BUTTON_DONE));
|
||||
break;
|
||||
default:
|
||||
checkkey = last_checkkey;
|
||||
dwinPopupConfirm(ICON_Info_0, GET_TEXT_F(MSG_ERROR), GET_TEXT_F(MSG_STOPPING));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PROUI_PID_TUNE
|
||||
#endif // HAS_PID_HEATING
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
|
||||
@@ -1808,12 +1849,14 @@ void dwinSetColorDefaults() {
|
||||
hmiData.colorCoordinate = defColorCoordinate;
|
||||
}
|
||||
|
||||
static_assert(ExtUI::eeprom_data_size >= sizeof(hmi_data_t), "Insufficient space in EEPROM for UI parameters");
|
||||
|
||||
void dwinSetDataDefaults() {
|
||||
dwinSetColorDefaults();
|
||||
DWINUI::setColors(hmiData.colorText, hmiData.colorBackground, hmiData.colorStatusBg);
|
||||
TERN_(PIDTEMP, hmiData.hotendPidT = DEF_HOTENDPIDT);
|
||||
TERN_(PIDTEMPBED, hmiData.bedPidT = DEF_BEDPIDT);
|
||||
TERN_(PROUI_PID_TUNE, hmiData.pidCycles = DEF_PIDCYCLES);
|
||||
TERN_(PIDTEMP, hmiData.hotendPIDT = DEF_HOTENDPIDT);
|
||||
TERN_(PIDTEMPBED, hmiData.bedPIDT = DEF_BEDPIDT);
|
||||
TERN_(HAS_PID_HEATING, hmiData.pidCycles = DEF_PIDCYCLES);
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
hmiData.extMinT = EXTRUDE_MINTEMP;
|
||||
applyExtMinT();
|
||||
@@ -1835,12 +1878,11 @@ void dwinSetDataDefaults() {
|
||||
TERN_(LED_COLOR_PRESETS, leds.set_default());
|
||||
applyLEDColor();
|
||||
#endif
|
||||
TERN_(ADAPTIVE_STEP_SMOOTHING, hmiData.adaptiveStepSmoothing = true);
|
||||
TERN_(HAS_GCODE_PREVIEW, hmiData.enablePreview = true);
|
||||
}
|
||||
|
||||
void dwinCopySettingsTo(char * const buff) {
|
||||
memcpy(buff, &hmiData, eeprom_data_size);
|
||||
memcpy(buff, &hmiData, sizeof(hmi_data_t));
|
||||
}
|
||||
|
||||
void dwinCopySettingsFrom(const char * const buff) {
|
||||
@@ -1895,7 +1937,11 @@ void MarlinUI::update() {
|
||||
#endif
|
||||
|
||||
void MarlinUI::kill_screen(FSTR_P const lcd_error, FSTR_P const) {
|
||||
#if ANY(TJC_DISPLAY, DACAI_DISPLAY)
|
||||
dwinDrawPopup(ICON_BLTouch, GET_TEXT_F(MSG_PRINTER_KILLED), lcd_error);
|
||||
#else
|
||||
dwinDrawPopup(ICON_Printer_0, GET_TEXT_F(MSG_PRINTER_KILLED), lcd_error);
|
||||
#endif
|
||||
DWINUI::drawCenteredString(hmiData.colorPopupTxt, 270, GET_TEXT_F(MSG_TURN_OFF));
|
||||
dwinUpdateLCD();
|
||||
}
|
||||
@@ -1920,32 +1966,14 @@ void dwinRedrawScreen() {
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
void dwinPopupPause(FSTR_P const fmsg, uint8_t button/*=0*/) {
|
||||
hmiSaveProcessID(button ? ID_WaitResponse : ID_NothingToDo);
|
||||
dwinShowPopup(ICON_BLTouch, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button);
|
||||
}
|
||||
|
||||
void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) {
|
||||
if (mode != PAUSE_MODE_SAME) pause_mode = mode;
|
||||
switch (message) {
|
||||
case PAUSE_MESSAGE_PARKING: dwinPopupPause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break; // M125
|
||||
case PAUSE_MESSAGE_CHANGING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break; // pause_print (M125, M600)
|
||||
case PAUSE_MESSAGE_WAITING: dwinPopupPause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
||||
case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702
|
||||
case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break;
|
||||
case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break;
|
||||
case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
||||
case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_HEATING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break;
|
||||
case PAUSE_MESSAGE_STATUS: hmiReturnScreen(); break; // Exit from Pause, Load and Unload
|
||||
default: break;
|
||||
}
|
||||
dwinShowPopup(ICON_Pause_1, GET_TEXT_F(MSG_ADVANCED_PAUSE), fmsg, button);
|
||||
}
|
||||
|
||||
void drawPopupFilamentPurge() {
|
||||
dwinDrawPopup(ICON_BLTouch, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE));
|
||||
dwinDrawPopup(ICON_AutoLeveling, GET_TEXT_F(MSG_ADVANCED_PAUSE), GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE_CONTINUE));
|
||||
DWINUI::drawButton(BTN_Purge, 26, 280);
|
||||
DWINUI::drawButton(BTN_Continue, 146, 280);
|
||||
drawSelectHighlight(true);
|
||||
@@ -1970,7 +1998,7 @@ void dwinRedrawScreen() {
|
||||
#if HAS_MESH
|
||||
void dwinMeshViewer() {
|
||||
if (!leveling_is_valid())
|
||||
dwinPopupContinue(ICON_BLTouch, GET_TEXT_F(MSG_MESH_VIEWER), GET_TEXT_F(MSG_NO_VALID_MESH));
|
||||
dwinPopupContinue(ICON_Leveling_1, GET_TEXT_F(MSG_MESH_VIEWER), GET_TEXT_F(MSG_NO_VALID_MESH));
|
||||
else {
|
||||
hmiSaveProcessID(ID_WaitResponse);
|
||||
meshViewer.draw();
|
||||
@@ -3088,17 +3116,17 @@ void drawPrepareMenu() {
|
||||
if (SET_MENU(trammingMenu, MSG_BED_TRAMMING, 8)) {
|
||||
BACK_ITEM(drawPrepareMenu);
|
||||
#if HAS_BED_PROBE && HAS_MESH
|
||||
MENU_ITEM(ICON_ProbeSet, MSG_TRAMMING_WIZARD, onDrawMenuItem, trammingwizard);
|
||||
EDIT_ITEM(ICON_ProbeSet, MSG_BED_TRAMMING_MANUAL, onDrawChkbMenu, setManualTramming, &hmiData.fullManualTramming);
|
||||
MENU_ITEM(ICON_Tram, MSG_TRAMMING_WIZARD, onDrawMenuItem, trammingwizard);
|
||||
EDIT_ITEM(ICON_Version, MSG_BED_TRAMMING_MANUAL, onDrawChkbMenu, setManualTramming, &hmiData.fullManualTramming);
|
||||
#elif !HAS_BED_PROBE && HAS_ZOFFSET_ITEM
|
||||
MENU_ITEM_F(ICON_MoveZ0, "Home Z and disable", onDrawMenuItem, homeZAndDisable);
|
||||
#endif
|
||||
MENU_ITEM(ICON_Axis, MSG_TRAM_FL, onDrawMenuItem, []{ (void)tram(0); });
|
||||
MENU_ITEM(ICON_Axis, MSG_TRAM_FR, onDrawMenuItem, []{ (void)tram(1); });
|
||||
MENU_ITEM(ICON_Axis, MSG_TRAM_BR, onDrawMenuItem, []{ (void)tram(2); });
|
||||
MENU_ITEM(ICON_Axis, MSG_TRAM_BL, onDrawMenuItem, []{ (void)tram(3); });
|
||||
MENU_ITEM(ICON_AxisBL, MSG_TRAM_FL, onDrawMenuItem, []{ (void)tram(0); });
|
||||
MENU_ITEM(ICON_AxisBR, MSG_TRAM_FR, onDrawMenuItem, []{ (void)tram(1); });
|
||||
MENU_ITEM(ICON_AxisTR, MSG_TRAM_BR, onDrawMenuItem, []{ (void)tram(2); });
|
||||
MENU_ITEM(ICON_AxisTL, MSG_TRAM_BL, onDrawMenuItem, []{ (void)tram(3); });
|
||||
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
|
||||
MENU_ITEM(ICON_Axis, MSG_TRAM_C, onDrawMenuItem, []{ (void)tram(4); });
|
||||
MENU_ITEM(ICON_AxisC, MSG_TRAM_C, onDrawMenuItem, []{ (void)tram(4); });
|
||||
#endif
|
||||
}
|
||||
updateMenu(trammingMenu);
|
||||
@@ -3144,13 +3172,13 @@ void drawAdvancedSettingsMenu() {
|
||||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM);
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
MENU_ITEM(ICON_ProbeSet, MSG_MESH_LEVELING, onDrawSubMenu, drawMeshSetMenu);
|
||||
MENU_ITEM(ICON_Mesh, MSG_MESH_LEVELING, onDrawSubMenu, drawMeshSetMenu);
|
||||
#endif
|
||||
#if HAS_BED_PROBE
|
||||
MENU_ITEM(ICON_ProbeSet, MSG_ZPROBE_SETTINGS, onDrawSubMenu, drawProbeSetMenu);
|
||||
MENU_ITEM(ICON_Probe, MSG_ZPROBE_SETTINGS, onDrawSubMenu, drawProbeSetMenu);
|
||||
#endif
|
||||
#if HAS_HOME_OFFSET
|
||||
MENU_ITEM(ICON_ProbeSet, MSG_SET_HOME_OFFSETS, onDrawSubMenu, drawHomeOffsetMenu);
|
||||
MENU_ITEM(ICON_HomeOffset, MSG_SET_HOME_OFFSETS, onDrawSubMenu, drawHomeOffsetMenu);
|
||||
#endif
|
||||
MENU_ITEM(ICON_FilSet, MSG_FILAMENT_SET, onDrawSubMenu, drawFilSetMenu);
|
||||
#if ENABLED(PIDTEMP) && ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
@@ -3176,7 +3204,7 @@ void drawAdvancedSettingsMenu() {
|
||||
MENU_ITEM(ICON_Lock, MSG_LOCKSCREEN, onDrawMenuItem, dwinLockScreen);
|
||||
#endif
|
||||
#if ENABLED(EDITABLE_DISPLAY_TIMEOUT)
|
||||
EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes);
|
||||
EDIT_ITEM(ICON_RemainTime, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes);
|
||||
#endif
|
||||
#if ENABLED(SOUND_MENU_ITEM)
|
||||
EDIT_ITEM(ICON_Sound, MSG_SOUND_ENABLE, onDrawChkbMenu, setEnableSound, &ui.sound_on);
|
||||
@@ -3196,7 +3224,7 @@ void drawAdvancedSettingsMenu() {
|
||||
#endif
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, setBrightness, &ui.brightness);
|
||||
MENU_ITEM(ICON_Brightness, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight);
|
||||
MENU_ITEM(ICON_Box, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight);
|
||||
#endif
|
||||
#if HAS_CUSTOM_COLORS
|
||||
MENU_ITEM(ICON_Scolor, MSG_COLORS_SELECT, onDrawSubMenu, drawSelectColorsMenu);
|
||||
@@ -3268,7 +3296,7 @@ void drawMoveMenu() {
|
||||
#if ENABLED(BLTOUCH)
|
||||
MENU_ITEM(ICON_ProbeStow, MSG_MANUAL_STOW, onDrawMenuItem, probeStow);
|
||||
MENU_ITEM(ICON_ProbeDeploy, MSG_MANUAL_DEPLOY, onDrawMenuItem, probeDeploy);
|
||||
MENU_ITEM(ICON_BltouchReset, MSG_BLTOUCH_RESET, onDrawMenuItem, bltouch._reset);
|
||||
MENU_ITEM(ICON_BLTouchReset, MSG_BLTOUCH_RESET, onDrawMenuItem, bltouch._reset);
|
||||
#if HAS_BLTOUCH_HS_MODE
|
||||
EDIT_ITEM(ICON_HSMode, MSG_ENABLE_HS_MODE, onDrawChkbMenu, setHSMode, &bltouch.high_speed_mode);
|
||||
#endif
|
||||
@@ -3397,10 +3425,10 @@ void drawTuneMenu() {
|
||||
#endif
|
||||
#if HAS_LCD_BRIGHTNESS
|
||||
EDIT_ITEM(ICON_Brightness, MSG_BRIGHTNESS, onDrawPInt8Menu, setBrightness, &ui.brightness);
|
||||
MENU_ITEM(ICON_Brightness, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight);
|
||||
MENU_ITEM(ICON_Box, MSG_BRIGHTNESS_OFF, onDrawMenuItem, turnOffBacklight);
|
||||
#endif
|
||||
#if ENABLED(EDITABLE_DISPLAY_TIMEOUT)
|
||||
EDIT_ITEM(ICON_Brightness, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes);
|
||||
EDIT_ITEM(ICON_RemainTime, MSG_SCREEN_TIMEOUT, onDrawPIntMenu, setTimer, &ui.backlight_timeout_minutes);
|
||||
#endif
|
||||
#if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT)
|
||||
MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot);
|
||||
@@ -3425,9 +3453,9 @@ void drawTuneMenu() {
|
||||
updateMenu(tuneMenu);
|
||||
}
|
||||
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
void setAdaptiveStepSmoothing() {
|
||||
toggleCheckboxLine(hmiData.adaptiveStepSmoothing);
|
||||
toggleCheckboxLine(stepper.adaptive_step_smoothing_enabled);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3518,8 +3546,8 @@ void drawMotionMenu() {
|
||||
#if ENABLED(SHAPING_MENU)
|
||||
MENU_ITEM(ICON_InputShaping, MSG_INPUT_SHAPING, onDrawSubMenu, drawInputShaping_menu);
|
||||
#endif
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
||||
EDIT_ITEM(ICON_UBLActive, MSG_STEP_SMOOTHING, onDrawChkbMenu, setAdaptiveStepSmoothing, &hmiData.adaptiveStepSmoothing);
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
EDIT_ITEM(ICON_UBLActive, MSG_STEP_SMOOTHING, onDrawChkbMenu, setAdaptiveStepSmoothing, &stepper.adaptive_step_smoothing_enabled);
|
||||
#endif
|
||||
#if ENABLED(EDITABLE_STEPS_PER_UNIT)
|
||||
MENU_ITEM(ICON_Step, MSG_STEPS_PER_MM, onDrawSteps, drawStepsMenu);
|
||||
@@ -3589,10 +3617,10 @@ void drawFilamentManMenu() {
|
||||
if (notCurrent) {
|
||||
BACK_ITEM(drawTemperatureMenu);
|
||||
#if HAS_HOTEND
|
||||
EDIT_ITEM(ICON_SetEndTemp, MSG_UBL_SET_TEMP_HOTEND, onDrawSetPreheatHotend, setPreheatEndTemp, &ui.material_preset[hmiValue.select].hotend_temp);
|
||||
EDIT_ITEM(ICON_HotendTemp, MSG_UBL_SET_TEMP_HOTEND, onDrawSetPreheatHotend, setPreheatEndTemp, &ui.material_preset[hmiValue.select].hotend_temp);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
EDIT_ITEM(ICON_SetBedTemp, MSG_UBL_SET_TEMP_BED, onDrawSetPreheatBed, setPreheatBedTemp, &ui.material_preset[hmiValue.select].bed_temp);
|
||||
EDIT_ITEM(ICON_BedTemp, MSG_UBL_SET_TEMP_BED, onDrawSetPreheatBed, setPreheatBedTemp, &ui.material_preset[hmiValue.select].bed_temp);
|
||||
#endif
|
||||
#if HAS_FAN
|
||||
EDIT_ITEM(ICON_FanSpeed, MSG_FAN_SPEED, onDrawSetPreheatFan, setPreheatFanSpeed, &ui.material_preset[hmiValue.select].fan_speed);
|
||||
@@ -3618,10 +3646,10 @@ void drawTemperatureMenu() {
|
||||
if (SET_MENU_R(temperatureMenu, selrect({236, 2, 28, 12}), MSG_TEMPERATURE, 4 + PREHEAT_COUNT)) {
|
||||
BACK_ITEM(drawControlMenu);
|
||||
#if HAS_HOTEND
|
||||
hotendTargetItem = EDIT_ITEM(ICON_SetEndTemp, MSG_UBL_SET_TEMP_HOTEND, onDrawHotendTemp, setHotendTemp, &thermalManager.temp_hotend[0].target);
|
||||
hotendTargetItem = EDIT_ITEM(ICON_HotendTemp, MSG_UBL_SET_TEMP_HOTEND, onDrawHotendTemp, setHotendTemp, &thermalManager.temp_hotend[0].target);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
bedTargetItem = EDIT_ITEM(ICON_SetBedTemp, MSG_UBL_SET_TEMP_BED, onDrawBedTemp, setBedTemp, &thermalManager.temp_bed.target);
|
||||
bedTargetItem = EDIT_ITEM(ICON_BedTemp, MSG_UBL_SET_TEMP_BED, onDrawBedTemp, setBedTemp, &thermalManager.temp_bed.target);
|
||||
#endif
|
||||
#if HAS_FAN
|
||||
fanSpeedItem = EDIT_ITEM(ICON_FanSpeed, MSG_FAN_SPEED, onDrawFanSpeed, setFanSpeed, &thermalManager.fan_speed[0]);
|
||||
@@ -3844,18 +3872,19 @@ void drawMaxAccelMenu() {
|
||||
|
||||
#endif // MPC_EDIT_MENU || MPC_AUTOTUNE_MENU
|
||||
|
||||
#if PROUI_PID_TUNE
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void setPID(celsius_t t, heater_id_t h) {
|
||||
gcode.process_subcommands_now(
|
||||
MString<60>(F("G28OXY\nG0Z5F300\nG0X"), X_CENTER, F("Y"), Y_CENTER, F("F5000\nM84\nM400"))
|
||||
);
|
||||
thermalManager.PID_autotune(t, h, hmiData.pidCycles, true);
|
||||
}
|
||||
void setPidCycles() { setPIntOnClick(3, 50); }
|
||||
void setPIDCycles() { setPIntOnClick(3, 50); }
|
||||
#endif
|
||||
|
||||
#if ALL(HAS_PID_HEATING, PID_EDIT_MENU)
|
||||
|
||||
#if ENABLED(PID_EDIT_MENU)
|
||||
void setKp() { setPFloatOnClick(0, 1000, 2); }
|
||||
void applyPIDi() {
|
||||
*menuData.floatPtr = scalePID_i(menuData.value / POW(10, 2));
|
||||
@@ -3877,14 +3906,17 @@ void drawMaxAccelMenu() {
|
||||
}
|
||||
void onDrawPIDi(MenuItem* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast<MenuItemPtr*>(menuitem)->value)); }
|
||||
void onDrawPIDd(MenuItem* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast<MenuItemPtr*>(menuitem)->value)); }
|
||||
#endif // PID_EDIT_MENU
|
||||
|
||||
#endif // HAS_PID_HEATING && PID_EDIT_MENU
|
||||
#endif // HAS_PID_HEATING
|
||||
|
||||
#if ENABLED(PIDTEMP) && ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
|
||||
#if ENABLED(PIDTEMP)
|
||||
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void hotendPID() { setPID(hmiData.hotendPidT, H_E0); }
|
||||
void setHotendPidT() { setPIntOnClick(MIN_ETEMP, MAX_ETEMP); }
|
||||
void hotendPID() { setPID(hmiData.hotendPIDT, H_E0); }
|
||||
void setHotendPIDT() { setPIntOnClick(MIN_ETEMP, MAX_ETEMP); }
|
||||
#endif
|
||||
|
||||
void drawHotendPIDMenu() {
|
||||
@@ -3893,13 +3925,13 @@ void drawMaxAccelMenu() {
|
||||
BACK_ITEM(drawAdvancedSettingsMenu);
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
MENU_ITEM_F(ICON_PIDNozzle, STR_HOTEND_PID, onDrawMenuItem, hotendPID);
|
||||
EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setHotendPidT, &hmiData.hotendPidT);
|
||||
EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPidCycles, &hmiData.pidCycles);
|
||||
EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setHotendPIDT, &hmiData.hotendPIDT);
|
||||
EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPIDCycles, &hmiData.pidCycles);
|
||||
#endif
|
||||
#if ENABLED(PID_EDIT_MENU)
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KP, onDrawPFloat2Menu, setKp, &thermalManager.temp_hotend[0].pid.Kp);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KI, onDrawPIDi, setKi, &thermalManager.temp_hotend[0].pid.Ki);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KD, onDrawPIDd, setKd, &thermalManager.temp_hotend[0].pid.Kd);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kp: ", onDrawPFloat2Menu, setKp, &thermalManager.temp_hotend[0].pid.Kp);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Ki: ", onDrawPIDi, setKi, &thermalManager.temp_hotend[0].pid.Ki);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kd: ", onDrawPIDd, setKd, &thermalManager.temp_hotend[0].pid.Kd);
|
||||
#endif
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM);
|
||||
@@ -3908,13 +3940,13 @@ void drawMaxAccelMenu() {
|
||||
updateMenu(hotendPIDMenu);
|
||||
}
|
||||
|
||||
#endif // PIDTEMP && (PID_AUTOTUNE_MENU || PID_EDIT_MENU)
|
||||
#endif // PIDTEMP
|
||||
|
||||
#if ENABLED(PIDTEMPBED) && ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void bedPID() { setPID(hmiData.bedPidT, H_BED); }
|
||||
void setBedPidT() { setPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); }
|
||||
void bedPID() { setPID(hmiData.bedPIDT, H_BED); }
|
||||
void setBedPIDT() { setPIntOnClick(MIN_BEDTEMP, MAX_BEDTEMP); }
|
||||
#endif
|
||||
|
||||
void drawBedPIDMenu() {
|
||||
@@ -3923,13 +3955,13 @@ void drawMaxAccelMenu() {
|
||||
BACK_ITEM(drawAdvancedSettingsMenu);
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
MENU_ITEM_F(ICON_PIDBed, STR_BED_PID, onDrawMenuItem,bedPID);
|
||||
EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setBedPidT, &hmiData.bedPidT);
|
||||
EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPidCycles, &hmiData.pidCycles);
|
||||
EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setBedPIDT, &hmiData.bedPIDT);
|
||||
EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPIDCycles, &hmiData.pidCycles);
|
||||
#endif
|
||||
#if ENABLED(PID_EDIT_MENU)
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KP, onDrawPFloat2Menu, setKp, &thermalManager.temp_bed.pid.Kp);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KI, onDrawPIDi, setKi, &thermalManager.temp_bed.pid.Ki);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set" STR_KD, onDrawPIDd, setKd, &thermalManager.temp_bed.pid.Kd);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kp: ", onDrawPFloat2Menu, setKp, &thermalManager.temp_bed.pid.Kp);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Ki: ", onDrawPIDi, setKi, &thermalManager.temp_bed.pid.Ki);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kd: ", onDrawPIDd, setKd, &thermalManager.temp_bed.pid.Kd);
|
||||
#endif
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM);
|
||||
@@ -3938,7 +3970,39 @@ void drawMaxAccelMenu() {
|
||||
updateMenu(bedPIDMenu);
|
||||
}
|
||||
|
||||
#endif // PIDTEMPBED && (PID_AUTOTUNE_MENU || PID_EDIT_MENU)
|
||||
#endif // PIDTEMPBED
|
||||
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void chamberPID() { setPID(hmiData.chamberPIDT, H_CHAMBER); }
|
||||
void setChamberPIDT() { setPIntOnClick(MIN_CHAMBERTEMP, MAX_CHAMBERTEMP); }
|
||||
#endif
|
||||
|
||||
void drawChamberPIDMenu() {
|
||||
checkkey = ID_Menu;
|
||||
if (SET_MENU_F(chamberPIDMenu, STR_CHAMBER_PID " Settings", 8)) {
|
||||
BACK_ITEM(drawAdvancedSettingsMenu);
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
MENU_ITEM_F(ICON_PIDChamber, STR_CHAMBER_PID, onDrawMenuItem,chamberPID);
|
||||
EDIT_ITEM(ICON_Temperature, MSG_TEMPERATURE, onDrawPIntMenu, setChamberPIDT, &hmiData.chamberPIDT);
|
||||
EDIT_ITEM(ICON_PIDCycles, MSG_PID_CYCLE, onDrawPIntMenu, setPIDCycles, &hmiData.pidCycles);
|
||||
#endif
|
||||
#if ENABLED(PID_EDIT_MENU)
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kp: ", onDrawPFloat2Menu, setKp, &thermalManager.temp_chamber.pid.Kp);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Ki: ", onDrawPIDi, setKi, &thermalManager.temp_chamber.pid.Ki);
|
||||
EDIT_ITEM_F(ICON_PIDValue, "Set Kd: ", onDrawPIDd, setKd, &thermalManager.temp_chamber.pid.Kd);
|
||||
#endif
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
MENU_ITEM(ICON_WriteEEPROM, MSG_STORE_EEPROM, onDrawMenuItem, writeEEPROM);
|
||||
#endif
|
||||
}
|
||||
updateMenu(chamberPIDMenu);
|
||||
}
|
||||
|
||||
#endif // PIDTEMPCHAMBER
|
||||
|
||||
#endif // PID_AUTOTUNE_MENU || PID_EDIT_MENU
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@@ -3949,7 +4013,7 @@ void drawMaxAccelMenu() {
|
||||
if (SET_MENU(zOffsetWizMenu, MSG_PROBE_WIZARD, 4)) {
|
||||
BACK_ITEM(drawPrepareMenu);
|
||||
MENU_ITEM(ICON_Homing, MSG_AUTO_HOME, onDrawMenuItem, autoHome);
|
||||
MENU_ITEM(ICON_MoveZ0, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0);
|
||||
MENU_ITEM(ICON_AxisD, MSG_MOVE_NOZZLE_TO_BED, onDrawMenuItem, setMoveZto0);
|
||||
EDIT_ITEM(ICON_Zoffset, MSG_XATC_UPDATE_Z_OFFSET, onDrawPFloat2Menu, setZOffset, &BABY_Z_VAR);
|
||||
}
|
||||
updateMenu(zOffsetWizMenu);
|
||||
|
@@ -53,17 +53,16 @@ enum processID : uint8_t {
|
||||
ID_MainMenu,
|
||||
ID_Menu,
|
||||
ID_SetInt,
|
||||
ID_SetPInt,
|
||||
ID_SetIntNoDraw,
|
||||
ID_SetFloat,
|
||||
ID_SetPInt,
|
||||
ID_SetPFloat,
|
||||
ID_SetIntNoDraw,
|
||||
ID_PrintProcess,
|
||||
ID_Popup,
|
||||
ID_Leveling,
|
||||
ID_Locked,
|
||||
ID_Reboot,
|
||||
ID_PrintDone,
|
||||
ID_ESDiagProcess,
|
||||
ID_PrintDone,
|
||||
ID_WaitResponse,
|
||||
ID_Homing,
|
||||
ID_PIDProcess,
|
||||
@@ -72,12 +71,20 @@ enum processID : uint8_t {
|
||||
ID_NothingToDo
|
||||
};
|
||||
|
||||
#if ANY(PROUI_PID_TUNE, MPC_AUTOTUNE)
|
||||
#if ANY(HAS_PID_HEATING, MPC_AUTOTUNE)
|
||||
|
||||
enum tempcontrol_t : uint8_t {
|
||||
#if PROUI_PID_TUNE
|
||||
enum TempControl {
|
||||
AUTOTUNE_DONE,
|
||||
#if HAS_PID_HEATING
|
||||
#if ENABLED(PIDTEMP)
|
||||
PIDTEMP_START,
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
PIDTEMPBED_START,
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
PIDTEMPCHAMBER_START,
|
||||
#endif
|
||||
PID_BAD_HEATER_ID,
|
||||
PID_TEMP_TOO_HIGH,
|
||||
PID_TUNING_TIMEOUT,
|
||||
@@ -87,9 +94,11 @@ enum processID : uint8_t {
|
||||
MPC_TEMP_ERROR,
|
||||
MPC_INTERRUPTED,
|
||||
#endif
|
||||
AUTOTUNE_DONE
|
||||
TEMPCONTROL_COUNT
|
||||
};
|
||||
|
||||
typedef bits_t(TEMPCONTROL_COUNT) tempcontrol_t;
|
||||
|
||||
#endif
|
||||
|
||||
#define DWIN_CHINESE 123
|
||||
@@ -117,20 +126,23 @@ typedef struct {
|
||||
uint16_t colorCoordinate;
|
||||
|
||||
// Temperatures
|
||||
#if PROUI_PID_TUNE
|
||||
#if HAS_PID_HEATING
|
||||
int16_t pidCycles = DEF_PIDCYCLES;
|
||||
#if ENABLED(PIDTEMP)
|
||||
int16_t hotendPidT = DEF_HOTENDPIDT;
|
||||
celsius_t hotendPIDT = DEF_HOTENDPIDT;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
int16_t bedPidT = DEF_BEDPIDT;
|
||||
celsius_t bedPIDT = DEF_BEDPIDT;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
celsius_t chamberPIDT = DEF_CHAMBERPIDT;
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
int16_t extMinT = EXTRUDE_MINTEMP;
|
||||
celsius_t extMinT = EXTRUDE_MINTEMP;
|
||||
#endif
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
int16_t bedLevT = LEVELING_BED_TEMP;
|
||||
celsius_t bedLevT = LEVELING_BED_TEMP;
|
||||
#endif
|
||||
#if ENABLED(BAUD_RATE_GCODE)
|
||||
bool baud115K = false;
|
||||
@@ -144,20 +156,19 @@ typedef struct {
|
||||
bool mediaAutoMount = ENABLED(HAS_SD_EXTENDER);
|
||||
#if ALL(INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
uint8_t zAfterHoming = DEF_Z_AFTER_HOMING;
|
||||
#define Z_POST_CLEARANCE hmiData.zAfterHoming
|
||||
#endif
|
||||
#if ALL(LED_CONTROL_MENU, HAS_COLOR_LEDS)
|
||||
LEDColor ledColor = defColorLeds;
|
||||
#endif
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
||||
bool adaptiveStepSmoothing = true;
|
||||
#endif
|
||||
#if HAS_GCODE_PREVIEW
|
||||
bool enablePreview = true;
|
||||
#endif
|
||||
} hmi_data_t;
|
||||
|
||||
extern hmi_data_t hmiData;
|
||||
static constexpr size_t eeprom_data_size = sizeof(hmi_data_t);
|
||||
|
||||
#define EXTUI_EEPROM_DATA_SIZE sizeof(hmi_data_t)
|
||||
|
||||
typedef struct {
|
||||
int8_t r, g, b;
|
||||
@@ -174,7 +185,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
rgb_t color; // Color
|
||||
#if ANY(PROUI_PID_TUNE, MPCTEMP)
|
||||
#if ANY(HAS_PID_HEATING, MPCTEMP)
|
||||
tempcontrol_t tempControl = AUTOTUNE_DONE;
|
||||
#endif
|
||||
uint8_t select = 0; // Auxiliary selector variable
|
||||
@@ -196,8 +207,8 @@ extern hmi_flag_t hmiFlag;
|
||||
extern uint8_t checkkey;
|
||||
|
||||
// Popups
|
||||
#if HAS_HOTEND || HAS_HEATED_BED
|
||||
void dwinPopupTemperature(const bool toohigh);
|
||||
#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER
|
||||
void dwinPopupTemperature(const int_fast8_t heater_id, const uint8_t state);
|
||||
#endif
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void popupPowerLossRecovery();
|
||||
@@ -288,7 +299,7 @@ void dwinPrintAborted();
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
void dwinFilamentRunout(const uint8_t extruder);
|
||||
#endif
|
||||
void dwinPrintHeader(const char *text);
|
||||
void dwinPrintHeader(const char * const cstr=nullptr);
|
||||
void dwinSetColorDefaults();
|
||||
void dwinCopySettingsTo(char * const buff);
|
||||
void dwinCopySettingsFrom(const char * const buff);
|
||||
@@ -313,6 +324,11 @@ void dwinRebootScreen();
|
||||
#if HAS_ESDIAG
|
||||
void drawEndStopDiag();
|
||||
#endif
|
||||
#if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT)
|
||||
void dwinDrawPlot(tempcontrol_t result);
|
||||
void drawHPlot();
|
||||
void drawBPlot();
|
||||
#endif
|
||||
|
||||
// Menu drawing functions
|
||||
void drawPrintFileMenu();
|
||||
@@ -376,29 +392,30 @@ void drawMaxAccelMenu();
|
||||
#endif
|
||||
|
||||
// PID
|
||||
#if PROUI_PID_TUNE
|
||||
#if HAS_PID_HEATING
|
||||
#include "../../../module/temperature.h"
|
||||
void dwinStartM303(const bool seenC, const int c, const bool seenS, const heater_id_t hid, const celsius_t temp);
|
||||
void dwinPidTuning(tempcontrol_t result);
|
||||
#if PROUI_TUNING_GRAPH
|
||||
void dwinDrawPIDMPCPopup();
|
||||
#endif
|
||||
#endif
|
||||
void dwinStartM303(const int count, const heater_id_t hid, const celsius_t temp);
|
||||
void dwinPIDTuning(tempcontrol_t result);
|
||||
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
#if ENABLED(PIDTEMP)
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void hotendPID();
|
||||
#endif
|
||||
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
void drawHotendPIDMenu();
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void bedPID();
|
||||
#endif
|
||||
#if ANY(PID_AUTOTUNE_MENU, PID_EDIT_MENU)
|
||||
void drawBedPIDMenu();
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||
void chamberPID();
|
||||
#endif
|
||||
void drawChamberPIDMenu();
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// MPC
|
||||
@@ -410,3 +427,7 @@ void drawMaxAccelMenu();
|
||||
void dwinMPCTuning(tempcontrol_t result);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PROUI_TUNING_GRAPH
|
||||
void dwinDrawPIDMPCPopup();
|
||||
#endif
|
||||
|
@@ -30,6 +30,10 @@
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
//#define TJC_DISPLAY // Enable for TJC display
|
||||
//#define DACAI_DISPLAY // Enable for DACAI display
|
||||
//#define TITLE_CENTERED // Center Menu Title Text
|
||||
|
||||
#if HAS_MESH
|
||||
#define PROUI_MESH_EDIT // Add a menu to edit mesh points
|
||||
#if ENABLED(PROUI_MESH_EDIT)
|
||||
@@ -96,6 +100,11 @@
|
||||
#else
|
||||
#define DEF_BEDPIDT 60
|
||||
#endif
|
||||
#ifdef PREHEAT_1_TEMP_CHAMBER
|
||||
#define DEF_CHAMBERPIDT PREHEAT_1_TEMP_CHAMBER
|
||||
#else
|
||||
#define DEF_CHAMBERPIDT 0
|
||||
#endif
|
||||
#define DEF_PIDCYCLES 5
|
||||
|
||||
/**
|
||||
@@ -113,7 +122,7 @@
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#define PROUI_ITEM_ADVK // Tune > Linear Advance
|
||||
#endif
|
||||
#if ANY(PROUI_PID_TUNE, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
|
||||
#if ANY(HAS_PID_HEATING, MPC_AUTOTUNE) && DISABLED(DISABLE_TUNING_GRAPH)
|
||||
#define PROUI_TUNING_GRAPH 1
|
||||
#endif
|
||||
#if PROUI_TUNING_GRAPH
|
||||
|
@@ -52,14 +52,6 @@ void dwinDrawQR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string) {
|
||||
dwinSend(i);
|
||||
}
|
||||
|
||||
// Draw an Icon with transparent background
|
||||
// libID: Icon library ID
|
||||
// picID: Icon ID
|
||||
// x/y: Upper-left point
|
||||
void dwinIconShow(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) {
|
||||
dwinIconShow(false, false, true, libID, picID, x, y);
|
||||
}
|
||||
|
||||
// Copy area from current virtual display area to current screen
|
||||
// xStart/yStart: Upper-left of virtual area
|
||||
// xEnd/yEnd: Lower-right of virtual area
|
||||
@@ -134,8 +126,10 @@ void dwinWriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data)
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(DACAI_DISPLAY)
|
||||
|
||||
// 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) {
|
||||
void dacaiIconShow(uint16_t x, uint16_t y, uint16_t addr) {
|
||||
NOMORE(x, DWIN_WIDTH - 1);
|
||||
NOMORE(y, DWIN_HEIGHT - 1);
|
||||
size_t i = 0;
|
||||
@@ -146,9 +140,11 @@ void DACAI_ICON_Show(uint16_t x, uint16_t y, uint16_t addr) {
|
||||
dwinSend(i);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void dwinIconShow(uint16_t x, uint16_t y, uint16_t addr) {
|
||||
#if ENABLED(DACAI_DISPLAY)
|
||||
DACAI_ICON_Show(x, y, addr);
|
||||
dacaiIconShow(x, y, addr);
|
||||
#else
|
||||
dwinIconShow(0, 0, 1, x, y, addr);
|
||||
#endif
|
||||
|
@@ -209,7 +209,7 @@ void DWINUI::drawFloat(uint8_t bShow, bool signedMode, fontid_t fid, uint16_t co
|
||||
// libID: Icon library ID
|
||||
// picID: Icon ID
|
||||
// x/y: Upper-left point
|
||||
void DWINUI::ICON_Show(bool BG, uint8_t icon, uint16_t x, uint16_t y) {
|
||||
void DWINUI::iconShow(bool BG, uint8_t icon, uint16_t x, uint16_t y) {
|
||||
const uint8_t libID = ICON TERN_(HAS_CUSTOMICONS, + (icon / 100));
|
||||
const uint8_t picID = icon TERN_(HAS_CUSTOMICONS, % 100);
|
||||
dwinIconShow(BG, false, !BG, libID, picID, x, y);
|
||||
|
@@ -36,14 +36,28 @@
|
||||
#include "dwin_lcd.h"
|
||||
|
||||
// Extra Icons
|
||||
#define ICON_Printer_0 93
|
||||
#define ICON_Box 200
|
||||
#define ICON_Checkbox 201
|
||||
#define ICON_Fade 202
|
||||
#define ICON_Mesh 203
|
||||
#define ICON_Tilt 204
|
||||
#define ICON_Brightness 205
|
||||
#define ICON_Probe 206
|
||||
#define ICON_AxisD 249
|
||||
#define ICON_AxisBR 250
|
||||
#define ICON_AxisTR 251
|
||||
#define ICON_AxisBL 252
|
||||
#define ICON_AxisTL 253
|
||||
#define ICON_AxisC 254
|
||||
|
||||
#define ICON_BedSizeX ICON_PrintSize
|
||||
#define ICON_BedSizeY ICON_PrintSize
|
||||
#define ICON_BedTramming ICON_SetHome
|
||||
#define ICON_Binary ICON_Contact
|
||||
#define ICON_BltouchReset ICON_StockConfiguration
|
||||
#define ICON_Brightness ICON_Motion
|
||||
#define ICON_BLTouchReset ICON_ResetEEPROM
|
||||
#define ICON_Cancel ICON_StockConfiguration
|
||||
#define ICON_CustomPreheat ICON_SetEndTemp
|
||||
#define ICON_CustomPreheat ICON_BedTemp
|
||||
#define ICON_Error ICON_TempTooHigh
|
||||
#define ICON_esDiag ICON_Info
|
||||
#define ICON_ExtrudeMinT ICON_HotendTemp
|
||||
@@ -55,28 +69,27 @@
|
||||
#define ICON_HomeX ICON_MoveX
|
||||
#define ICON_HomeY ICON_MoveY
|
||||
#define ICON_HomeZ ICON_MoveZ
|
||||
#define ICON_HSMode ICON_StockConfiguration
|
||||
#define ICON_HSMode ICON_MaxAccZ
|
||||
#define ICON_InputShaping ICON_MaxAccelerated
|
||||
#define ICON_JDmm ICON_MaxJerk
|
||||
#define ICON_Tram ICON_SetEndTemp
|
||||
#define ICON_Level ICON_HotendTemp
|
||||
#define ICON_Lock ICON_Cool
|
||||
#define ICON_ManualMesh ICON_HotendTemp
|
||||
#define ICON_Level ICON_Mesh
|
||||
#define ICON_Lock ICON_Checkbox
|
||||
#define ICON_ManualMesh ICON_Mesh
|
||||
#define ICON_MaxPosX ICON_MoveX
|
||||
#define ICON_MaxPosY ICON_MoveY
|
||||
#define ICON_MaxPosZ ICON_MoveZ
|
||||
#define ICON_MeshEdit ICON_Homing
|
||||
#define ICON_MeshEdit ICON_Fade
|
||||
#define ICON_MeshEditX ICON_MoveX
|
||||
#define ICON_MeshEditY ICON_MoveY
|
||||
#define ICON_MeshEditZ ICON_MoveZ
|
||||
#define ICON_MeshNext ICON_Axis
|
||||
#define ICON_MeshPoints ICON_SetEndTemp
|
||||
#define ICON_MeshReset ICON_StockConfiguration
|
||||
#define ICON_MeshEditZ ICON_Zoffset
|
||||
#define ICON_MeshNext ICON_AxisD
|
||||
#define ICON_MeshPoints ICON_HotendTemp
|
||||
#define ICON_MeshReset ICON_ResetEEPROM
|
||||
#define ICON_MeshSave ICON_WriteEEPROM
|
||||
#define ICON_MeshViewer ICON_HotendTemp
|
||||
#define ICON_MoveZ0 ICON_HotendTemp
|
||||
#define ICON_Park ICON_Motion
|
||||
#define ICON_ParkPos ICON_AdvSet
|
||||
#define ICON_MeshViewer ICON_Mesh
|
||||
#define ICON_MoveZ0 ICON_CloseMotor
|
||||
#define ICON_Park ICON_SetHome
|
||||
#define ICON_ParkPos ICON_AxisC
|
||||
#define ICON_ParkPosX ICON_StepX
|
||||
#define ICON_ParkPosY ICON_StepY
|
||||
#define ICON_ParkPosZ ICON_StepZ
|
||||
@@ -95,18 +108,18 @@
|
||||
#define ICON_Preheat8 ICON_CustomPreheat
|
||||
#define ICON_Preheat9 ICON_CustomPreheat
|
||||
#define ICON_Preheat10 ICON_CustomPreheat
|
||||
#define ICON_ProbeDeploy ICON_SetEndTemp
|
||||
#define ICON_ProbeDeploy ICON_Probe
|
||||
#define ICON_ProbeMargin ICON_PrintSize
|
||||
#define ICON_ProbeSet ICON_SetEndTemp
|
||||
#define ICON_ProbeStow ICON_SetEndTemp
|
||||
#define ICON_ProbeTest ICON_SetEndTemp
|
||||
#define ICON_ProbeStow ICON_Tilt
|
||||
#define ICON_ProbeTest ICON_Zoffset
|
||||
#define ICON_ProbeZSpeed ICON_MaxSpeedZ
|
||||
#define ICON_Pwrlossr ICON_Motion
|
||||
#define ICON_Reboot ICON_ResetEEPROM
|
||||
#define ICON_Runout ICON_MaxAccE
|
||||
#define ICON_Scolor ICON_MaxSpeed
|
||||
#define ICON_SetBaudRate ICON_Setspeed
|
||||
#define ICON_SetCustomPreheat ICON_SetEndTemp
|
||||
#define ICON_SetCustomPreheat ICON_BedTemp
|
||||
#define ICON_SetPreheat1 ICON_SetPLAPreheat
|
||||
#define ICON_SetPreheat2 ICON_SetABSPreheat
|
||||
#define ICON_SetPreheat3 ICON_SetCustomPreheat
|
||||
@@ -125,22 +138,24 @@
|
||||
#define ICON_TMCYSet ICON_MoveY
|
||||
#define ICON_TMCZSet ICON_MoveZ
|
||||
#define ICON_TMCESet ICON_Extruder
|
||||
#define ICON_UBLActive ICON_HotendTemp
|
||||
#define ICON_Tram ICON_Step
|
||||
#define ICON_UBLActive ICON_Fade
|
||||
#define ICON_UBLSlot ICON_ResetEEPROM
|
||||
#define ICON_UBLMeshSave ICON_WriteEEPROM
|
||||
#define ICON_UBLMeshLoad ICON_ReadEEPROM
|
||||
#define ICON_UBLTiltGrid ICON_PrintSize
|
||||
#define ICON_UBLSmartFill ICON_StockConfiguration
|
||||
#define ICON_ZAfterHome ICON_SetEndTemp
|
||||
#define ICON_UBLTiltGrid ICON_Tilt
|
||||
#define ICON_ZAfterHome ICON_Tilt
|
||||
|
||||
// LED Lights
|
||||
#define ICON_CaseLight ICON_Motion
|
||||
#define ICON_LedControl ICON_Motion
|
||||
|
||||
// MPC
|
||||
#define ICON_MPCNozzle ICON_SetEndTemp
|
||||
#define ICON_MPCNozzle ICON_HotendTemp
|
||||
#define ICON_MPCValue ICON_Contact
|
||||
#define ICON_MPCHeater ICON_Temperature
|
||||
#define ICON_MPCHeatCap ICON_SetBedTemp
|
||||
#define ICON_MPCHeatCap ICON_BedTemp
|
||||
#define ICON_MPCFan ICON_FanSpeed
|
||||
|
||||
// Buttons
|
||||
@@ -300,20 +315,20 @@ namespace DWINUI {
|
||||
// libID: Icon library ID
|
||||
// picID: Icon ID
|
||||
// x/y: Upper-left point
|
||||
void ICON_Show(bool BG, uint8_t icon, uint16_t x, uint16_t y);
|
||||
void iconShow(bool BG, uint8_t icon, uint16_t x, uint16_t y);
|
||||
|
||||
// Draw an Icon with transparent background from the library ICON
|
||||
// icon: Icon ID
|
||||
// x/y: Upper-left point
|
||||
inline void drawIcon(uint8_t icon, uint16_t x, uint16_t y) {
|
||||
ICON_Show(false, icon, x, y);
|
||||
iconShow(false, icon, x, y);
|
||||
}
|
||||
|
||||
// Draw an Icon from the library ICON with its background
|
||||
// icon: Icon ID
|
||||
// x/y: Upper-left point
|
||||
inline void drawIconWB(uint8_t icon, uint16_t x, uint16_t y) {
|
||||
ICON_Show(true, icon, x, y);
|
||||
iconShow(true, icon, x, y);
|
||||
}
|
||||
|
||||
// Draw a numeric integer value
|
||||
@@ -486,6 +501,9 @@ namespace DWINUI {
|
||||
// y: Upper coordinate of the string
|
||||
// *string: The string
|
||||
void drawCenteredString(bool bShow, fontid_t fid, uint16_t color, uint16_t bColor, uint16_t x1, uint16_t x2, uint16_t y, const char * const string);
|
||||
inline void drawCenteredString(bool bShow, fontid_t fid, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string) {
|
||||
drawCenteredString(bShow, fid, color, bColor, 2 * x, 0, y, string);
|
||||
}
|
||||
inline void drawCenteredString(bool bShow, fontid_t fid, uint16_t color, uint16_t bColor, uint16_t y, const char * const string) {
|
||||
drawCenteredString(bShow, fid, color, bColor, 0, DWIN_WIDTH, y, string);
|
||||
}
|
||||
|
246
Marlin/src/lcd/e3v2/proui/proui_extui.cpp
Normal file
@@ -0,0 +1,246 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* proui_extui.cpp *
|
||||
*********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <https://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
|
||||
#include "dwin_popup.h"
|
||||
|
||||
#include "../../extui/ui_api.h"
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
#include "../../../module/temperature.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../../../feature/powerloss.h"
|
||||
#endif
|
||||
|
||||
namespace ExtUI {
|
||||
|
||||
void onStartup() { dwinInitScreen(); }
|
||||
|
||||
void onIdle() {}
|
||||
void onPrinterKilled(FSTR_P const error, FSTR_P const component) {}
|
||||
|
||||
void onMediaInserted() {}
|
||||
void onMediaError() {}
|
||||
void onMediaRemoved() {}
|
||||
|
||||
void onHeatingError(const heater_id_t heater_id) {
|
||||
dwinPopupTemperature(heater_id, 2); // "Heating failed"
|
||||
}
|
||||
void onMinTempError(const heater_id_t heater_id) {
|
||||
dwinPopupTemperature(heater_id, 0); // "Too low"
|
||||
}
|
||||
void onMaxTempError(const heater_id_t heater_id) {
|
||||
dwinPopupTemperature(heater_id, 1); // "Too high"
|
||||
}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {}
|
||||
void onPrintTimerStarted() {}
|
||||
void onPrintTimerPaused() {}
|
||||
void onPrintTimerStopped() {}
|
||||
|
||||
#if HAS_FILAMENT_SENSOR
|
||||
void onFilamentRunout(const extruder_t extruder) {
|
||||
dwinFilamentRunout(extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onUserConfirmRequired(const char * const cstr) {
|
||||
// TODO: A version of this method that takes an icon and button title,
|
||||
// or implement some kind of ExtUI enum.
|
||||
onUserConfirmRequired(ICON_Continue_1, cstr, GET_TEXT_F(MSG_USERWAIT));
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
dwinPopupConfirm(icon, cstr, fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
dwinPopupConfirm(icon, fstr, fBtn);
|
||||
}
|
||||
|
||||
void onStatusChanged(const char * const) { dwinCheckStatusMessage(); }
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) {
|
||||
if (mode != PAUSE_MODE_SAME) pause_mode = mode;
|
||||
switch (message) {
|
||||
case PAUSE_MESSAGE_PARKING: dwinPopupPause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break; // M125
|
||||
case PAUSE_MESSAGE_CHANGING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break; // pause_print (M125, M600)
|
||||
case PAUSE_MESSAGE_WAITING: dwinPopupPause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_INSERT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_LOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
||||
case PAUSE_MESSAGE_UNLOAD: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; // Unload of pause and Unload of M702
|
||||
case PAUSE_MESSAGE_PURGE: dwinPopupPause(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break;
|
||||
case PAUSE_MESSAGE_OPTION: gotoFilamentPurge(); break;
|
||||
case PAUSE_MESSAGE_RESUME: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
||||
case PAUSE_MESSAGE_HEAT: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), BTN_Continue); break;
|
||||
case PAUSE_MESSAGE_HEATING: dwinPopupPause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break;
|
||||
case PAUSE_MESSAGE_STATUS: hmiReturnScreen(); break; // Exit from Pause, Load and Unload
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void onHomingStart() { dwinHomingStart(); }
|
||||
void onHomingDone() { dwinHomingDone(); }
|
||||
|
||||
void onPrintDone() {}
|
||||
|
||||
void onFactoryReset() { dwinSetDataDefaults(); }
|
||||
|
||||
// Copy settings to EEPROM buffer for write
|
||||
void onStoreSettings(char *buff) { dwinCopySettingsTo(buff); }
|
||||
|
||||
// Get settings from loaded EEPROM data
|
||||
void onLoadSettings(const char *buff) { dwinCopySettingsFrom(buff); }
|
||||
|
||||
void onPostprocessSettings() {
|
||||
// Called after loading or resetting stored settings
|
||||
}
|
||||
|
||||
void onSettingsStored(const bool success) {
|
||||
// Called after the entire EEPROM has been written,
|
||||
// whether successful or not.
|
||||
}
|
||||
|
||||
void onSettingsLoaded(const bool success) {
|
||||
// Called after the entire EEPROM has been read,
|
||||
// whether successful or not.
|
||||
}
|
||||
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() { dwinLevelingStart(); }
|
||||
void onLevelingDone() { dwinLevelingDone(); }
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return hmiData.bedLevT; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
|
||||
const int16_t idx = ypos * (GRID_MAX_POINTS_X) + xpos;
|
||||
dwinMeshUpdate(_MIN(idx, GRID_MAX_POINTS), int(GRID_MAX_POINTS), zval);
|
||||
dwinRedrawScreen();
|
||||
}
|
||||
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {
|
||||
// Called to indicate a special condition
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t t) { hmiData.extMinT = t; }
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
}
|
||||
void onPowerLoss() {
|
||||
// Called when power-loss state is detected
|
||||
}
|
||||
void onPowerLossResume() {
|
||||
// Called on resume from power-loss
|
||||
recovery.ui_flag_resume = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
switch (rst) {
|
||||
#if ENABLED(PIDTEMP)
|
||||
case PID_STARTED: dwinPIDTuning(PIDTEMP_START); break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPBED)
|
||||
case PID_BED_STARTED: dwinPIDTuning(PIDTEMPBED_START); break;
|
||||
#endif
|
||||
#if ENABLED(PIDTEMPCHAMBER)
|
||||
case PID_CHAMBER_STARTED: dwinPIDTuning(PIDTEMPCHAMBER_START); break;
|
||||
#endif
|
||||
case PID_BAD_HEATER_ID: dwinPIDTuning(tempcontrol_t(PID_BAD_HEATER_ID)); break;
|
||||
case PID_TEMP_TOO_HIGH: dwinPIDTuning(tempcontrol_t(PID_TEMP_TOO_HIGH)); break;
|
||||
case PID_TUNING_TIMEOUT: dwinPIDTuning(tempcontrol_t(PID_TUNING_TIMEOUT)); break;
|
||||
case PID_DONE: dwinPIDTuning(AUTOTUNE_DONE); break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
dwinStartM303(count, hid, temp);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
switch (rst) {
|
||||
case MPC_STARTED: dwinMPCTuning(MPCTEMP_START); break;
|
||||
case MPC_TEMP_ERROR: dwinMPCTuning(MPC_TEMP_ERROR); break;
|
||||
case MPC_INTERRUPTED: dwinMPCTuning(MPC_INTERRUPTED); break;
|
||||
case MPC_DONE: dwinMPCTuning(AUTOTUNE_DONE); break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() { dwinRebootScreen(); }
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t axis) {
|
||||
set_axis_untrusted(AxisEnum(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095
|
||||
}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
|
||||
} // ExtUI
|
||||
|
||||
#endif // DWIN_LCD_PROUI
|
@@ -49,6 +49,10 @@ namespace ExtUI {
|
||||
void onMediaError() { chiron.mediaEvent(AC_media_error); }
|
||||
void onMediaRemoved() { chiron.mediaEvent(AC_media_removed); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {
|
||||
#if ENABLED(SPEAKER)
|
||||
::tone(BEEPER_PIN, frequency, duration);
|
||||
@@ -65,6 +69,26 @@ namespace ExtUI {
|
||||
|
||||
void onUserConfirmRequired(const char * const msg) { chiron.confirmationRequest(msg); }
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) { chiron.statusChange(msg); }
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -109,6 +133,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -123,6 +150,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -135,13 +166,28 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // ANYCUBIC_LCD_CHIRON
|
||||
|
@@ -43,6 +43,10 @@ namespace ExtUI {
|
||||
void onMediaError() { anycubicTFT.onSDCardError(); }
|
||||
void onMediaRemoved() { anycubicTFT.onSDCardStateChange(false); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {
|
||||
TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration));
|
||||
}
|
||||
@@ -53,6 +57,26 @@ namespace ExtUI {
|
||||
void onFilamentRunout(const extruder_t extruder) { anycubicTFT.onFilamentRunout(); }
|
||||
void onUserConfirmRequired(const char * const msg) { anycubicTFT.onUserConfirmRequired(msg); }
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) {}
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -99,6 +123,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -111,6 +138,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -124,13 +155,28 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // ANYCUBIC_LCD_I3MEGA
|
||||
|
@@ -49,6 +49,10 @@ namespace ExtUI {
|
||||
void onMediaError() { dgus.mediaEvent(AC_media_error); }
|
||||
void onMediaRemoved() { dgus.mediaEvent(AC_media_removed); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {
|
||||
#if ENABLED(SPEAKER)
|
||||
::tone(BEEPER_PIN, frequency, duration);
|
||||
@@ -65,6 +69,26 @@ namespace ExtUI {
|
||||
|
||||
void onUserConfirmRequired(const char * const msg) { dgus.confirmationRequest(msg); }
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) { dgus.statusChange(msg); }
|
||||
|
||||
void onHomingStart() { dgus.homingStart(); }
|
||||
@@ -113,6 +137,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -137,20 +164,28 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
switch (rst) {
|
||||
case PID_STARTED: break;
|
||||
case PID_BAD_HEATER_ID: break;
|
||||
case PID_TEMP_TOO_HIGH: break;
|
||||
case PID_TUNING_TIMEOUT: break;
|
||||
case PID_DONE: break;
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // ANYCUBIC_LCD_VYPER
|
||||
|
@@ -52,6 +52,10 @@ namespace ExtUI {
|
||||
void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); }
|
||||
void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {}
|
||||
void onPrintTimerStarted() {}
|
||||
void onPrintTimerPaused() {}
|
||||
@@ -70,6 +74,26 @@ namespace ExtUI {
|
||||
}
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) { screen.setStatusMessage(msg); }
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -116,6 +140,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -128,6 +155,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -142,11 +173,12 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
switch (rst) {
|
||||
case PID_STARTED:
|
||||
case PID_BED_STARTED:
|
||||
case PID_CHAMBER_STARTED:
|
||||
screen.setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
break;
|
||||
case PID_BAD_HEATER_ID:
|
||||
@@ -164,10 +196,40 @@ namespace ExtUI {
|
||||
}
|
||||
screen.gotoScreen(DGUS_SCREEN_MAIN);
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
switch (rst) {
|
||||
case MPC_STARTED:
|
||||
screen.setStatusMessage(GET_TEXT_F(MSG_MPC_AUTOTUNE));
|
||||
break;
|
||||
case MPC_TEMP_ERROR:
|
||||
//screen.setStatusMessage(GET_TEXT_F(MSG_MPC_TEMP_ERROR));
|
||||
break;
|
||||
case MPC_INTERRUPTED:
|
||||
//screen.setStatusMessage(GET_TEXT_F(MSG_MPC_INTERRUPTED));
|
||||
break;
|
||||
case MPC_DONE:
|
||||
//screen.setStatusMessage(GET_TEXT_F(MSG_MPC_AUTOTUNE_DONE));
|
||||
break;
|
||||
}
|
||||
screen.gotoScreen(DGUS_SCREEN_MAIN);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // HAS_DGUS_LCD_CLASSIC
|
||||
|
@@ -369,7 +369,7 @@ void DGUSScreenHandler::addCurrentPageStringLength(size_t stringLength, size_t t
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void DGUSScreenHandler::pidTuning(const ExtUI::result_t rst) {
|
||||
void DGUSScreenHandler::pidTuning(const ExtUI::pidresult_t rst) {
|
||||
dgus.playSound(3);
|
||||
}
|
||||
#endif
|
||||
|
@@ -132,7 +132,7 @@ public:
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
static void pidTuning(const ExtUI::result_t rst);
|
||||
static void pidTuning(const ExtUI::pidresult_t rst);
|
||||
#endif
|
||||
|
||||
static void steppersStatusChanged(bool steppersEnabled);
|
||||
|
@@ -59,6 +59,10 @@ namespace ExtUI {
|
||||
void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); }
|
||||
void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {
|
||||
screen.playTone(frequency, duration);
|
||||
}
|
||||
@@ -83,6 +87,26 @@ namespace ExtUI {
|
||||
screen.userConfirmRequired(msg);
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) {
|
||||
screen.setStatusMessage(msg);
|
||||
}
|
||||
@@ -120,6 +144,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() { screen.levelingStart(); }
|
||||
void onLevelingDone() { screen.levelingEnd(); }
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -129,6 +156,10 @@ namespace ExtUI {
|
||||
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { }
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -143,10 +174,23 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
screen.pidTuning(rst);
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {
|
||||
@@ -156,6 +200,9 @@ namespace ExtUI {
|
||||
void onSteppersEnabled() {
|
||||
screen.steppersStatusChanged(true);
|
||||
}
|
||||
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // DGUS_LCD_UI_RELOADED
|
||||
|
@@ -598,7 +598,7 @@ void DGUSRxHandler::filamentMove(DGUS_VP &vp, void *data_ptr) {
|
||||
}
|
||||
|
||||
if (ExtUI::getActualTemp_celsius(extruder) < (float)EXTRUDE_MINTEMP) {
|
||||
screen.setStatusMessage(GET_TEXT_F(DGUS_MSG_TEMP_TOO_LOW));
|
||||
screen.setStatusMessage(GET_TEXT_F(MSG_TEMP_TOO_LOW));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -305,10 +305,11 @@ void DGUSScreenHandler::filamentRunout(const ExtUI::extruder_t extruder) {
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
void DGUSScreenHandler::pidTuning(const ExtUI::result_t rst) {
|
||||
void DGUSScreenHandler::pidTuning(const ExtUI::pidresult_t rst) {
|
||||
switch (rst) {
|
||||
case ExtUI::PID_STARTED:
|
||||
case ExtUI::PID_BED_STARTED:
|
||||
case ExtUI::PID_CHAMBER_STARTED:
|
||||
setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
break;
|
||||
case ExtUI::PID_BAD_HEATER_ID:
|
||||
|
@@ -66,7 +66,7 @@ public:
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
static void pidTuning(const ExtUI::result_t rst);
|
||||
static void pidTuning(const ExtUI::pidresult_t rst);
|
||||
#endif
|
||||
|
||||
static void setMessageLine(const char * const msg, const uint8_t line);
|
||||
|
@@ -54,6 +54,10 @@ namespace ExtUI {
|
||||
void onMediaError() { TERN_(HAS_MEDIA, screen.sdCardError()); }
|
||||
void onMediaRemoved() { TERN_(HAS_MEDIA, screen.sdCardRemoved()); }
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {
|
||||
screen.playTone(frequency, duration);
|
||||
}
|
||||
@@ -78,6 +82,26 @@ namespace ExtUI {
|
||||
screen.userConfirmRequired(msg);
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) {
|
||||
screen.setStatusMessage(msg);
|
||||
}
|
||||
@@ -112,6 +136,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -125,6 +152,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -139,14 +170,29 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
screen.pidTuning(rst);
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // DGUS_LCD_UI_RELOADED
|
||||
|
@@ -52,6 +52,10 @@ namespace ExtUI {
|
||||
void onMediaError() {}
|
||||
void onMediaRemoved() {}
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {}
|
||||
|
||||
void onPrintTimerStarted() {}
|
||||
@@ -62,6 +66,20 @@ namespace ExtUI {
|
||||
|
||||
void onUserConfirmRequired(const char * const msg) {}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) {}
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -108,6 +126,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -120,6 +141,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -133,21 +158,43 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
switch (rst) {
|
||||
case PID_STARTED:
|
||||
case PID_BED_STARTED:
|
||||
case PID_CHAMBER_STARTED: break;
|
||||
case PID_BAD_HEATER_ID: break;
|
||||
case PID_TEMP_TOO_HIGH: break;
|
||||
case PID_TUNING_TIMEOUT: break;
|
||||
case PID_DONE: break;
|
||||
}
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature MPC tuning result
|
||||
switch (rst) {
|
||||
case MPC_STARTED: break;
|
||||
case MPC_TEMP_ERROR: break;
|
||||
case MPC_INTERRUPTED: break;
|
||||
case MPC_DONE: break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // EXTUI_EXAMPLE && EXTENSIBLE_UI
|
||||
|
@@ -70,6 +70,10 @@ namespace ExtUI {
|
||||
#endif
|
||||
}
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onStatusChanged(const char *lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); }
|
||||
|
||||
void onPrintTimerStarted() {
|
||||
@@ -117,9 +121,32 @@ namespace ExtUI {
|
||||
ConfirmUserRequestAlertBox::hide();
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -131,6 +158,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -144,12 +175,13 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
//SERIAL_ECHOLNPGM("OnPidTuning:", rst);
|
||||
//SERIAL_ECHOLNPGM("OnPIDTuning:", rst);
|
||||
switch (rst) {
|
||||
case PID_STARTED:
|
||||
case PID_BED_STARTED:
|
||||
case PID_CHAMBER_STARTED:
|
||||
StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
break;
|
||||
case PID_BAD_HEATER_ID:
|
||||
@@ -167,10 +199,31 @@ namespace ExtUI {
|
||||
}
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif // HAS_PID_HEATING
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
switch (rst) {
|
||||
case MPC_STARTED:
|
||||
StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MPC_AUTOTUNE));
|
||||
break;
|
||||
}
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // TOUCH_UI_FTDI_EVE
|
||||
|
@@ -98,6 +98,10 @@ void onMediaRemoved() {
|
||||
}
|
||||
}
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t, const uint16_t/*=0*/) {
|
||||
rts.sendData(StartSoundSet, SoundAddr);
|
||||
}
|
||||
@@ -228,6 +232,26 @@ void onUserConfirmRequired(const char *const msg) {
|
||||
lastPauseMsgState = ExtUI::pauseModeStatus;
|
||||
}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(fstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char *const statMsg) {
|
||||
for (int16_t j = 0; j < 20; j++) // Clear old message
|
||||
rts.sendData(' ', StatusMessageString + j);
|
||||
@@ -356,6 +380,10 @@ void onPostprocessSettings() {}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -373,7 +401,7 @@ void onPostprocessSettings() {}
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
rts.sendData(pid_hotendAutoTemp, HotendPID_AutoTmp);
|
||||
rts.sendData(pid_bedAutoTemp, BedPID_AutoTmp);
|
||||
@@ -387,6 +415,19 @@ void onPostprocessSettings() {}
|
||||
#endif
|
||||
onStatusChanged(F("PID Tune Finished"));
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -396,6 +437,8 @@ void onPrintDone() {}
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
|
||||
} // ExtUI
|
||||
|
||||
|
@@ -163,21 +163,10 @@ void RTS::onIdle() {
|
||||
TERN_(HAS_MULTI_HOTEND, rts.sendData(uint8_t(getActiveTool() + 1), ActiveToolVP));
|
||||
|
||||
if (awaitingUserConfirm() && (lastPauseMsgState != ExtUI::pauseModeStatus || userConfValidation > 99)) {
|
||||
switch (ExtUI::pauseModeStatus) {
|
||||
case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break;
|
||||
case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break;
|
||||
case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break;
|
||||
case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING)); break;
|
||||
case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); break;
|
||||
case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
||||
case PAUSE_MESSAGE_PURGE: ExtUI::onUserConfirmRequired(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break;
|
||||
case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
||||
case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT)); break;
|
||||
case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break;
|
||||
case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_OPTION_HEADER)); break;
|
||||
case PAUSE_MESSAGE_STATUS: break;
|
||||
default: onUserConfirmRequired(PSTR("Confirm Continue")); break;
|
||||
}
|
||||
if (ExtUI::pauseModeStatus < PAUSE_MESSAGE_COUNT)
|
||||
ui.pause_show_message(ExtUI::pauseModeStatus);
|
||||
else
|
||||
ExtUI::onUserConfirmRequired(F("Confirm Continue"));
|
||||
userConfValidation = 0;
|
||||
}
|
||||
else if (pause_resume_selected && !awaitingUserConfirm()) {
|
||||
|
@@ -104,12 +104,13 @@ namespace ExtUI {
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
//SERIAL_ECHOLNPGM("OnPidTuning:", rst);
|
||||
//SERIAL_ECHOLNPGM("OnPIDTuning:", rst);
|
||||
switch (rst) {
|
||||
case PID_STARTED:
|
||||
case PID_BED_STARTED:
|
||||
case PID_CHAMBER_STARTED:
|
||||
set_lcd_error(GET_TEXT_F(MSG_PID_AUTOTUNE));
|
||||
break;
|
||||
case PID_BAD_HEATER_ID:
|
||||
@@ -127,6 +128,10 @@ namespace ExtUI {
|
||||
}
|
||||
}
|
||||
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void onPrintTimerStarted() { write_to_lcd(F("{SYS:BUILD}")); }
|
||||
@@ -140,11 +145,27 @@ namespace ExtUI {
|
||||
void onMediaError() {}
|
||||
void onMediaRemoved() {}
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t, const uint16_t/*=0*/) {}
|
||||
|
||||
void onFilamentRunout(const extruder_t extruder) {}
|
||||
void onUserConfirmRequired(const char * const) {}
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {}
|
||||
#endif
|
||||
|
||||
void onHomingStart() {}
|
||||
void onHomingDone() {}
|
||||
|
||||
@@ -160,6 +181,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -167,6 +191,10 @@ namespace ExtUI {
|
||||
void onMeshUpdate(const int8_t, const int8_t, const ExtUI::probe_state_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -179,8 +207,20 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // MALYAN_LCD
|
||||
|
@@ -43,6 +43,10 @@ namespace ExtUI {
|
||||
void onMediaError() {}
|
||||
void onMediaRemoved() {}
|
||||
|
||||
void onHeatingError(const heater_id_t header_id) {}
|
||||
void onMinTempError(const heater_id_t header_id) {}
|
||||
void onMaxTempError(const heater_id_t header_id) {}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration/*=0*/) {}
|
||||
void onPrintTimerStarted() {}
|
||||
void onPrintTimerPaused() {}
|
||||
@@ -51,6 +55,26 @@ namespace ExtUI {
|
||||
|
||||
void onUserConfirmRequired(const char * const msg) { nextion.confirmationRequest(msg); }
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn) {
|
||||
onUserConfirmRequired(cstr);
|
||||
UNUSED(icon); UNUSED(fBtn);
|
||||
}
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void onPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
stdOnPauseMode(message, mode, extruder);
|
||||
}
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg) { nextion.statusChange(msg); }
|
||||
|
||||
void onHomingStart() {}
|
||||
@@ -97,6 +121,9 @@ namespace ExtUI {
|
||||
#if HAS_LEVELING
|
||||
void onLevelingStart() {}
|
||||
void onLevelingDone() {}
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp() { return LEVELING_BED_TEMP; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_MESH
|
||||
@@ -109,6 +136,10 @@ namespace ExtUI {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t) {}
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff) {
|
||||
// Called when power-loss is enabled/disabled
|
||||
@@ -122,15 +153,29 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst) {
|
||||
void onPIDTuning(const pidresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
nextion.panelInfo(37);
|
||||
}
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp) {
|
||||
// Called by M303 to update the UI
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst) {
|
||||
// Called for temperature PID tuning result
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash() {}
|
||||
#endif
|
||||
|
||||
void onSteppersDisabled() {}
|
||||
void onSteppersEnabled() {}
|
||||
|
||||
void onAxisDisabled(const axis_t) {}
|
||||
void onAxisEnabled(const axis_t) {}
|
||||
}
|
||||
|
||||
#endif // NEXTION_TFT
|
||||
|
@@ -106,7 +106,7 @@
|
||||
#include "../../feature/host_actions.h"
|
||||
#endif
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#include "../../feature/pause.h"
|
||||
#endif
|
||||
|
||||
@@ -1116,10 +1116,39 @@ namespace ExtUI {
|
||||
}
|
||||
void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); }
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void setPauseMenuResponse(PauseMenuResponse response) { pause_menu_response = response; }
|
||||
PauseMessage pauseModeStatus = PAUSE_MESSAGE_STATUS;
|
||||
PauseMode getPauseMode() { return pause_mode; }
|
||||
|
||||
PauseMessage pauseModeStatus = PAUSE_MESSAGE_STATUS;
|
||||
|
||||
void stdOnPauseMode(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
if (mode != PAUSE_MODE_SAME) pause_mode = mode;
|
||||
pauseModeStatus = message;
|
||||
switch (message) {
|
||||
case PAUSE_MESSAGE_PARKING: onUserConfirmRequired(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break;
|
||||
case PAUSE_MESSAGE_CHANGING: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break;
|
||||
case PAUSE_MESSAGE_UNLOAD: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break;
|
||||
case PAUSE_MESSAGE_WAITING: onUserConfirmRequired(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING)); break;
|
||||
case PAUSE_MESSAGE_INSERT: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); break;
|
||||
case PAUSE_MESSAGE_LOAD: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
||||
case PAUSE_MESSAGE_PURGE: onUserConfirmRequired(
|
||||
GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))
|
||||
);
|
||||
break;
|
||||
case PAUSE_MESSAGE_RESUME: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
||||
case PAUSE_MESSAGE_HEAT: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT)); break;
|
||||
case PAUSE_MESSAGE_HEATING: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break;
|
||||
case PAUSE_MESSAGE_OPTION: onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_OPTION_HEADER)); break;
|
||||
case PAUSE_MESSAGE_STATUS: break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void printFile(const char *filename) {
|
||||
@@ -1228,7 +1257,7 @@ namespace ExtUI {
|
||||
//
|
||||
// MarlinUI passthroughs to ExtUI
|
||||
//
|
||||
|
||||
#if DISABLED(HAS_DWIN_E3V2)
|
||||
void MarlinUI::init_lcd() { ExtUI::onStartup(); }
|
||||
|
||||
void MarlinUI::update() { ExtUI::onIdle(); }
|
||||
@@ -1240,5 +1269,18 @@ void MarlinUI::kill_screen(FSTR_P const error, FSTR_P const component) {
|
||||
onPrinterKilled(error, component);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
void MarlinUI::pause_show_message(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
ExtUI::onPauseMode(message, mode, extruder);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // EXTENSIBLE_UI
|
||||
|
@@ -46,8 +46,10 @@
|
||||
|
||||
#include "../marlinui.h"
|
||||
#include "../../gcode/gcode.h"
|
||||
#include "../../module/temperature.h"
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#include "../../module/motion.h"
|
||||
#include "../../feature/pause.h"
|
||||
#endif
|
||||
|
||||
@@ -66,14 +68,12 @@ namespace ExtUI {
|
||||
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 };
|
||||
enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER };
|
||||
enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 };
|
||||
enum result_t : uint8_t {
|
||||
OPTITEM(HAS_PID_HEATING, PID_STARTED)
|
||||
OPTITEM(HAS_PID_HEATING, PID_BED_STARTED)
|
||||
OPTITEM(HAS_PID_HEATING, PID_BAD_HEATER_ID)
|
||||
OPTITEM(HAS_PID_HEATING, PID_TEMP_TOO_HIGH)
|
||||
OPTITEM(HAS_PID_HEATING, PID_TUNING_TIMEOUT)
|
||||
OPTITEM(HAS_PID_HEATING, PID_DONE)
|
||||
};
|
||||
#if HAS_PID_HEATING
|
||||
enum pidresult_t : uint8_t { PID_STARTED, PID_BED_STARTED, PID_CHAMBER_STARTED, PID_BAD_HEATER_ID, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE };
|
||||
#endif
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
enum mpcresult_t : uint8_t { MPC_STARTED, MPC_TEMP_ERROR, MPC_INTERRUPTED, MPC_DONE };
|
||||
#endif
|
||||
|
||||
constexpr uint8_t extruderCount = EXTRUDERS;
|
||||
constexpr uint8_t hotendCount = HOTENDS;
|
||||
@@ -234,6 +234,9 @@ namespace ExtUI {
|
||||
bool getLevelingIsValid();
|
||||
void onLevelingStart();
|
||||
void onLevelingDone();
|
||||
#if ENABLED(PREHEAT_BEFORE_LEVELING)
|
||||
celsius_t getLevelingBedTemp();
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
// Mesh data, utilities, events
|
||||
bed_mesh_t& getMeshArray();
|
||||
@@ -312,10 +315,9 @@ namespace ExtUI {
|
||||
bool awaitingUserConfirm();
|
||||
void setUserConfirmed();
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
// "Purge More" has a control screen
|
||||
void setPauseMenuResponse(PauseMenuResponse);
|
||||
extern PauseMessage pauseModeStatus;
|
||||
PauseMode getPauseMode();
|
||||
#endif
|
||||
|
||||
@@ -488,6 +490,10 @@ namespace ExtUI {
|
||||
void onMediaError();
|
||||
void onMediaRemoved();
|
||||
|
||||
void onHeatingError(const heater_id_t header_id);
|
||||
void onMinTempError(const heater_id_t header_id);
|
||||
void onMaxTempError(const heater_id_t header_id);
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration=0);
|
||||
|
||||
void onPrinterKilled(FSTR_P const error, FSTR_P const component);
|
||||
@@ -503,6 +509,17 @@ namespace ExtUI {
|
||||
void onUserConfirmRequired(const char * const msg);
|
||||
void onUserConfirmRequired(FSTR_P const fstr);
|
||||
|
||||
// For fancy LCDs include an icon ID, message, and translated button title
|
||||
void onUserConfirmRequired(const int icon, const char * const cstr, FSTR_P const fBtn);
|
||||
void onUserConfirmRequired(const int icon, FSTR_P const fstr, FSTR_P const fBtn);
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
// Standard stdOnPauseMode sets pauseModeStatus and calls onUserConfirmRequired
|
||||
extern PauseMessage pauseModeStatus;
|
||||
void stdOnPauseMode(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
void onPauseMode(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
#endif
|
||||
|
||||
void onStatusChanged(const char * const msg);
|
||||
void onStatusChanged(FSTR_P const fstr);
|
||||
|
||||
@@ -511,6 +528,8 @@ namespace ExtUI {
|
||||
|
||||
void onSteppersDisabled();
|
||||
void onSteppersEnabled();
|
||||
void onAxisDisabled(const axis_t axis);
|
||||
void onAxisEnabled(const axis_t axis);
|
||||
|
||||
void onFactoryReset();
|
||||
void onStoreSettings(char *);
|
||||
@@ -519,13 +538,23 @@ namespace ExtUI {
|
||||
void onSettingsStored(const bool success);
|
||||
void onSettingsLoaded(const bool success);
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
void onSetMinExtrusionTemp(const celsius_t t);
|
||||
#endif
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
void onSetPowerLoss(const bool onoff);
|
||||
void onPowerLoss();
|
||||
void onPowerLossResume();
|
||||
#endif
|
||||
#if HAS_PID_HEATING
|
||||
void onPIDTuning(const result_t rst);
|
||||
void onPIDTuning(const pidresult_t rst);
|
||||
void onStartM303(const int count, const heater_id_t hid, const celsius_t temp);
|
||||
#endif
|
||||
#if ENABLED(MPC_AUTOTUNE)
|
||||
void onMPCTuning(const mpcresult_t rst);
|
||||
#endif
|
||||
#if ENABLED(PLATFORM_M997_SUPPORT)
|
||||
void onFirmwareFlash();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -360,8 +360,17 @@ namespace LanguageNarrow_en {
|
||||
LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done");
|
||||
LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Autotune failed!");
|
||||
|
||||
LSTR MSG_PID_FOR_NOZZLE = _UxGT("for Nozzle is running.");
|
||||
LSTR MSG_PID_FOR_BED = _UxGT("for BED is running.");
|
||||
LSTR MSG_PID_FOR_CHAMBER = _UxGT("for CHAMBER is running.");
|
||||
|
||||
LSTR MSG_TEMP_NOZZLE = _UxGT("Nozzle Temperature");
|
||||
LSTR MSG_TEMP_BED = _UxGT("Bed Temperature");
|
||||
LSTR MSG_TEMP_CHAMBER = _UxGT("Chamber Temperature");
|
||||
|
||||
LSTR MSG_BAD_HEATER_ID = _UxGT("Bad extruder.");
|
||||
LSTR MSG_TEMP_TOO_HIGH = _UxGT("Temperature too high.");
|
||||
LSTR MSG_TEMP_TOO_LOW = _UxGT("Temperature too low");
|
||||
|
||||
LSTR MSG_PID_BAD_HEATER_ID = _UxGT("Autotune failed! Bad extruder.");
|
||||
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed! Temperature too high.");
|
||||
@@ -841,7 +850,7 @@ namespace LanguageNarrow_en {
|
||||
|
||||
LSTR MSG_XATC = _UxGT("X-Twist Wizard");
|
||||
LSTR MSG_XATC_DONE = _UxGT("X-Twist Wizard Done!");
|
||||
LSTR MSG_XATC_UPDATE_Z_OFFSET = _UxGT("Update Probe Z-Offset to ");
|
||||
LSTR MSG_XATC_UPDATE_Z_OFFSET = _UxGT("Update Z-Offset to ");
|
||||
|
||||
LSTR MSG_SOUND = _UxGT("Sound");
|
||||
|
||||
@@ -881,7 +890,6 @@ namespace LanguageNarrow_en {
|
||||
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Not allowed during print");
|
||||
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Not allowed while idle");
|
||||
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("No file selected");
|
||||
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperature too low");
|
||||
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Executing command...");
|
||||
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Bed PID disabled");
|
||||
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID disabled");
|
||||
|
@@ -263,6 +263,8 @@ namespace LanguageNarrow_fr {
|
||||
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Echec Autotune! Temp. trop haute");
|
||||
LSTR MSG_PID_TIMEOUT = _UxGT("Echec Autotune! Opér. expirée");
|
||||
|
||||
LSTR MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
|
||||
|
||||
LSTR MSG_SELECT_E = _UxGT("Sélectionner *");
|
||||
LSTR MSG_ACC = _UxGT("Accélération");
|
||||
LSTR MSG_JERK = _UxGT("Jerk");
|
||||
@@ -598,7 +600,6 @@ namespace LanguageNarrow_fr {
|
||||
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Impossible pendant une impression");
|
||||
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Impossible tant que l'imprimante est en attente");
|
||||
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Aucun fichier selectionne");
|
||||
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
|
||||
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Execution de la commande...");
|
||||
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Bed PID desactive");
|
||||
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID desactive");
|
||||
|
@@ -263,6 +263,8 @@ namespace LanguageNarrow_fr_na {
|
||||
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Echec Autotune! Temp. trop haute");
|
||||
LSTR MSG_PID_TIMEOUT = _UxGT("Echec Autotune! Oper. expiree");
|
||||
|
||||
LSTR MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
|
||||
|
||||
LSTR MSG_SELECT_E = _UxGT("Selectionner *");
|
||||
LSTR MSG_ACC = _UxGT("Acceleration");
|
||||
LSTR MSG_JERK = _UxGT("Jerk");
|
||||
@@ -601,7 +603,6 @@ namespace LanguageNarrow_fr_na {
|
||||
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Impossible pendant une impression");
|
||||
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Impossible tant que l'imprimante est en attente");
|
||||
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Aucun fichier selectionne");
|
||||
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperature trop basse");
|
||||
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Execution de la commande...");
|
||||
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Bed PID desactive");
|
||||
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID desactive");
|
||||
|
@@ -849,7 +849,6 @@ namespace LanguageNarrow_it {
|
||||
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Non ammesso durante la stampa");
|
||||
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Non ammesso mentre è in riposo");
|
||||
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Nessun file selezionato");
|
||||
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Temperatura troppo bassa");
|
||||
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Esecuzione del comando...");
|
||||
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("PID piatto disabilitato");
|
||||
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID disabilitato");
|
||||
@@ -888,6 +887,7 @@ namespace LanguageWide_it {
|
||||
LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo totale");
|
||||
LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Lavoro più lungo");
|
||||
LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Totale estruso");
|
||||
LSTR MSG_TEMP_TOO_LOW = _UxGT("Temperatura troppo bassa");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -351,6 +351,7 @@ namespace LanguageNarrow_tr {
|
||||
LSTR MSG_PID_AUTOTUNE_FAILED = _UxGT("Kalibrasyon başarısız!");
|
||||
LSTR MSG_BAD_HEATER_ID = _UxGT("Kötü ekstruder.");
|
||||
LSTR MSG_TEMP_TOO_HIGH = _UxGT("Sıcaklık çok yüksek.");
|
||||
LSTR MSG_TEMP_TOO_LOW = _UxGT("Sıcaklık çok düşük");
|
||||
LSTR MSG_PID_BAD_HEATER_ID = _UxGT("Kalibrasyon başarısız! Kötü ekstruder.");
|
||||
LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Kalibrasyon başarısız! Sıcaklık çok yüksek.");
|
||||
LSTR MSG_PID_TIMEOUT = _UxGT("Kalibrasyon başarısız! Zaman aşımı.");
|
||||
@@ -867,7 +868,6 @@ namespace LanguageNarrow_tr {
|
||||
LSTR DGUS_MSG_NOT_WHILE_PRINTING = _UxGT("Yazdırma sırasında izin verilmez");
|
||||
LSTR DGUS_MSG_NOT_WHILE_IDLE = _UxGT("Boştayken izin verilmez");
|
||||
LSTR DGUS_MSG_NO_FILE_SELECTED = _UxGT("Seçili dosya yok");
|
||||
LSTR DGUS_MSG_TEMP_TOO_LOW = _UxGT("Sıcaklık çok düşük");
|
||||
LSTR DGUS_MSG_EXECUTING_COMMAND = _UxGT("Komut yürütülüyor...");
|
||||
LSTR DGUS_MSG_BED_PID_DISABLED = _UxGT("Tabla PID pasif");
|
||||
LSTR DGUS_MSG_PID_DISABLED = _UxGT("PID devre dışı");
|
||||
|
@@ -48,8 +48,6 @@ MarlinUI ui;
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "e3v2/proui/dwin.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "e3v2/jyersui/dwin.h"
|
||||
#endif
|
||||
@@ -69,7 +67,7 @@ MarlinUI ui;
|
||||
constexpr uint8_t epps = ENCODER_PULSES_PER_STEP;
|
||||
|
||||
#if HAS_STATUS_MESSAGE
|
||||
#if ENABLED(STATUS_MESSAGE_SCROLLING) && ANY(HAS_WIRED_LCD, DWIN_LCD_PROUI)
|
||||
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
||||
uint8_t MarlinUI::status_scroll_offset; // = 0
|
||||
#endif
|
||||
MString<MAX_MESSAGE_LENGTH> MarlinUI::status_message;
|
||||
@@ -1490,7 +1488,7 @@ void MarlinUI::host_notify(const char * const cstr) {
|
||||
|
||||
else if (!no_welcome) msg = GET_TEXT_F(WELCOME_MSG);
|
||||
|
||||
else if (ENABLED(DWIN_LCD_PROUI))
|
||||
else if (ENABLED(STATUS_DO_CLEAR_EMPTY))
|
||||
msg = F("");
|
||||
else
|
||||
return;
|
||||
@@ -1609,7 +1607,6 @@ void MarlinUI::host_notify(const char * const cstr) {
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message));
|
||||
TERN_(DWIN_CREALITY_LCD, dwinStatusChanged(status_message));
|
||||
TERN_(DWIN_LCD_PROUI, dwinCheckStatusMessage());
|
||||
TERN_(DWIN_CREALITY_LCD_JYERSUI, jyersDWIN.updateStatus(status_message));
|
||||
}
|
||||
|
||||
@@ -1888,36 +1885,6 @@ void MarlinUI::host_notify(const char * const cstr) {
|
||||
|
||||
#endif
|
||||
|
||||
#if ALL(EXTENSIBLE_UI, ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
void MarlinUI::pause_show_message(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
) {
|
||||
if (mode != PAUSE_MODE_SAME) pause_mode = mode;
|
||||
ExtUI::pauseModeStatus = message;
|
||||
switch (message) {
|
||||
case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break;
|
||||
case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break;
|
||||
case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break;
|
||||
case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING)); break;
|
||||
case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); break;
|
||||
case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break;
|
||||
case PAUSE_MESSAGE_PURGE:
|
||||
ExtUI::onUserConfirmRequired(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE)));
|
||||
break;
|
||||
case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break;
|
||||
case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT)); break;
|
||||
case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); break;
|
||||
case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_OPTION_HEADER)); break;
|
||||
case PAUSE_MESSAGE_STATUS: break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
|
||||
#if HAS_MARLINUI_MENU
|
||||
|
@@ -53,6 +53,10 @@
|
||||
#include "e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ALL(HAS_STATUS_MESSAGE, IS_DWIN_MARLINUI)
|
||||
#include "e3v2/marlinui/marlinui_dwin.h" // for LCD_WIDTH
|
||||
#endif
|
||||
|
||||
typedef bool (*statusResetFunc_t)();
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
@@ -753,7 +757,7 @@ public:
|
||||
static bool use_click() { return false; }
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_MARLINUI_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI)
|
||||
static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
#else
|
||||
static void _pause_show_message() {}
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#include "../lcd/e3v2/proui/dwin.h" // for Z_POST_CLEARANCE
|
||||
#endif
|
||||
|
||||
#if IS_SCARA
|
||||
@@ -413,13 +413,13 @@ void remember_feedrate_scaling_off();
|
||||
void restore_feedrate_and_scaling();
|
||||
|
||||
#if HAS_Z_AXIS
|
||||
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING)
|
||||
#define Z_POST_CLEARANCE hmiData.zAfterHoming
|
||||
#elif defined(Z_AFTER_HOMING)
|
||||
#ifndef Z_POST_CLEARANCE // May be set by proui/dwin.h :-P
|
||||
#ifdef Z_AFTER_HOMING
|
||||
#define Z_POST_CLEARANCE Z_AFTER_HOMING
|
||||
#else
|
||||
#define Z_POST_CLEARANCE Z_CLEARANCE_FOR_HOMING
|
||||
#endif
|
||||
#endif
|
||||
void do_z_clearance(const_float_t zclear, const bool with_probe=true, const bool lower_allowed=false);
|
||||
void do_z_clearance_by(const_float_t zclear);
|
||||
void do_move_after_z_homing();
|
||||
|
@@ -96,8 +96,6 @@
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin_popup.h"
|
||||
#endif
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||
@@ -376,8 +374,11 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
|
||||
#endif
|
||||
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(ds_fstr));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(ds_fstr));
|
||||
TERN_(DWIN_LCD_PROUI, dwinPopupConfirm(ICON_BLTouch, ds_fstr, FPSTR(CONTINUE_STR)));
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
ExtUI::onUserConfirmRequired(ICON_BLTouch, ds_fstr, FPSTR(CONTINUE_STR));
|
||||
#elif ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onUserConfirmRequired(ds_fstr);
|
||||
#endif
|
||||
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
|
||||
|
||||
ui.reset_status();
|
||||
|
@@ -75,11 +75,13 @@
|
||||
#include "../feature/z_stepper_align.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#include "../lcd/e3v2/proui/bedlevel_tools.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
#include "../lcd/extui/ui_api.h"
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#include "../lcd/e3v2/jyersui/dwin.h"
|
||||
#endif
|
||||
@@ -490,6 +492,13 @@ typedef struct SettingsDataStruct {
|
||||
#endif
|
||||
uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // M907 X Z E ...
|
||||
|
||||
//
|
||||
// Adaptive Step Smoothing state
|
||||
//
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
bool adaptive_step_smoothing_enabled; // G-code pending
|
||||
#endif
|
||||
|
||||
//
|
||||
// CNC_COORDINATE_SYSTEMS
|
||||
//
|
||||
@@ -537,9 +546,7 @@ typedef struct SettingsDataStruct {
|
||||
//
|
||||
// Ender-3 V2 DWIN
|
||||
//
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
uint8_t dwin_data[eeprom_data_size];
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
uint8_t dwin_settings[jyersDWIN.eeprom_data_size];
|
||||
#endif
|
||||
|
||||
@@ -1530,6 +1537,14 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Adaptive Step Smoothing state
|
||||
//
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
_FIELD_TEST(adaptive_step_smoothing_enabled);
|
||||
EEPROM_WRITE(stepper.adaptive_step_smoothing_enabled);
|
||||
#endif
|
||||
|
||||
//
|
||||
// CNC Coordinate Systems
|
||||
//
|
||||
@@ -1606,17 +1621,8 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
|
||||
//
|
||||
// Creality DWIN User Data
|
||||
// JyersUI DWIN User Data
|
||||
//
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
{
|
||||
_FIELD_TEST(dwin_data);
|
||||
char dwin_data[eeprom_data_size] = { 0 };
|
||||
dwinCopySettingsTo(dwin_data);
|
||||
EEPROM_WRITE(dwin_data);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
{
|
||||
_FIELD_TEST(dwin_settings);
|
||||
@@ -2599,6 +2605,13 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Adaptive Step Smoothing state
|
||||
//
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
EEPROM_READ(stepper.adaptive_step_smoothing_enabled);
|
||||
#endif
|
||||
|
||||
//
|
||||
// CNC Coordinate System
|
||||
//
|
||||
@@ -2690,16 +2703,9 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
|
||||
//
|
||||
// DWIN User Data
|
||||
// JyersUI User Data
|
||||
//
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
{
|
||||
const char dwin_data[eeprom_data_size] = { 0 };
|
||||
_FIELD_TEST(dwin_data);
|
||||
EEPROM_READ(dwin_data);
|
||||
if (!validating) dwinCopySettingsFrom(dwin_data);
|
||||
}
|
||||
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
|
||||
{
|
||||
const char dwin_settings[jyersDWIN.eeprom_data_size] = { 0 };
|
||||
_FIELD_TEST(dwin_settings);
|
||||
@@ -3544,6 +3550,13 @@ void MarlinSettings::reset() {
|
||||
DEBUG_ECHOLNPGM("Digipot Written");
|
||||
#endif
|
||||
|
||||
//
|
||||
// Adaptive Step Smoothing state
|
||||
//
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
stepper.adaptive_step_smoothing_enabled = true;
|
||||
#endif
|
||||
|
||||
//
|
||||
// CNC Coordinate System
|
||||
//
|
||||
@@ -3589,11 +3602,6 @@ void MarlinSettings::reset() {
|
||||
//
|
||||
TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings());
|
||||
|
||||
//
|
||||
// Ender-3 V2 with ProUI
|
||||
//
|
||||
TERN_(DWIN_LCD_PROUI, dwinSetDataDefaults());
|
||||
|
||||
//
|
||||
// Model predictive control
|
||||
//
|
||||
|
@@ -204,6 +204,11 @@ uint32_t Stepper::acceleration_time, Stepper::deceleration_time;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
bool Stepper::adaptive_step_smoothing_enabled; // Initialized by settings.load()
|
||||
#else
|
||||
constexpr bool Stepper::adaptive_step_smoothing_enabled; // = true
|
||||
#endif
|
||||
// Oversampling factor (log2(multiplier)) to increase temporal resolution of axis
|
||||
uint8_t Stepper::oversampling_factor;
|
||||
#else
|
||||
@@ -547,6 +552,8 @@ void Stepper::enable_axis(const AxisEnum axis) {
|
||||
default: break;
|
||||
}
|
||||
mark_axis_enabled(axis);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onAxisEnabled(ExtUI::axis_to_axis_t(axis)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -567,7 +574,8 @@ void Stepper::enable_axis(const AxisEnum axis) {
|
||||
bool Stepper::disable_axis(const AxisEnum axis) {
|
||||
mark_axis_disabled(axis);
|
||||
|
||||
TERN_(DWIN_LCD_PROUI, set_axis_untrusted(axis)); // MRISCOC workaround: https://github.com/MarlinFirmware/Marlin/issues/23095
|
||||
// This scheme prevents shared steppers being disabled. It should consider several axes at once
|
||||
// and keep a count of how many times each ENA pin has been set.
|
||||
|
||||
// If all the axes that share the enabled bit are disabled
|
||||
const bool can_disable = can_axis_disable(axis);
|
||||
@@ -577,6 +585,7 @@ bool Stepper::disable_axis(const AxisEnum axis) {
|
||||
MAIN_AXIS_MAP(_CASE_DISABLE)
|
||||
default: break;
|
||||
}
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onAxisDisabled(ExtUI::axis_to_axis_t(axis)));
|
||||
}
|
||||
|
||||
return can_disable;
|
||||
@@ -2640,7 +2649,7 @@ hal_timer_t Stepper::block_phase_isr() {
|
||||
oversampling_factor = TERN(NONLINEAR_EXTRUSION, 1, 0);
|
||||
|
||||
// Decide if axis smoothing is possible
|
||||
if (TERN1(DWIN_LCD_PROUI, hmiData.adaptiveStepSmoothing)) {
|
||||
if (stepper.adaptive_step_smoothing_enabled) {
|
||||
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...
|
||||
max_rate <<= 1; // Try to double the rate
|
||||
|
@@ -336,6 +336,12 @@ class Stepper {
|
||||
static ne_coeff_t ne;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADAPTIVE_STEP_SMOOTHING_TOGGLE)
|
||||
static bool adaptive_step_smoothing_enabled;
|
||||
#else
|
||||
static constexpr bool adaptive_step_smoothing_enabled = true;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
static block_t* current_block; // A pointer to the block currently being traced
|
||||
|
@@ -52,8 +52,6 @@
|
||||
|
||||
#if ENABLED(DWIN_CREALITY_LCD)
|
||||
#include "../lcd/e3v2/creality/dwin.h"
|
||||
#elif ENABLED(DWIN_LCD_PROUI)
|
||||
#include "../lcd/e3v2/proui/dwin.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
@@ -723,13 +721,11 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
TERN_(HAS_FAN_LOGIC, fan_update_ms = next_temp_ms + fan_update_interval_ms);
|
||||
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_STARTED));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(isbed ? PIDTEMPBED_START : PIDTEMP_START));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ischamber ? ExtUI::pidresult_t::PID_CHAMBER_STARTED : isbed ? ExtUI::pidresult_t::PID_BED_STARTED : ExtUI::pidresult_t::PID_STARTED));
|
||||
|
||||
if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, hotend_max_target(heater_id))) {
|
||||
SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_TEMP_TOO_HIGH));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TEMP_TOO_HIGH));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)));
|
||||
return;
|
||||
}
|
||||
@@ -822,8 +818,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
#endif
|
||||
if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) {
|
||||
SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH);
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_TEMP_TOO_HIGH));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TEMP_TOO_HIGH));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)));
|
||||
break;
|
||||
}
|
||||
@@ -860,8 +855,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
#endif
|
||||
if ((ms - _MIN(t1, t2)) > MIN_TO_MS(PID_AUTOTUNE_MAX_CYCLE_MINS)) {
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(PID_TUNING_TIMEOUT));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_TUNING_TIMEOUT));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_TUNING_TIMEOUT));
|
||||
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_PID_TIMEOUT)));
|
||||
SERIAL_ECHOPGM(STR_PID_AUTOTUNE); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT);
|
||||
break;
|
||||
@@ -919,8 +913,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
EXIT_M303:
|
||||
TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPIDTuningDone(oldcolor));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::result_t::PID_DONE));
|
||||
TERN_(PROUI_PID_TUNE, dwinPidTuning(AUTOTUNE_DONE));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPIDTuning(ExtUI::pidresult_t::PID_DONE));
|
||||
TERN_(TEMP_TUNING_MAINTAIN_FAN, adaptive_fan_slowing = true);
|
||||
return;
|
||||
}
|
||||
@@ -1137,7 +1130,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
// Ensure we don't drift too far from the window between the last sampled temp and the target temperature
|
||||
if (!WITHIN(current_temp, get_sample_3_temp() - 15.0f, hotend.target + 15.0f)) {
|
||||
SERIAL_ECHOLNPGM(STR_MPC_TEMPERATURE_ERROR);
|
||||
TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_TEMP_ERROR));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_TEMP_ERROR));
|
||||
wait_for_heatup = false;
|
||||
return FAILED;
|
||||
}
|
||||
@@ -1175,7 +1168,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
if (!wait_for_heatup) {
|
||||
SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_INTERRUPTED);
|
||||
TERN_(DWIN_LCD_PROUI, dwinMPCTuning(MPC_INTERRUPTED));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_INTERRUPTED));
|
||||
return MeasurementState::CANCELLED;
|
||||
}
|
||||
|
||||
@@ -1202,12 +1195,8 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
|
||||
// Determine ambient temperature.
|
||||
SERIAL_ECHOLNPGM(STR_MPC_COOLING_TO_AMBIENT);
|
||||
#if ENABLED(DWIN_LCD_PROUI)
|
||||
dwinMPCTuning(MPCTEMP_START);
|
||||
LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT);
|
||||
#else
|
||||
LCD_MESSAGE(MSG_COOLING);
|
||||
#endif
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPCTEMP_START));
|
||||
TERN(DWIN_LCD_PROUI, LCD_ALERTMESSAGE(MSG_MPC_COOLING_TO_AMBIENT), LCD_MESSAGE(MSG_COOLING));
|
||||
|
||||
if (tuner.measure_ambient_temp() != MPC_autotuner::MeasurementState::SUCCESS) return;
|
||||
hotend.modeled_ambient_temp = tuner.get_ambient_temp();
|
||||
@@ -1293,7 +1282,7 @@ volatile bool Temperature::raw_temps_ready = false;
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPGM(STR_MPC_AUTOTUNE_FINISHED);
|
||||
TERN_(DWIN_LCD_PROUI, dwinMPCTuning(AUTOTUNE_DONE));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMPCTuning(ExtUI::mpcresult_t::MPC_DONE));
|
||||
|
||||
SERIAL_ECHOLNPGM("MPC_BLOCK_HEAT_CAPACITY ", mpc.block_heat_capacity);
|
||||
SERIAL_ECHOLNPGM("MPC_SENSOR_RESPONSIVENESS ", p_float_t(mpc.sensor_responsiveness, 4));
|
||||
@@ -1532,15 +1521,17 @@ void Temperature::_temp_error(
|
||||
}
|
||||
|
||||
void Temperature::maxtemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) {
|
||||
#if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED)
|
||||
dwinPopupTemperature(1);
|
||||
#if HAS_HOTEND || HAS_HEATED_BED
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(1));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMaxTempError(heater_id));
|
||||
#endif
|
||||
_TEMP_ERROR(heater_id, F(STR_T_MAXTEMP), MSG_ERR_MAXTEMP, deg);
|
||||
}
|
||||
|
||||
void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_TEMP, const celsius_float_t deg)) {
|
||||
#if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED)
|
||||
dwinPopupTemperature(0);
|
||||
#if HAS_HOTEND || HAS_HEATED_BED
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMinTempError(heater_id));
|
||||
#endif
|
||||
_TEMP_ERROR(heater_id, F(STR_T_MINTEMP), MSG_ERR_MINTEMP, deg);
|
||||
}
|
||||
@@ -1765,7 +1756,8 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T
|
||||
if (watch_hotend[e].check(temp)) // Increased enough?
|
||||
start_watching_hotend(e); // If temp reached, turn off elapsed check
|
||||
else {
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0));
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(e));
|
||||
_TEMP_ERROR(e, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, temp);
|
||||
}
|
||||
}
|
||||
@@ -1795,7 +1787,8 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T
|
||||
if (watch_bed.check(deg)) // Increased enough?
|
||||
start_watching_bed(); // If temp reached, turn off elapsed check
|
||||
else {
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0));
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(H_BED));
|
||||
_TEMP_ERROR(H_BED, FPSTR(str_t_heating_failed), MSG_ERR_HEATING_FAILED, deg);
|
||||
}
|
||||
}
|
||||
@@ -3247,13 +3240,15 @@ void Temperature::init() {
|
||||
} // fall through
|
||||
|
||||
case TRRunaway:
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0));
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id));
|
||||
_TEMP_ERROR(heater_id, FPSTR(str_t_thermal_runaway), MSG_ERR_THERMAL_RUNAWAY, current);
|
||||
break;
|
||||
|
||||
#if ENABLED(THERMAL_PROTECTION_VARIANCE_MONITOR)
|
||||
case TRMalfunction:
|
||||
TERN_(HAS_DWIN_E3V2_BASIC, dwinPopupTemperature(0));
|
||||
TERN_(DWIN_CREALITY_LCD, dwinPopupTemperature(0));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onHeatingError(heater_id));
|
||||
_TEMP_ERROR(heater_id, F(STR_T_THERMAL_MALFUNCTION), MSG_ERR_TEMP_MALFUNCTION, current);
|
||||
break;
|
||||
#endif
|
||||
|
@@ -76,23 +76,19 @@ class DWIN_ICO_File():
|
||||
self._parseHeader(infile)
|
||||
self._splitEntryData(infile, outDir)
|
||||
|
||||
return
|
||||
|
||||
def _parseHeader(self, infile):
|
||||
maxEntries = 256
|
||||
count = 0
|
||||
validEntries = 0
|
||||
icon_nums = _iconNames.keys()
|
||||
while count < maxEntries:
|
||||
rawBytes = infile.read(16)
|
||||
entry = Entry()
|
||||
entry.parseRawData(rawBytes)
|
||||
# check that it is valid: is offset nonzero?
|
||||
# Special case: treat 39 as valid
|
||||
if (entry.offset > 0) or (count == 39):
|
||||
validEntries += 1
|
||||
# Special case: treat missing numbers as valid
|
||||
if (entry.offset > 0) or count not in icon_nums:
|
||||
self.entries.append(entry)
|
||||
count += 1
|
||||
return
|
||||
|
||||
def _splitEntryData(self, infile, outDir):
|
||||
print('Splitting Entry Data...')
|
||||
@@ -110,18 +106,16 @@ class DWIN_ICO_File():
|
||||
if entry.length == 0:
|
||||
count += 1
|
||||
continue
|
||||
# Seek file position, read length bytes, and write to new output file.
|
||||
print('%02d: offset: 0x%06x len: 0x%04x width: %d height: %d' %
|
||||
(count, entry.offset, entry.length, entry.width, entry.height))
|
||||
outfilename = os.path.join(outDir, '%03d-ICON_%s.jpg' % (count, _iconNames7[count]))
|
||||
outfilename = os.path.join(outDir, '%03d-ICON_%s.jpg' % (count, _iconNames.get(count, "UNKNOWN")))
|
||||
with open(outfilename, 'wb') as outfile:
|
||||
infile.seek(entry.offset)
|
||||
blob = infile.read(entry.length)
|
||||
outfile.write(blob)
|
||||
print('Wrote %d bytes to %s' % (entry.length, outfilename))
|
||||
# Seek file position, read length bytes, and write to new output file.
|
||||
print('(%3d: width=%3d height=%3d offset=%6d len=%4d) ... %s' %
|
||||
(count, entry.width, entry.height, entry.offset, entry.length, os.path.basename(outfilename)))
|
||||
|
||||
count += 1
|
||||
return
|
||||
|
||||
def createFile(self, iconDir, filename):
|
||||
'''Create a new .ico file from the contents of iconDir.
|
||||
@@ -179,7 +173,6 @@ class DWIN_ICO_File():
|
||||
offset += e.length
|
||||
#print('%03d: (%d x %d) len=%d off=%d' %
|
||||
# (i, e.width, e.height, e.length, e.offset))
|
||||
return
|
||||
|
||||
def _combineAndWriteIcoFile(self, filename):
|
||||
"""Write out final .ico file.
|
||||
@@ -198,7 +191,6 @@ class DWIN_ICO_File():
|
||||
if 0 == e.length: continue
|
||||
guts = self._getFileContents(e.filename, e.length)
|
||||
outfile.write(guts)
|
||||
return
|
||||
|
||||
def _getFileContents(self, filename, length):
|
||||
"""Read contents of filename, and return bytes"""
|
||||
@@ -232,7 +224,6 @@ class Entry():
|
||||
self.height = h
|
||||
self.offset = off
|
||||
self.length = len3 * 65536 + len21
|
||||
return
|
||||
|
||||
def serialize(self):
|
||||
"""Convert this Entry's information into a 16-byte
|
||||
@@ -245,7 +236,7 @@ class Entry():
|
||||
0, 0, 0, 0, 0)
|
||||
return rawdata
|
||||
|
||||
_iconNames7 = {
|
||||
_iconNames = {
|
||||
0 : "LOGO_Creality",
|
||||
1 : "Print_0",
|
||||
2 : "Print_1",
|
||||
@@ -337,5 +328,20 @@ _iconNames7 = {
|
||||
88 : "Confirm_C",
|
||||
89 : "Confirm_E",
|
||||
90 : "Info_0",
|
||||
91 : "Info_1"
|
||||
91 : "Info_1",
|
||||
92 : "DegreesC",
|
||||
93 : "Printer_0",
|
||||
200 : "Checkbox_F",
|
||||
201 : "Checkbox_T",
|
||||
202 : "Fade",
|
||||
203 : "Mesh",
|
||||
204 : "Tilt",
|
||||
205 : "Brightness",
|
||||
206 : "Probe",
|
||||
249 : "AxisD",
|
||||
250 : "AxisBR",
|
||||
251 : "AxisTR",
|
||||
252 : "AxisBL",
|
||||
253 : "AxisTL",
|
||||
254 : "AxisC"
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ Tools for processing `.ICO` files used by DWIN displays.
|
||||
|
||||
## Introduction
|
||||
|
||||
The DWIN LCDs that come with the Creality Ender-3 v2 and other 3D printers contain image and container files stored on them which are used to draw various the UI elements.
|
||||
The DWIN LCDs that come with the Creality Ender-3 V2 and other 3D printers contain image and container files stored on them which are used to draw various the UI elements.
|
||||
|
||||
Standard `.JPG` files can be installed for things like the boot screen, and `.ICO` files can contain several images within a structured file format.
|
||||
|
||||
@@ -48,9 +48,11 @@ Pillow is most easily installed with pip:
|
||||
|
||||
These tools process an `.ICO` file that you specify. The safest method is to create a folder and copy your `.ICO` file there. For example:
|
||||
|
||||
```
|
||||
$ mkdir hackicons
|
||||
$ cp 9.ICO hackicons
|
||||
$ cp 7.ICO hackicons
|
||||
$ cd hackicons
|
||||
```
|
||||
|
||||
The following explanations will refer back to this layout.
|
||||
|
||||
@@ -58,35 +60,68 @@ The following explanations will refer back to this layout.
|
||||
|
||||
If you want to edit the individual icons stored in an ICO file (or add more images) you'll first need to extract all the images from the archive using `splitIco.py`.
|
||||
|
||||
**Usage:** `splitIco.py #.ICO foldername`.
|
||||
#### Usage:
|
||||
```
|
||||
splitIco.py #.ICO foldername
|
||||
```
|
||||
|
||||
**Example:**
|
||||
#### Splitting .ICO FIle In Windows:
|
||||
- Create `Split-ICO.bat` file in this folder with the following code:
|
||||
- `for /f %%f in ('dir *.ICO /B /O:-D') do splitico.py %%f %%f-icons`
|
||||
- Paste `.ICO` file into this folder
|
||||
- Run `Split-ICO.bat`
|
||||
- A new folder should appear containing all icons
|
||||
|
||||
In this example we're extracting the constituent JPEG files from `9.ICO` and storing them in a folder named `icons`. As each file is extracted the script reports its index number, byte offset, size, dimensions, and filename:
|
||||
#### Example:
|
||||
|
||||
In this example we're extracting the constituent JPEG files from `7.ICO` and storing them in a folder named `icons-7`. As each file is extracted the script reports its index number, byte offset, size, dimensions, and filename:
|
||||
|
||||
```
|
||||
$ cd buildroot/share/dwin
|
||||
$ ./bin/splitIco.py 9.ICO icons-9
|
||||
Splitting 9.ICO into dir icons
|
||||
$ ./bin/splitIco.py 7.ICO icons-7
|
||||
Splitting 7.ICO into dir icons-7
|
||||
Splitting Entry Data...
|
||||
00: offset: 0x001000 len: 0x10a2 width: 130 height: 17
|
||||
Wrote 4258 bytes to icons/000-ICON_LOGO.jpg
|
||||
Wrote 4258 bytes to icons-7/000-ICON_LOGO.jpg
|
||||
01: offset: 0x0020a2 len: 0x0eac width: 110 height: 100
|
||||
Wrote 3756 bytes to icons/001-ICON_Print_0.jpg
|
||||
Wrote 3756 bytes to icons-7/001-ICON_Print_0.jpg
|
||||
02: offset: 0x002f4e len: 0x0eaa width: 110 height: 100
|
||||
Wrote 3754 bytes to icons/002-ICON_Print_1.jpg
|
||||
Wrote 3754 bytes to icons-7/002-ICON_Print_1.jpg
|
||||
...
|
||||
91: offset: 0x0345fc len: 0x0d89 width: 110 height: 100
|
||||
Wrote 3465 bytes to icons/091-ICON_Info_1.jpg
|
||||
Wrote 3465 bytes to icons-7/091-ICON_Info_1.jpg
|
||||
```
|
||||
|
||||
Once the individual JPEG files have been saved they can be edited using common graphics applications like Photoshop. JPEG files are inherently lossy and will usually contain ugly artifacts, so cleanup may be needed before they are re-exported. Keep the limits of bank size in mind when exporting images and try to find the best balance between compressed size and image quality.
|
||||
|
||||
### `makeIco.py` - Combine JPEGs into `ICO` archive
|
||||
|
||||
After editing images you'll create a new `9.ICO` archive with `makeIco.py` like so:
|
||||
If you want to create an ICO file you'll need to use `makeIco.py`.
|
||||
|
||||
#### Usage:
|
||||
```
|
||||
makeIco.py foldername #.ICO
|
||||
```
|
||||
|
||||
#### Making .ICO FIle In Windows:
|
||||
- Create `Make-ICO.bat` file in this folder with the following code:
|
||||
- ```
|
||||
setlocal enabledelayedexpansion
|
||||
for /f %%f in ('dir *-icons /B /O:-D') do set f=%%f & makeico.py %%f !f:~0,-7!
|
||||
```
|
||||
- Paste folder containing all icons into this folder
|
||||
- Run `Make-ICO.bat`
|
||||
- A new `.ICO` file should appear
|
||||
|
||||
#### Example:
|
||||
|
||||
After editing images you'll create a new `7.ICO` archive with `makeIco.py` like so:
|
||||
|
||||
```
|
||||
$ cd buildroot/share/dwin
|
||||
$ ./bin/makeIco.py icons-3 3.ICO
|
||||
Making .ico file '3.ICO' from contents of 'icons-3'
|
||||
Scanning icon directory icons-3
|
||||
$ ./bin/makeIco.py icons-7 7.ICO
|
||||
Making .ico file '7.ICO' from contents of 'icons-7'
|
||||
Scanning icon directory icons-7
|
||||
...Scanned 16 icon files
|
||||
Scanning done. 16 icons included.
|
||||
```
|
||||
|
BIN
buildroot/share/dwin/icons-4/016-ICON_Bedline.jpg
Normal file
After Width: | Height: | Size: 748 B |
BIN
buildroot/share/dwin/icons-4/017-ICON_BedLeveledOff.jpg
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
buildroot/share/dwin/icons-4/018-ICON_BedLeveledOn.jpg
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |