Skip to content

Commit

Permalink
Update - Fix Mesh Inset + Print Size Issue X3 Max 400 (#195)
Browse files Browse the repository at this point in the history
* small fixes, settings.cpp revert w/ 2024-April
  • Loading branch information
classicrocker883 authored Jan 29, 2025
1 parent 049314e commit 3b3335e
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 260 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/compile-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
Build-Default-A: # Default for Aquila
name: Build Default Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-A: # MM EX for Aquila
name: Build MM EX Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-A: # UBL EX for Aquila
name: Build UBL EX Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-T5-A: # UBL EX T5 Speedy for Aquila
name: Build UBL EX T5 Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-IND-A: # UBL EX IND for Aquila X3/S2
name: Build UBL EX IND Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -464,7 +464,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-IND-T5-A: # UBL EX IND T5 Speedy for Aquila X3/S2
name: Build UBL EX IND T5 Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -552,7 +552,7 @@ jobs:
asset_content_type: application/x-binary
Build-BLT-EX-A: # BLT EX for Aquila
name: Build BLT EX Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [GD32,N32]
Expand Down Expand Up @@ -651,7 +651,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-SKR-A: # UBL EX for Aquila, SKR Mini
name: Build UBL EX SKR Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [V3_0,V2_0,V3_0_1]
Expand Down Expand Up @@ -747,7 +747,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-SKR-A: # MM EX for Aquila, SKR Mini
name: Build MM EX SKR Files A
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [V3_0,V2_0,V3_0_1]
Expand Down Expand Up @@ -832,7 +832,7 @@ jobs:
asset_content_type: application/x-binary
Build-Default-A4: # Default for Aquila 427
name: Build Default Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -914,7 +914,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-A4: # MM EX for Aquila 427
name: Build MM EX Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -996,7 +996,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-A4: # UBL EX for Aquila 427
name: Build UBL EX Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -1094,7 +1094,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-T5-A4: # UBL EX T5 Speedy for Aquila 427
name: Build UBL EX T5 Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -1187,7 +1187,7 @@ jobs:
asset_content_type: application/x-binary
Build-BLT-EX-A4: # BLT EX for Aquila 427
name: Build BLT EX Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -1279,7 +1279,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-IND-A4: # UBL EX for Aquila X3/S2 427
name: Build UBL EX IND Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -1353,7 +1353,7 @@ jobs:
asset_content_type: application/x-binary
Build-LCD-Probe-A4: # CR10 LCD w/Probe for Aquila 427
name: Build LCD Probe Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -1453,7 +1453,7 @@ jobs:
asset_content_type: application/x-binary
Build-LCD-Default-MM-A4: # CR10 LCD Default/MM for Aquila 427
name: Build LCD Default/MM Files A4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/compile-configs_Ender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
Build-Default-E: # Default for Ender-3
name: Build Default Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-E: # MM EX for Ender-3
name: Build MM EX Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-E: # UBL EX for Ender-3
name: Build UBL EX Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-T5-E: # UBL EX T5 Speedy for Ender-3
name: Build UBL EX T5 Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -345,7 +345,7 @@ jobs:
asset_content_type: application/x-binary
Build-S1-UBL-EX-E: # UBL EX for Ender-3S1
name: Build S1 UBL EX Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [F4,F1]
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
asset_content_type: application/x-binary
Build-BLT-EX-E: # BLT EX for Ender-3
name: Build BLT EX Files E
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -514,7 +514,7 @@ jobs:
asset_content_type: application/x-binary
Build-Default-E4: # Default for Ender-3
name: Build Default Files E4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -595,7 +595,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-E4: # MM EX for Ender-3
name: Build MM EX Files E4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -676,7 +676,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-E4: # UBL EX for Ender-3
name: Build UBL EX Files E4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -773,7 +773,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-T5-E4: # UBL EX T5 Speedy for Ender-3
name: Build UBL EX T5 Files E4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -865,7 +865,7 @@ jobs:
asset_content_type: application/x-binary
Build-BLT-EX-E4: # BLT EX for Ender-3
name: Build BLT EX Files E4
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
chip: [427,422]
Expand Down Expand Up @@ -956,7 +956,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-E3-FREE-RUNS: # UBL EX for Ender-3 E3 Free-runs
name: Build UBL EX E3 Free-runs Files
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -1049,7 +1049,7 @@ jobs:
asset_content_type: application/x-binary
Build-UBL-EX-T5-E3-FREE-RUNS: # UBL EX T5 Speedy for Ender-3 E3 Free-runs
name: Build UBL EX T5 E3 Free-runs Files
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down Expand Up @@ -1137,7 +1137,7 @@ jobs:
asset_content_type: application/x-binary
Build-MM-EX-E3-FREE-RUNS: # MM EX for Ender-3 E3 Free-runs
name: Build MM EX E3 Free-runs Files
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
temp: [true,false]
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,7 @@
#define HS_MENU_ITEM // BLTOUCH_HS_MODE menu option (56 bytes of flash)
#endif
#define PROUI_ITEM_PLOT // Temp Plot Graph item in Tune/Prepare Menu (688 bytes of flash)
#define PROUI_ITEM_PLR // Power-loss Recovery option in Tune Menu (POWER_LOSS_RECOVERY 3400 bytes of flash)
//#define PROUI_ITEM_PLR // Power-loss Recovery option in Tune Menu (POWER_LOSS_RECOVERY 3400 bytes of flash)
//#define PROUI_ITEM_JD // Juntion Deviation item in Tune Menu (only if JD is enabled)
#define PROUI_ITEM_ADVK // Linear Advance item in Tune Menu (only if LA is enabled)
#define SHOW_REAL_POS
Expand Down
7 changes: 0 additions & 7 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@
#define STRING_DISTRIBUTION_DATE __DATE__
#define STRING_DISTRIBUTION_TIME __TIME__

/**
* The protocol for communication to the host. Protocol indicates communication
* standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
* (Other behaviors are given by the firmware version and capabilities report.)
*/
//#define PROTOCOL_VERSION "1.0"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/bedlevel/ubl/ubl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ static void serial_echo_column_labels(const uint8_t sp) {
void unified_bed_leveling::display_map(const uint8_t map_type) {
const bool was = gcode.set_autoreport_paused(true);

constexpr uint8_t eachsp = 1 + 6 + 1; // [-3.567]
IF_DISABLED(DWIN_LCD_PROUI, constexpr) uint8_t twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each
IF_DISABLED(DWIN_LCD_PROUI, constexpr) uint8_t eachsp = 1 + 6 + 1, // [-3.567]
twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each

const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4;

Expand Down
5 changes: 4 additions & 1 deletion Marlin/src/feature/bedlevel/ubl/ubl.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,10 @@ class unified_bed_leveling {

static constexpr float get_z_offset() { return 0.0f; }

#if ENABLED(PROUI_MESH_EDIT)
#if ALL(PROUI_EX, PROUI_MESH_EDIT)
static float get_mesh_x(const uint8_t i);
static float get_mesh_y(const uint8_t j);
#elif ENABLED(PROUI_MESH_EDIT)
static float get_mesh_x(const uint8_t i) {
return MESH_MIN_X + i * (MESH_X_DIST);
}
Expand Down
36 changes: 24 additions & 12 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,10 @@ void DWIN_SetDataDefaults() {
PRO_data.z_max_pos = DEF_Z_MAX_POS;
#if HAS_MESH
PRO_data.grid_max_points = DEF_GRID_MAX_POINTS;
PRO_data.mesh_min_x = DEF_MESH_MIN_X;
PRO_data.mesh_max_x = DEF_MESH_MAX_X;
PRO_data.mesh_min_y = DEF_MESH_MIN_Y;
PRO_data.mesh_max_y = DEF_MESH_MAX_Y;
#endif
#if HAS_BED_PROBE
PRO_data.zprobefeedslow = DEF_Z_PROBE_FEEDRATE_SLOW;
Expand Down Expand Up @@ -2186,9 +2190,9 @@ void DWIN_CopySettingsTo(char * const buff) {
void DWIN_CopySettingsFrom(PGM_P const buff) {
DEBUG_ECHOLNPGM("DWIN_CopySettingsFrom");
memcpy(&HMI_data, buff, sizeof(HMI_data_t));
TERN_(PROUI_EX, memcpy(&PRO_data, buff + sizeof(HMI_data_t), sizeof(PRO_data_t));)
#if PROUI_EX
ProEx.SetData();
memcpy(&PRO_data, buff + sizeof(HMI_data_t), sizeof(PRO_data_t));
ProEx.LoadSettings();
#elif ENABLED(MESH_BED_LEVELING)
SetData();
#endif
Expand Down Expand Up @@ -4394,15 +4398,23 @@ void Draw_MaxAccel_Menu() {
void ResetMesh() { Goto_Popup(Popup_ResetMesh, OnClick_ResetMesh); }

// Mesh Inset
#if PROUI_EX
void SetMeshArea() {
PRO_data.mesh_min_x = meshSet.mesh_min_x;
PRO_data.mesh_max_x = meshSet.mesh_max_x;
PRO_data.mesh_min_y = meshSet.mesh_min_y;
PRO_data.mesh_max_y = meshSet.mesh_max_y;
}
#endif
void ResetMeshInset() { set_bed_leveling_enabled(false); OPTCODE(MESH_BED_LEVELING, bedlevel.initialize()) reset_bed_level(); }
void ApplyMeshInset() { ResetMeshInset(); ReDrawItem(); }
void SetXMeshInset() { SetPFloatOnClick(0, X_BED_SIZE, UNITFDIGITS, ApplyMeshInset); }
void SetYMeshInset() { SetPFloatOnClick(0, Y_BED_SIZE, UNITFDIGITS, ApplyMeshInset); }
void SetXMeshInset() { SetPFloatOnClick(0, X_BED_SIZE, UNITFDIGITS, OPTITEM(PROUI_EX, SetMeshArea) ApplyMeshInset); }
void SetYMeshInset() { SetPFloatOnClick(0, Y_BED_SIZE, UNITFDIGITS, OPTITEM(PROUI_EX, SetMeshArea) ApplyMeshInset); }
void MaxMeshArea() {
meshSet.mesh_min_x = 0;
meshSet.mesh_max_x = X_BED_SIZE;
meshSet.mesh_min_y = 0;
meshSet.mesh_max_y = Y_BED_SIZE;
TERN_(PROUI_EX, PRO_data.mesh_min_x =) meshSet.mesh_min_x = 0;
TERN_(PROUI_EX, PRO_data.mesh_max_x =) meshSet.mesh_max_x = X_BED_SIZE;
TERN_(PROUI_EX, PRO_data.mesh_min_y =) meshSet.mesh_min_y = 0;
TERN_(PROUI_EX, PRO_data.mesh_max_y =) meshSet.mesh_max_y = Y_BED_SIZE;
ResetMeshInset();
ReDrawMenu();
}
Expand All @@ -4411,10 +4423,10 @@ void Draw_MaxAccel_Menu() {
if (max < X_BED_SIZE - MESH_MAX_X) { max = X_BED_SIZE - MESH_MAX_X; }
if (max < MESH_MIN_Y) { max = MESH_MIN_Y; }
if (max < Y_BED_SIZE - MESH_MAX_Y) { max = Y_BED_SIZE - MESH_MAX_Y; }
meshSet.mesh_min_x = max;
meshSet.mesh_max_x = X_BED_SIZE - max;
meshSet.mesh_min_y = max;
meshSet.mesh_max_y = Y_BED_SIZE - max;
TERN_(PROUI_EX, PRO_data.mesh_min_x =) meshSet.mesh_min_x = max;
TERN_(PROUI_EX, PRO_data.mesh_max_x =) meshSet.mesh_max_x = X_BED_SIZE - max;
TERN_(PROUI_EX, PRO_data.mesh_min_y =) meshSet.mesh_min_y = max;
TERN_(PROUI_EX, PRO_data.mesh_max_y =) meshSet.mesh_max_y = Y_BED_SIZE - max;
ResetMeshInset();
ReDrawMenu();
}
Expand Down
Loading

0 comments on commit 3b3335e

Please sign in to comment.