Make leveling_is_active a macro
This commit is contained in:
@ -112,7 +112,7 @@ void GcodeSuite::M420() {
|
||||
if (parser.seen('Z')) set_z_fade_height(parser.value_linear_units());
|
||||
#endif
|
||||
|
||||
const bool new_status = leveling_is_active();
|
||||
const bool new_status = LEVELING_IS_ACTIVE();
|
||||
|
||||
if (to_enable && !new_status) {
|
||||
SERIAL_ERROR_START();
|
||||
|
@ -247,7 +247,7 @@ void GcodeSuite::G29() {
|
||||
abl_probe_index = -1;
|
||||
#endif
|
||||
|
||||
abl_should_enable = leveling_is_active();
|
||||
abl_should_enable = LEVELING_IS_ACTIVE();
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
@ -964,7 +964,7 @@ void GcodeSuite::G29() {
|
||||
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
|
||||
if (planner.abl_enabled)
|
||||
if (LEVELING_IS_ACTIVE())
|
||||
SYNC_PLAN_POSITION_KINEMATIC();
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ void GcodeSuite::G29() {
|
||||
switch (state) {
|
||||
case MeshReport:
|
||||
if (leveling_is_valid()) {
|
||||
SERIAL_PROTOCOLLNPAIR("State: ", leveling_is_active() ? MSG_ON : MSG_OFF);
|
||||
SERIAL_PROTOCOLLNPAIR("State: ", LEVELING_IS_ACTIVE() ? MSG_ON : MSG_OFF);
|
||||
mbl_mesh_report();
|
||||
}
|
||||
else
|
||||
|
@ -157,7 +157,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
// Disable the leveling matrix before homing
|
||||
#if HAS_LEVELING
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
const bool ubl_state_at_entry = leveling_is_active();
|
||||
const bool ubl_state_at_entry = LEVELING_IS_ACTIVE();
|
||||
#endif
|
||||
set_bed_leveling_enabled(false);
|
||||
#endif
|
||||
|
@ -32,6 +32,10 @@
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#include "../../module/planner.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M48: Z probe repeatability measurement function.
|
||||
*
|
||||
@ -115,7 +119,7 @@ void GcodeSuite::M48() {
|
||||
// Disable bed level correction in M48 because we want the raw data when we probe
|
||||
|
||||
#if HAS_LEVELING
|
||||
const bool was_enabled = leveling_is_active();
|
||||
const bool was_enabled = LEVELING_IS_ACTIVE();
|
||||
set_bed_leveling_enabled(false);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user