Optimize G-code / feature dependencies (#18919)

This commit is contained in:
Scott Lahteine
2020-08-06 08:14:00 -05:00
committed by GitHub
parent 6bcfb58cd4
commit 99ba866d8d
26 changed files with 632 additions and 189 deletions

View File

@ -404,7 +404,7 @@ typedef struct SettingsDataStruct {
// HAS_CASE_LIGHT_BRIGHTNESS
//
#if HAS_CASE_LIGHT_BRIGHTNESS
uint8_t case_light_brightness;
uint8_t caselight_brightness; // M355 P
#endif
//
@ -465,7 +465,7 @@ void MarlinSettings::postprocess() {
TERN_(HAS_LINEAR_E_JERK, planner.recalculate_max_e_jerk());
TERN_(HAS_CASE_LIGHT_BRIGHTNESS, update_case_light());
TERN_(HAS_CASE_LIGHT_BRIGHTNESS, caselight.update_brightness());
// Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
// and init stepper.count[], planner.position[] with current_position
@ -1342,7 +1342,7 @@ void MarlinSettings::postprocess() {
// Case Light Brightness
//
#if HAS_CASE_LIGHT_BRIGHTNESS
EEPROM_WRITE(case_light_brightness);
EEPROM_WRITE(caselight.brightness);
#endif
//
@ -2181,8 +2181,8 @@ void MarlinSettings::postprocess() {
// Case Light Brightness
//
#if HAS_CASE_LIGHT_BRIGHTNESS
_FIELD_TEST(case_light_brightness);
EEPROM_READ(case_light_brightness);
_FIELD_TEST(caselight_brightness);
EEPROM_READ(caselight.brightness);
#endif
//
@ -2493,7 +2493,7 @@ void MarlinSettings::reset() {
//
// Case Light Brightness
//
TERN_(HAS_CASE_LIGHT_BRIGHTNESS, case_light_brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS);
TERN_(HAS_CASE_LIGHT_BRIGHTNESS, caselight.brightness = CASE_LIGHT_DEFAULT_BRIGHTNESS);
//
// TOUCH_SCREEN_CALIBRATION