Added a probe quality check.

master
Marcio Teixeira 7 years ago
parent 633a7b1971
commit 49644d6e2f

@ -13,7 +13,7 @@
* got disabled.
*/
#define LULZBOT_FW_VERSION ".34" // Change this with each update
#define LULZBOT_FW_VERSION ".36" // Change this with each update
#if ( \
!defined(LULZBOT_Gladiola_Mini) && \
@ -122,6 +122,7 @@
#define LULZBOT_UUID "e5502411-d46d-421d-ba3a-a20126d7930f"
#define LULZBOT_LIGHTWEIGHT_UI
#define LULZBOT_USE_EXPERIMENTAL_FEATURES
#define LULZBOT_BED_LEVELING_DEBUG
#endif
#if defined(LULZBOT_Hibiscus_Mini2_CLCD)
@ -1680,6 +1681,24 @@
#define LULZBOT_G29_WITH_RETRY_IMPL
#endif
/******************************** PROBE QUALITY CHECK *************************/
#if defined(LULZBOT_BED_LEVELING_DEBUG)
#define LULZBOT_BED_LEVELING_DECL vector_3 bp[4];
#define LULZBOT_BED_LEVELING_POINT(i,x,y,z) bp[i] = vector_3(x,y,z);
#define LULZBOT_BED_LEVELING_SUMMARY \
{ \
vector_3 norm = vector_3::cross(bp[0]-bp[1],bp[1]-bp[2]); \
float a = norm.x, b = norm.y, c = norm.z, d = -bp[0].x*a -bp[0].y*b -bp[0].z*c; \
float dist = abs(a * bp[3].x + b * bp[3].y + c * bp[3].z + d)/sqrt( a*a + b*b + c*c ); \
SERIAL_PROTOCOLLNPAIR("4th probe point, distance from plane: ", dist); \
}
#else
#define LULZBOT_BED_LEVELING_DECL
#define LULZBOT_BED_LEVELING_POINT(i,x,y,z)
#define LULZBOT_BED_LEVELING_SUMMARY
#endif
/******************************** MOTOR CURRENTS *******************************/
// Values for XYZ vary by printer model, values for E vary by toolhead.

@ -362,6 +362,7 @@
LULZBOT_EXECUTE_IMMEDIATE_DECL
LULZBOT_G29_WITH_RETRY_DECL
LULZBOT_BED_LEVELING_DECL
bool Running = true;
@ -5078,6 +5079,8 @@ void home_all_axes() { gcode_G28(true); }
incremental_LSF(&lsf_results, xProbe, yProbe, measured_z);
LULZBOT_BED_LEVELING_POINT(abl_probe_index, xProbe, yProbe, measured_z)
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
z_values[xCount][yCount] = measured_z + zoffset;
@ -5184,6 +5187,8 @@ void home_all_axes() { gcode_G28(true); }
mean /= abl2;
LULZBOT_BED_LEVELING_SUMMARY
if (verbose_level) {
SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
SERIAL_PROTOCOL_F(plane_equation_coefficients[0], 8);

Loading…
Cancel
Save