Skip to content

Commit

Permalink
Group UBL parameters, add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 24, 2021
1 parent 8fca37f commit da4b689
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 209 deletions.
35 changes: 19 additions & 16 deletions Marlin/src/feature/bedlevel/ubl/ubl.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,26 @@ struct mesh_index_pair;
typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
#endif

typedef struct {
bool C_seen;
int8_t V_verbosity,
P_phase,
R_repetition,
KLS_storage_slot,
T_map_type;
float B_shim_thickness,
C_constant;
xy_pos_t XY_pos;
xy_bool_t XY_seen;
#if HAS_BED_PROBE
int grid_size;
#endif
} G29_parameters_t;

class unified_bed_leveling {
private:

static int g29_verbose_level,
g29_phase_value,
g29_repetition_cnt,
g29_storage_slot,
g29_map_type;
static bool g29_c_flag;
static float g29_card_thickness,
g29_constant;
static xy_pos_t g29_pos;
static xy_bool_t xy_seen;

#if HAS_BED_PROBE
static int g29_grid_size;
#endif
static G29_parameters_t param;

#if IS_NEWPANEL
static void move_z_with_encoder(const float &multiplier);
Expand All @@ -71,7 +74,7 @@ class unified_bed_leveling {
static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0;
#endif

static bool g29_parameter_parsing() _O0;
static bool G29_parse_parameters() _O0;
static void shift_mesh_height();
static void probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) _O0;
static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3);
Expand Down Expand Up @@ -129,7 +132,7 @@ class unified_bed_leveling {
static inline void steppers_were_disabled() {}
#endif

static volatile int16_t encoder_diff; // Volatile because buttons may changed it at interrupt time
static volatile int16_t encoder_diff; // Volatile because buttons may change it at interrupt time

unified_bed_leveling();

Expand Down
Loading

0 comments on commit da4b689

Please sign in to comment.