Move leveling_is_active to a macro

This commit is contained in:
Scott Lahteine 2017-10-13 10:03:59 -05:00
parent fcd3b326e9
commit da93a272a0
6 changed files with 30 additions and 33 deletions

View file

@ -468,6 +468,16 @@ class Planner {
#define PLANNER_XY_FEEDRATE() (min(planner.max_feedrate_mm_s[X_AXIS], planner.max_feedrate_mm_s[Y_AXIS]))
#if ENABLED(MESH_BED_LEVELING)
#define LEVELING_IS_ACTIVE() (mesh_bed_leveling::active())
#elif ENABLED(AUTO_BED_LEVELING_UBL)
#define LEVELING_IS_ACTIVE() (unified_bed_leveling::state.active)
#elif HAS_ABL
#define LEVELING_IS_ACTIVE() (Planner::abl_enabled)
#else
#define LEVELING_IS_ACTIVE() (false)
#endif
extern Planner planner;
#endif // PLANNER_H