Tramming Wizard submenu option (#20000)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Speaka
2020-11-07 10:20:27 +01:00
committed by GitHub
parent 2fdeceda58
commit 6954772ece
9 changed files with 184 additions and 19 deletions

View File

@ -36,19 +36,23 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../../core/debug_out.h"
constexpr xy_pos_t screws_tilt_adjust_pos[] = TRAMMING_POINT_XY;
//
// Define tramming point names.
//
static PGMSTR(point_name_1, TRAMMING_POINT_NAME_1);
static PGMSTR(point_name_2, TRAMMING_POINT_NAME_2);
static PGMSTR(point_name_3, TRAMMING_POINT_NAME_3);
#include "../../feature/tramming.h" // Validate
PGMSTR(point_name_1, TRAMMING_POINT_NAME_1);
PGMSTR(point_name_2, TRAMMING_POINT_NAME_2);
PGMSTR(point_name_3, TRAMMING_POINT_NAME_3);
#ifdef TRAMMING_POINT_NAME_4
static PGMSTR(point_name_4, TRAMMING_POINT_NAME_4);
PGMSTR(point_name_4, TRAMMING_POINT_NAME_4);
#ifdef TRAMMING_POINT_NAME_5
static PGMSTR(point_name_5, TRAMMING_POINT_NAME_5);
PGMSTR(point_name_5, TRAMMING_POINT_NAME_5);
#endif
#endif
static PGM_P const tramming_point_name[] PROGMEM = {
PGM_P const tramming_point_name[] PROGMEM = {
point_name_1, point_name_2, point_name_3
#ifdef TRAMMING_POINT_NAME_4
, point_name_4
@ -58,14 +62,6 @@ static PGM_P const tramming_point_name[] PROGMEM = {
#endif
};
#define G35_PROBE_COUNT COUNT(screws_tilt_adjust_pos)
#if !WITHIN(TRAMMING_SCREW_THREAD, 30, 51) || TRAMMING_SCREW_THREAD % 10 > 1
#error "TRAMMING_SCREW_THREAD must be equal to 30, 31, 40, 41, 50, or 51."
#endif
static_assert(G35_PROBE_COUNT > 2, "TRAMMING_POINT_XY requires at least 3 XY positions.");
/**
* G35: Read bed corners to help adjust bed screws
*