Przeglądaj źródła

Fix ENABLED/DISABLED for DUE

…and any other platforms where `false`/`true` are defined as `0x0`/`0x1`.

This fixes issue #10550.
Scott Lahteine 7 lat temu
rodzic
commit
d470a1234f
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3
    1
      Marlin/src/core/macros.h

+ 3
- 1
Marlin/src/core/macros.h Wyświetl plik

@@ -147,9 +147,11 @@
147 147
 #define SWITCH_ENABLED_true  1
148 148
 #define SWITCH_ENABLED_0     0
149 149
 #define SWITCH_ENABLED_1     1
150
+#define SWITCH_ENABLED_0x0   0
151
+#define SWITCH_ENABLED_0x1   1
150 152
 #define SWITCH_ENABLED_      1
151 153
 #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
152
-#define DISABLED(b) (!_CAT(SWITCH_ENABLED_, b))
154
+#define DISABLED(b) !ENABLED(b)
153 155
 
154 156
 #define WITHIN(V,L,H) ((V) >= (L) && (V) <= (H))
155 157
 #define NUMERIC(a) WITHIN(a, '0', '9')

Ładowanie…
Anuluj
Zapisz