From 208ab8b36617914614a22dbd7d9b3d6abc8f763f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Morav=C4=8D=C3=ADk?= Date: Sun, 17 Feb 2019 19:32:47 +0100 Subject: [PATCH] Fix compilation with one service interval (#13185) --- Marlin/src/module/printcounter.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 7861d96c23..0dc6aead36 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -94,7 +94,15 @@ void PrintCounter::initStats() { loaded = true; data = { 0, 0, 0, 0, 0.0 #if HAS_SERVICE_INTERVALS - , SERVICE_INTERVAL_SEC_1, SERVICE_INTERVAL_SEC_2, SERVICE_INTERVAL_SEC_3 + #if SERVICE_INTERVAL_1 > 0 + , SERVICE_INTERVAL_SEC_1 + #endif + #if SERVICE_INTERVAL_2 > 0 + , SERVICE_INTERVAL_SEC_2 + #endif + #if SERVICE_INTERVAL_3 > 0 + , SERVICE_INTERVAL_SEC_3 + #endif #endif };