mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-27 13:56:24 +00:00
Cleanups for leveling-related code
This commit is contained in:
parent
cc2bc67440
commit
44fa7fb18c
@ -25,6 +25,7 @@
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
#include "abl.h"
|
||||
#include "../bedlevel.h"
|
||||
|
||||
#include "../../../module/motion.h"
|
||||
|
||||
|
@ -21,27 +21,23 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
extern int bilinear_grid_spacing[2], bilinear_start[2];
|
||||
extern float bilinear_grid_factor[2],
|
||||
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
float bilinear_z_offset(const float raw[XYZ]);
|
||||
|
||||
#include "../bedlevel.h"
|
||||
void extrapolate_unprobed_bed_level();
|
||||
void print_bilinear_leveling_grid();
|
||||
void refresh_bed_level();
|
||||
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
||||
void print_bilinear_leveling_grid_virt();
|
||||
void bed_level_virt_interpolate();
|
||||
#endif
|
||||
|
||||
extern int bilinear_grid_spacing[2], bilinear_start[2];
|
||||
extern float bilinear_grid_factor[2],
|
||||
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||
float bilinear_z_offset(const float raw[XYZ]);
|
||||
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
|
||||
void bilinear_line_to_destination(const float fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF);
|
||||
#endif
|
||||
|
||||
void extrapolate_unprobed_bed_level();
|
||||
void print_bilinear_leveling_grid();
|
||||
void refresh_bed_level();
|
||||
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
||||
void print_bilinear_leveling_grid_virt();
|
||||
void bed_level_virt_interpolate();
|
||||
#endif
|
||||
|
||||
#if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES)
|
||||
void bilinear_line_to_destination(const float fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF);
|
||||
#endif
|
||||
|
||||
#endif // AUTO_BED_LEVELING_BILINEAR
|
||||
#define Z_VALUES(X,Y) z_values[X][Y]
|
||||
|
@ -80,6 +80,6 @@ void reset_bed_level();
|
||||
#include "mbl/mesh_bed_leveling.h"
|
||||
#elif ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "ubl/ubl.h"
|
||||
#elif HAS_ABL
|
||||
#elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
#include "abl/abl.h"
|
||||
#endif
|
||||
|
@ -118,3 +118,5 @@ public:
|
||||
};
|
||||
|
||||
extern mesh_bed_leveling mbl;
|
||||
|
||||
#define Z_VALUES(X,Y) mbl.z_values[X][Y]
|
||||
|
@ -370,3 +370,5 @@ class unified_bed_leveling {
|
||||
}; // class unified_bed_leveling
|
||||
|
||||
extern unified_bed_leveling ubl;
|
||||
|
||||
#define Z_VALUES(X,Y) ubl.z_values[X][Y]
|
||||
|
@ -105,12 +105,6 @@ void GcodeSuite::M420() {
|
||||
|
||||
#if HAS_MESH
|
||||
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
#define Z_VALUES(X,Y) mbl.z_values[X][Y]
|
||||
#else
|
||||
#define Z_VALUES(X,Y) z_values[X][Y]
|
||||
#endif
|
||||
|
||||
// Subtract the given value or the mean from all mesh values
|
||||
if (leveling_is_valid() && parser.seen('C')) {
|
||||
const float cval = parser.value_float();
|
||||
|
@ -19,15 +19,13 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Conditionals_LCD.h
|
||||
* Conditionals that need to be set before Configuration_adv.h or pins.h
|
||||
*/
|
||||
|
||||
#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
|
||||
#define CONDITIONALS_LCD_H
|
||||
|
||||
#define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
|
||||
|
||||
#if ENABLED(CARTESIO_UI)
|
||||
@ -557,6 +555,10 @@
|
||||
|
||||
#define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
|
||||
|
||||
#ifdef GRID_MAX_POINTS_X
|
||||
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
||||
#endif
|
||||
|
||||
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
||||
#define HAS_RESUME_CONTINUE (ENABLED(EXTENSIBLE_UI) || ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
||||
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
|
||||
@ -566,4 +568,6 @@
|
||||
#define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
|
||||
#define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))
|
||||
|
||||
#endif // CONDITIONALS_LCD_H
|
||||
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
|
||||
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
||||
#define IS_CARTESIAN !IS_KINEMATIC
|
||||
|
@ -43,10 +43,6 @@
|
||||
#define NOT_A_PIN 0 // For PINS_DEBUGGING
|
||||
#endif
|
||||
|
||||
#define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
|
||||
#define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
|
||||
#define IS_CARTESIAN !IS_KINEMATIC
|
||||
|
||||
#define HAS_CLASSIC_JERK (IS_KINEMATIC || DISABLED(JUNCTION_DEVIATION))
|
||||
|
||||
/**
|
||||
@ -1538,9 +1534,6 @@
|
||||
#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
#endif
|
||||
|
||||
// Shorthand
|
||||
#define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
|
||||
|
||||
// Add commands that need sub-codes to this list
|
||||
#define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET) || ENABLED(CNC_COORDINATE_SYSTEMS) || ENABLED(POWER_LOSS_RECOVERY)
|
||||
|
||||
|
@ -320,8 +320,6 @@
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
void lcd_mesh_edit_setup(const float &initial);
|
||||
float lcd_mesh_edit();
|
||||
void lcd_z_offset_edit_setup(const float &initial);
|
||||
float lcd_z_offset_edit();
|
||||
#endif
|
||||
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
||||
|
Loading…
Reference in New Issue
Block a user