Browse Source

Fix compilation with one service interval (#13185)

Roman Moravčík 6 years ago
parent
commit
208ab8b366
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      Marlin/src/module/printcounter.cpp

+ 9
- 1
Marlin/src/module/printcounter.cpp View File

@@ -94,7 +94,15 @@ void PrintCounter::initStats() {
94 94
   loaded = true;
95 95
   data = { 0, 0, 0, 0, 0.0
96 96
     #if HAS_SERVICE_INTERVALS
97
-      , SERVICE_INTERVAL_SEC_1, SERVICE_INTERVAL_SEC_2, SERVICE_INTERVAL_SEC_3
97
+      #if SERVICE_INTERVAL_1 > 0
98
+        , SERVICE_INTERVAL_SEC_1
99
+      #endif
100
+      #if SERVICE_INTERVAL_2 > 0
101
+        , SERVICE_INTERVAL_SEC_2
102
+      #endif
103
+      #if SERVICE_INTERVAL_3 > 0
104
+        , SERVICE_INTERVAL_SEC_3
105
+      #endif
98 106
     #endif
99 107
   };
100 108
 

Loading…
Cancel
Save