Updates for mesh edit

This commit is contained in:
InsanityAutomation
2021-06-19 14:04:42 -04:00
parent 6a98f4e1be
commit 671ab75bce
3 changed files with 58 additions and 13 deletions
+14 -11
View File
@@ -480,7 +480,7 @@
#endif
#if ANY(MachineCRXPro, MachineEnder5Plus, MachineCR10SPro, MachineCR10Max, MachineEnder6)
#if NONE(GraphicLCD, OrigLCD)
#if NONE(GraphicLCD, OrigLCD, FORCE10SPRODISPLAY)
#define FORCE10SPRODISPLAY
#endif
#endif
@@ -530,7 +530,7 @@
#define HotendStock
#endif
#if ANY(ABL_EZABL, ABL_NCSW, ABL_BLTOUCH, ABL_TOUCH_MI) && NONE(ABL_UBL, ABL_BI)
#if NONE(ABL_UBL, ABL_BI, FORCE10SPRODISPLAY)
#define ABL_BI
#endif
@@ -2128,10 +2128,10 @@
#if ENABLED(PROBE_TARE)
#define PROBE_TARE_TIME 200 // (ms) Time to hold tare pin
#define PROBE_TARE_DELAY 200 // (ms) Delay after tare before
#define PROBE_TARE_STATE LOW // State to write pin for tare
#define PROBE_TARE_STATE HIGH // State to write pin for tare
//#define PROBE_TARE_PIN PA5 // Override default pin
#if ENABLED(PROBE_ACTIVATION_SWITCH)
#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
//#define PROBE_TARE_ONLY_WHILE_INACTIVE // Fail to tare/probe if PROBE_ACTIVATION_SWITCH is active
#endif
#endif
@@ -2168,8 +2168,13 @@
#else
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
#endif
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
#if ANY(MachineCR6, MachineCR6Max)
#define Z_CLEARANCE_BETWEEN_PROBES 3 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 3 // Z Clearance between multiple probes
#else
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
#endif
#if DISABLED(TOUCH_MI_PROBE)
#define Z_AFTER_PROBING 5 // Z position after probing is done
#endif
@@ -2698,15 +2703,13 @@
*/
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
#if ANY(ABL_EZABL, ABL_BLTOUCH, ABL_NCSW, ABL_TOUCH_MI, NOZZLE_AS_PROBE)
#if ENABLED(ABL_UBL)
#define AUTO_BED_LEVELING_UBL
#elif ENABLED(ABL_BI)
#elif BOTH(PROBE_MANUALLY, FORCE10SPRODISPLAY)
#define MESH_BED_LEVELING
#elif !BOTH(OrigLA, MachineCR10Orig)
#define AUTO_BED_LEVELING_BILINEAR
#endif
#elif !BOTH(OrigLA, MachineCR10Orig)
#define MESH_BED_LEVELING
#endif
/**
* Normally G28 leaves leveling disabled on completion. Enable one of
* these options to restore the prior leveling state or to always enable
+1 -1
View File
@@ -1929,7 +1929,7 @@
#endif
#endif
#if NONE(ABL_EZABL, ABL_NCSW, ABL_BLTOUCH, ABL_TOUCH_MI, MachineCR6, MachineCR6Max)
#if NONE(ABL_EZABL, ABL_NCSW, ABL_BLTOUCH, ABL_TOUCH_MI, MachineCR6, MachineCR6Max, PROBE_MANUALLY)
#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
#else
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
@@ -725,6 +725,8 @@ void RTSSHOW::RTS_HandleData()
Checkkey = DisplayStandbyBrightness;
if(recdat.addr == DisplayStandbySeconds)
Checkkey = DisplayStandbySeconds;
if(recdat.addr >= AutolevelVal && recdat.addr <= (AutolevelVal+(GRID_MAX_POINTS_X*GRID_MAX_POINTS_Y*2)))
Checkkey = AutolevelVal;
if (recdat.addr >= SDFILE_ADDR && recdat.addr <= (SDFILE_ADDR + 10 * (FileNum + 1)))
Checkkey = Filename;
@@ -900,7 +902,6 @@ void RTSSHOW::RTS_HandleData()
{
tmp_zprobe_offset = ((float)recdat.data[0]) / 100;
}
tmp_zprobe_offset = tmp_zprobe_offset; //Invert sign here so it follows below
SERIAL_ECHOLNPAIR("Requested Offset ", tmp_zprobe_offset);
if (WITHIN((tmp_zprobe_offset), Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX))
{
@@ -1103,6 +1104,23 @@ void RTSSHOW::RTS_HandleData()
RTS_SndData(3, AutoLevelIcon);
else
RTS_SndData(2, AutoLevelIcon);
if (ExtUI::getMeshValid())
{
uint8_t abl_probe_index = 0;
for(uint8_t outer = 0; outer < GRID_MAX_POINTS_Y; outer++)
{
for (uint8_t inner = 0; inner < GRID_MAX_POINTS_X; inner++)
{
uint8_t x_Point = inner;
bool zig = (outer & 1);
if (zig) x_Point = (GRID_MAX_POINTS_X - 1) - inner;
xy_uint8_t point = {x_Point, outer};
rtscheck.RTS_SndData(ExtUI::getMeshPoint(point) * 1000, AutolevelVal + (abl_probe_index * 2));
++abl_probe_index;
}
}
}
#endif
RTS_SndData(10, FilenameIcon); //Motor Icon
if (!isPositionKnown())
@@ -1793,6 +1811,30 @@ void RTSSHOW::RTS_HandleData()
break;
}
case AutolevelVal:
{
uint8_t meshPoint = (recdat.addr - AutolevelVal) / 2;
uint8_t yPnt = floor(meshPoint / GRID_MAX_POINTS_X);
uint8_t xPnt = meshPoint - (xPnt*GRID_MAX_POINTS_X);
float meshVal;
SERIAL_ECHOLNPAIR("meshPoint ", meshPoint);
SERIAL_ECHOLNPAIR("xPnt ", xPnt);
SERIAL_ECHOLNPAIR("yPnt ", yPnt);
if (recdat.data[0] >= 32768)
meshVal = ((float)recdat.data[0] - 65536) / 1000;
else
meshVal = ((float)recdat.data[0]) / 1000;
SERIAL_ECHOLNPAIR("meshVal ", meshVal);
meshVal = constrain(meshVal, Z_PROBE_LOW_POINT, Z_CLEARANCE_BETWEEN_PROBES);
SERIAL_ECHOLNPAIR("Constrain meshVal ", meshVal);
xy_uint8_t point = {xPnt, yPnt};
setMeshPoint(point, meshVal);
rtscheck.RTS_SndData((meshVal*1000), recdat.addr);
break;
}
default:
SERIAL_ECHOLNPGM_P(PSTR("No Match :"));
break;