From 081ef46e7692d027b0fe8c4667da4315e9e20e81 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Feb 2020 08:23:42 -0600 Subject: [PATCH] Fix Arduino IDE compile for DUE Fixes #16767 --- Marlin/src/module/probe.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 35fb8ceb26..d424f4d283 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -43,14 +43,6 @@ public: static xyz_pos_t offset; - // Use offset_xy for read only access - // More optimal the XY offset is known to always be zero. - #if HAS_PROBE_XY_OFFSET - static const xyz_pos_t &offset_xy; - #else - static constexpr xy_pos_t offset_xy{0}; - #endif - static bool set_deployed(const bool deploy); #ifdef Z_AFTER_PROBING @@ -66,13 +58,20 @@ public: #else - static constexpr xyz_pos_t offset{0}; - static constexpr xy_pos_t offset_xy{0}; + static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767 static bool set_deployed(const bool) { return false; } #endif + // Use offset_xy for read only access + // More optimal the XY offset is known to always be zero. + #if HAS_PROBE_XY_OFFSET + static const xyz_pos_t &offset_xy; + #else + static constexpr xy_pos_t offset_xy = xy_pos_t({ 0, 0 }); // See #16767 + #endif + static inline bool deploy() { return set_deployed(true); } static inline bool stow() { return set_deployed(false); }