marlin
"Macro is not defined when feature is not enabled.
Macro's value is assigned to a variable, but the macro is only defined when ENABLE_AUTO_BED_LEVELING is enabled, which is not by default. The variable should only be used when ENABLE_AUTO_BED_LEVELING is enabled."
Bug fixed by commit fdac8f6cece
| Type | UndeclaredIdentifier |
| Config | "!ENABLE_AUTO_BED_LEVELING" (1st degree) |
| Fix-in | mapping |
| Location | configuration/ |
#ifdef ENABLE_AUTO_BED_LEVELING
#define Z_PROBE_OFFSET_FROM_EXTRUDER 7
#endif
float zprobe_zoffset;
void Config_ResetDefault()
{
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; // ERROR
}
int main(int argc, char **argv)
{
Config_ResetDefault();
return 0;
}
diff --git a/simple/fdac8f6.c b/simple/fdac8f6.c
--- a/simple/fdac8f6.c
+++ b/simple/fdac8f6_fix.c
@@ -6,7 +6,9 @@ float zprobe_zoffset;
void Config_ResetDefault()
{
+#ifdef ENABLE_AUTO_BED_LEVELING
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; // ERROR
+#endif
}
int main(int argc, char **argv)
#ifdef ENABLE_AUTO_BED_LEVELING
#define Z_PROBE_OFFSET_FROM_EXTRUDER 7
#endif
int main(int argc, char **argv)
{
float zprobe_zoffset;
zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; // ERROR
return 0;
}
. call configuration_store.cpp:242: void manage_heater() . ERROR 277: zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;