By and large, it's fine. But it assumes that the user has a bed probe. I don't have one, and don't plan to install one, so I wanted to remove that feature. Yeah, I know I could just simply never call G29 - but let's just say I'm a masochist and wanted to learn more about the code.
So, there's a line in Configuration.h
- Code: Select all
#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
which clearly already had the "//" deleted. So I put it back in.
- Code: Select all
//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
Now the code would not compile. But I studied the error messages and realized they were all coming from ConfigurationStore.cpp, which I quickly realized was the code that handles the EEPROM commands. There were variables for "bed_level_offset" that were causing the errors; those variables were supposed to be defined elsewhere and used in ConfigurationStore. But upon further study, and a bit of discussion on Github's "issues" forums, I realized that the proper way to handle these orphan variables is to turn them off if not used, but substitute dummy variables in their place so the EEPROM data structure remains intact:
- Code: Select all
#ifdef ENABLE_AUTO_BED_LEVELING
EEPROM_WRITE_VAR(i,bed_level_probe_offset[0]);
EEPROM_WRITE_VAR(i,bed_level_probe_offset[1]);
EEPROM_WRITE_VAR(i,bed_level_probe_offset[2]);
#else
for (int q = 3; q--;) EEPROM_WRITE_VAR(i, dummy);
#endif
Once I did this (in two places) I could compile with the bed leveling turned on or off.