Browse Source

Overridable Options - Part 11 (PR#2563)

Apply `ENABLED` / `DISABLED` macros to EEPROM-related files.
pull/1/head
Scott Lahteine 9 years ago
committed by Richard Wackerbarth
parent
commit
5e834352a9
  1. 106
      Marlin/configuration_store.cpp
  2. 4
      Marlin/configuration_store.h

106
Marlin/configuration_store.cpp

@ -95,7 +95,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "configuration_store.h" #include "configuration_store.h"
#ifdef MESH_BED_LEVELING #if ENABLED(MESH_BED_LEVELING)
#include "mesh_bed_leveling.h" #include "mesh_bed_leveling.h"
#endif #endif
@ -130,7 +130,7 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) {
#define EEPROM_OFFSET 100 #define EEPROM_OFFSET 100
#ifdef EEPROM_SETTINGS #if ENABLED(EEPROM_SETTINGS)
void Config_StoreSettings() { void Config_StoreSettings() {
float dummy = 0.0f; float dummy = 0.0f;
@ -153,7 +153,7 @@ void Config_StoreSettings() {
uint8_t mesh_num_x = 3; uint8_t mesh_num_x = 3;
uint8_t mesh_num_y = 3; uint8_t mesh_num_y = 3;
#ifdef MESH_BED_LEVELING #if ENABLED(MESH_BED_LEVELING)
// Compile time test that sizeof(mbl.z_values) is as expected // Compile time test that sizeof(mbl.z_values) is as expected
typedef char c_assert[(sizeof(mbl.z_values) == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS*sizeof(dummy)) ? 1 : -1]; typedef char c_assert[(sizeof(mbl.z_values) == MESH_NUM_X_POINTS*MESH_NUM_Y_POINTS*sizeof(dummy)) ? 1 : -1];
mesh_num_x = MESH_NUM_X_POINTS; mesh_num_x = MESH_NUM_X_POINTS;
@ -171,17 +171,17 @@ void Config_StoreSettings() {
for (int q=0; q<mesh_num_x*mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy); for (int q=0; q<mesh_num_x*mesh_num_y; q++) EEPROM_WRITE_VAR(i, dummy);
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
#ifndef ENABLE_AUTO_BED_LEVELING #if DISABLED(ENABLE_AUTO_BED_LEVELING)
float zprobe_zoffset = 0; float zprobe_zoffset = 0;
#endif #endif
EEPROM_WRITE_VAR(i, zprobe_zoffset); EEPROM_WRITE_VAR(i, zprobe_zoffset);
#ifdef DELTA #if ENABLED(DELTA)
EEPROM_WRITE_VAR(i, endstop_adj); // 3 floats EEPROM_WRITE_VAR(i, endstop_adj); // 3 floats
EEPROM_WRITE_VAR(i, delta_radius); // 1 float EEPROM_WRITE_VAR(i, delta_radius); // 1 float
EEPROM_WRITE_VAR(i, delta_diagonal_rod); // 1 float EEPROM_WRITE_VAR(i, delta_diagonal_rod); // 1 float
EEPROM_WRITE_VAR(i, delta_segments_per_second); // 1 float EEPROM_WRITE_VAR(i, delta_segments_per_second); // 1 float
#elif defined(Z_DUAL_ENDSTOPS) #elif ENABLED(Z_DUAL_ENDSTOPS)
EEPROM_WRITE_VAR(i, z_endstop_adj); // 1 floats EEPROM_WRITE_VAR(i, z_endstop_adj); // 1 floats
dummy = 0.0f; dummy = 0.0f;
for (int q=5; q--;) EEPROM_WRITE_VAR(i, dummy); for (int q=5; q--;) EEPROM_WRITE_VAR(i, dummy);
@ -190,7 +190,7 @@ void Config_StoreSettings() {
for (int q=6; q--;) EEPROM_WRITE_VAR(i, dummy); for (int q=6; q--;) EEPROM_WRITE_VAR(i, dummy);
#endif #endif
#ifndef ULTIPANEL #if DISABLED(ULTIPANEL)
int plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP, plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP, plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED, int plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP, plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP, plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED,
absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP, absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP, absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP, absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP, absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
#endif // !ULTIPANEL #endif // !ULTIPANEL
@ -204,12 +204,12 @@ void Config_StoreSettings() {
for (int e = 0; e < 4; e++) { for (int e = 0; e < 4; e++) {
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
if (e < EXTRUDERS) { if (e < EXTRUDERS) {
EEPROM_WRITE_VAR(i, PID_PARAM(Kp, e)); EEPROM_WRITE_VAR(i, PID_PARAM(Kp, e));
EEPROM_WRITE_VAR(i, PID_PARAM(Ki, e)); EEPROM_WRITE_VAR(i, PID_PARAM(Ki, e));
EEPROM_WRITE_VAR(i, PID_PARAM(Kd, e)); EEPROM_WRITE_VAR(i, PID_PARAM(Kd, e));
#ifdef PID_ADD_EXTRUSION_RATE #if ENABLED(PID_ADD_EXTRUSION_RATE)
EEPROM_WRITE_VAR(i, PID_PARAM(Kc, e)); EEPROM_WRITE_VAR(i, PID_PARAM(Kc, e));
#else #else
dummy = 1.0f; // 1.0 = default kc dummy = 1.0f; // 1.0 = default kc
@ -227,7 +227,7 @@ void Config_StoreSettings() {
} // Extruders Loop } // Extruders Loop
#ifndef PIDTEMPBED #if DISABLED(PIDTEMPBED)
float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE; float bedKp = DUMMY_PID_VALUE, bedKi = DUMMY_PID_VALUE, bedKd = DUMMY_PID_VALUE;
#endif #endif
@ -235,19 +235,19 @@ void Config_StoreSettings() {
EEPROM_WRITE_VAR(i, bedKi); EEPROM_WRITE_VAR(i, bedKi);
EEPROM_WRITE_VAR(i, bedKd); EEPROM_WRITE_VAR(i, bedKd);
#ifndef HAS_LCD_CONTRAST #if DISABLED(HAS_LCD_CONTRAST)
int lcd_contrast = 32; const int lcd_contrast = 32;
#endif #endif
EEPROM_WRITE_VAR(i, lcd_contrast); EEPROM_WRITE_VAR(i, lcd_contrast);
#ifdef SCARA #if ENABLED(SCARA)
EEPROM_WRITE_VAR(i, axis_scaling); // 3 floats EEPROM_WRITE_VAR(i, axis_scaling); // 3 floats
#else #else
dummy = 1.0f; dummy = 1.0f;
EEPROM_WRITE_VAR(i, dummy); EEPROM_WRITE_VAR(i, dummy);
#endif #endif
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
EEPROM_WRITE_VAR(i, autoretract_enabled); EEPROM_WRITE_VAR(i, autoretract_enabled);
EEPROM_WRITE_VAR(i, retract_length); EEPROM_WRITE_VAR(i, retract_length);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
@ -327,7 +327,7 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, dummy_uint8); EEPROM_READ_VAR(i, dummy_uint8);
EEPROM_READ_VAR(i, mesh_num_x); EEPROM_READ_VAR(i, mesh_num_x);
EEPROM_READ_VAR(i, mesh_num_y); EEPROM_READ_VAR(i, mesh_num_y);
#ifdef MESH_BED_LEVELING #if ENABLED(MESH_BED_LEVELING)
mbl.active = dummy_uint8; mbl.active = dummy_uint8;
if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) { if (mesh_num_x == MESH_NUM_X_POINTS && mesh_num_y == MESH_NUM_Y_POINTS) {
EEPROM_READ_VAR(i, mbl.z_values); EEPROM_READ_VAR(i, mbl.z_values);
@ -339,17 +339,17 @@ void Config_RetrieveSettings() {
for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy); for (int q = 0; q < mesh_num_x * mesh_num_y; q++) EEPROM_READ_VAR(i, dummy);
#endif // MESH_BED_LEVELING #endif // MESH_BED_LEVELING
#ifndef ENABLE_AUTO_BED_LEVELING #if DISABLED(ENABLE_AUTO_BED_LEVELING)
float zprobe_zoffset = 0; float zprobe_zoffset = 0;
#endif #endif
EEPROM_READ_VAR(i, zprobe_zoffset); EEPROM_READ_VAR(i, zprobe_zoffset);
#ifdef DELTA #if ENABLED(DELTA)
EEPROM_READ_VAR(i, endstop_adj); // 3 floats EEPROM_READ_VAR(i, endstop_adj); // 3 floats
EEPROM_READ_VAR(i, delta_radius); // 1 float EEPROM_READ_VAR(i, delta_radius); // 1 float
EEPROM_READ_VAR(i, delta_diagonal_rod); // 1 float EEPROM_READ_VAR(i, delta_diagonal_rod); // 1 float
EEPROM_READ_VAR(i, delta_segments_per_second); // 1 float EEPROM_READ_VAR(i, delta_segments_per_second); // 1 float
#elif defined(Z_DUAL_ENDSTOPS) #elif ENABLED(Z_DUAL_ENDSTOPS)
EEPROM_READ_VAR(i, z_endstop_adj); EEPROM_READ_VAR(i, z_endstop_adj);
dummy = 0.0f; dummy = 0.0f;
for (int q=5; q--;) EEPROM_READ_VAR(i, dummy); for (int q=5; q--;) EEPROM_READ_VAR(i, dummy);
@ -358,7 +358,7 @@ void Config_RetrieveSettings() {
for (int q=6; q--;) EEPROM_READ_VAR(i, dummy); for (int q=6; q--;) EEPROM_READ_VAR(i, dummy);
#endif #endif
#ifndef ULTIPANEL #if DISABLED(ULTIPANEL)
int plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed, int plaPreheatHotendTemp, plaPreheatHPBTemp, plaPreheatFanSpeed,
absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed; absPreheatHotendTemp, absPreheatHPBTemp, absPreheatFanSpeed;
#endif #endif
@ -370,7 +370,7 @@ void Config_RetrieveSettings() {
EEPROM_READ_VAR(i, absPreheatHPBTemp); EEPROM_READ_VAR(i, absPreheatHPBTemp);
EEPROM_READ_VAR(i, absPreheatFanSpeed); EEPROM_READ_VAR(i, absPreheatFanSpeed);
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
for (int e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin for (int e = 0; e < 4; e++) { // 4 = max extruders currently supported by Marlin
EEPROM_READ_VAR(i, dummy); // Kp EEPROM_READ_VAR(i, dummy); // Kp
if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) { if (e < EXTRUDERS && dummy != DUMMY_PID_VALUE) {
@ -378,7 +378,7 @@ void Config_RetrieveSettings() {
PID_PARAM(Kp, e) = dummy; PID_PARAM(Kp, e) = dummy;
EEPROM_READ_VAR(i, PID_PARAM(Ki, e)); EEPROM_READ_VAR(i, PID_PARAM(Ki, e));
EEPROM_READ_VAR(i, PID_PARAM(Kd, e)); EEPROM_READ_VAR(i, PID_PARAM(Kd, e));
#ifdef PID_ADD_EXTRUSION_RATE #if ENABLED(PID_ADD_EXTRUSION_RATE)
EEPROM_READ_VAR(i, PID_PARAM(Kc, e)); EEPROM_READ_VAR(i, PID_PARAM(Kc, e));
#else #else
EEPROM_READ_VAR(i, dummy); EEPROM_READ_VAR(i, dummy);
@ -393,7 +393,7 @@ void Config_RetrieveSettings() {
for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc for (int q=16; q--;) EEPROM_READ_VAR(i, dummy); // 4x Kp, Ki, Kd, Kc
#endif // !PIDTEMP #endif // !PIDTEMP
#ifndef PIDTEMPBED #if DISABLED(PIDTEMPBED)
float bedKp, bedKi, bedKd; float bedKp, bedKi, bedKd;
#endif #endif
@ -407,18 +407,18 @@ void Config_RetrieveSettings() {
for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd for (int q=2; q--;) EEPROM_READ_VAR(i, dummy); // bedKi, bedKd
} }
#ifndef HAS_LCD_CONTRAST #if DISABLED(HAS_LCD_CONTRAST)
int lcd_contrast; int lcd_contrast;
#endif #endif
EEPROM_READ_VAR(i, lcd_contrast); EEPROM_READ_VAR(i, lcd_contrast);
#ifdef SCARA #if ENABLED(SCARA)
EEPROM_READ_VAR(i, axis_scaling); // 3 floats EEPROM_READ_VAR(i, axis_scaling); // 3 floats
#else #else
EEPROM_READ_VAR(i, dummy); EEPROM_READ_VAR(i, dummy);
#endif #endif
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
EEPROM_READ_VAR(i, autoretract_enabled); EEPROM_READ_VAR(i, autoretract_enabled);
EEPROM_READ_VAR(i, retract_length); EEPROM_READ_VAR(i, retract_length);
#if EXTRUDERS > 1 #if EXTRUDERS > 1
@ -455,7 +455,7 @@ void Config_RetrieveSettings() {
SERIAL_ECHOLNPGM(" bytes)"); SERIAL_ECHOLNPGM(" bytes)");
} }
#ifdef EEPROM_CHITCHAT #if ENABLED(EEPROM_CHITCHAT)
Config_PrintSettings(); Config_PrintSettings();
#endif #endif
} }
@ -474,7 +474,7 @@ void Config_ResetDefault() {
axis_steps_per_unit[i] = tmp1[i]; axis_steps_per_unit[i] = tmp1[i];
max_feedrate[i] = tmp2[i]; max_feedrate[i] = tmp2[i];
max_acceleration_units_per_sq_second[i] = tmp3[i]; max_acceleration_units_per_sq_second[i] = tmp3[i];
#ifdef SCARA #if ENABLED(SCARA)
if (i < COUNT(axis_scaling)) if (i < COUNT(axis_scaling))
axis_scaling[i] = 1; axis_scaling[i] = 1;
#endif #endif
@ -494,25 +494,25 @@ void Config_ResetDefault() {
max_e_jerk = DEFAULT_EJERK; max_e_jerk = DEFAULT_EJERK;
home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
#ifdef MESH_BED_LEVELING #if ENABLED(MESH_BED_LEVELING)
mbl.active = 0; mbl.active = 0;
#endif #endif
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(ENABLE_AUTO_BED_LEVELING)
zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER;
#endif #endif
#ifdef DELTA #if ENABLED(DELTA)
endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0;
delta_radius = DELTA_RADIUS; delta_radius = DELTA_RADIUS;
delta_diagonal_rod = DELTA_DIAGONAL_ROD; delta_diagonal_rod = DELTA_DIAGONAL_ROD;
delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
recalc_delta_settings(delta_radius, delta_diagonal_rod); recalc_delta_settings(delta_radius, delta_diagonal_rod);
#elif defined(Z_DUAL_ENDSTOPS) #elif ENABLED(Z_DUAL_ENDSTOPS)
z_endstop_adj = 0; z_endstop_adj = 0;
#endif #endif
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP; plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP;
plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP; plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP;
plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED; plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED;
@ -521,12 +521,12 @@ void Config_ResetDefault() {
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
#endif #endif
#ifdef HAS_LCD_CONTRAST #if ENABLED(HAS_LCD_CONTRAST)
lcd_contrast = DEFAULT_LCD_CONTRAST; lcd_contrast = DEFAULT_LCD_CONTRAST;
#endif #endif
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
#ifdef PID_PARAMS_PER_EXTRUDER #if ENABLED(PID_PARAMS_PER_EXTRUDER)
for (int e = 0; e < EXTRUDERS; e++) for (int e = 0; e < EXTRUDERS; e++)
#else #else
int e = 0; // only need to write once int e = 0; // only need to write once
@ -535,7 +535,7 @@ void Config_ResetDefault() {
PID_PARAM(Kp, e) = DEFAULT_Kp; PID_PARAM(Kp, e) = DEFAULT_Kp;
PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki); PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki);
PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd); PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd);
#ifdef PID_ADD_EXTRUSION_RATE #if ENABLED(PID_ADD_EXTRUSION_RATE)
PID_PARAM(Kc, e) = DEFAULT_Kc; PID_PARAM(Kc, e) = DEFAULT_Kc;
#endif #endif
} }
@ -543,13 +543,13 @@ void Config_ResetDefault() {
updatePID(); updatePID();
#endif // PIDTEMP #endif // PIDTEMP
#ifdef PIDTEMPBED #if ENABLED(PIDTEMPBED)
bedKp = DEFAULT_bedKp; bedKp = DEFAULT_bedKp;
bedKi = scalePID_i(DEFAULT_bedKi); bedKi = scalePID_i(DEFAULT_bedKi);
bedKd = scalePID_d(DEFAULT_bedKd); bedKd = scalePID_d(DEFAULT_bedKd);
#endif #endif
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
autoretract_enabled = false; autoretract_enabled = false;
retract_length = RETRACT_LENGTH; retract_length = RETRACT_LENGTH;
#if EXTRUDERS > 1 #if EXTRUDERS > 1
@ -573,7 +573,7 @@ void Config_ResetDefault() {
SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded");
} }
#ifndef DISABLE_M503 #if DISABLED(DISABLE_M503)
/** /**
* Print Configuration Settings - M503 * Print Configuration Settings - M503
@ -598,7 +598,7 @@ void Config_PrintSettings(bool forReplay) {
CONFIG_ECHO_START; CONFIG_ECHO_START;
#ifdef SCARA #if ENABLED(SCARA)
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Scaling factors:"); SERIAL_ECHOLNPGM("Scaling factors:");
CONFIG_ECHO_START; CONFIG_ECHO_START;
@ -663,7 +663,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]); SERIAL_ECHOPAIR(" Z", home_offset[Z_AXIS]);
SERIAL_EOL; SERIAL_EOL;
#ifdef MESH_BED_LEVELING #if ENABLED(MESH_BED_LEVELING)
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Mesh bed leveling:"); SERIAL_ECHOLNPGM("Mesh bed leveling:");
CONFIG_ECHO_START; CONFIG_ECHO_START;
@ -683,7 +683,7 @@ void Config_PrintSettings(bool forReplay) {
} }
#endif #endif
#ifdef DELTA #if ENABLED(DELTA)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Endstop adjustment (mm):"); SERIAL_ECHOLNPGM("Endstop adjustment (mm):");
@ -700,7 +700,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR(" R", delta_radius); SERIAL_ECHOPAIR(" R", delta_radius);
SERIAL_ECHOPAIR(" S", delta_segments_per_second); SERIAL_ECHOPAIR(" S", delta_segments_per_second);
SERIAL_EOL; SERIAL_EOL;
#elif defined(Z_DUAL_ENDSTOPS) #elif ENABLED(Z_DUAL_ENDSTOPS)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):"); SERIAL_ECHOLNPGM("Z2 Endstop adjustment (mm):");
@ -710,7 +710,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_EOL; SERIAL_EOL;
#endif // DELTA #endif // DELTA
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("Material heatup parameters:"); SERIAL_ECHOLNPGM("Material heatup parameters:");
@ -727,13 +727,13 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_EOL; SERIAL_EOL;
#endif // ULTIPANEL #endif // ULTIPANEL
#if defined(PIDTEMP) || defined(PIDTEMPBED) #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("PID settings:"); SERIAL_ECHOLNPGM("PID settings:");
} }
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
#if EXTRUDERS > 1 #if EXTRUDERS > 1
if (forReplay) { if (forReplay) {
for (uint8_t i = 0; i < EXTRUDERS; i++) { for (uint8_t i = 0; i < EXTRUDERS; i++) {
@ -742,7 +742,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i)); SERIAL_ECHOPAIR(" P", PID_PARAM(Kp, i));
SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i))); SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, i)));
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i))); SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, i)));
#ifdef PID_ADD_EXTRUSION_RATE #if ENABLED(PID_ADD_EXTRUSION_RATE)
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i)); SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, i));
#endif #endif
SERIAL_EOL; SERIAL_EOL;
@ -756,14 +756,14 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0 SERIAL_ECHOPAIR(" M301 P", PID_PARAM(Kp, 0)); // for compatibility with hosts, only echo values for E0
SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0))); SERIAL_ECHOPAIR(" I", unscalePID_i(PID_PARAM(Ki, 0)));
SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0))); SERIAL_ECHOPAIR(" D", unscalePID_d(PID_PARAM(Kd, 0)));
#ifdef PID_ADD_EXTRUSION_RATE #if ENABLED(PID_ADD_EXTRUSION_RATE)
SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0)); SERIAL_ECHOPAIR(" C", PID_PARAM(Kc, 0));
#endif #endif
SERIAL_EOL; SERIAL_EOL;
} }
#endif // PIDTEMP #endif // PIDTEMP
#ifdef PIDTEMPBED #if ENABLED(PIDTEMPBED)
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M304 P", bedKp); SERIAL_ECHOPAIR(" M304 P", bedKp);
SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi)); SERIAL_ECHOPAIR(" I", unscalePID_i(bedKi));
@ -773,7 +773,7 @@ void Config_PrintSettings(bool forReplay) {
#endif // PIDTEMP || PIDTEMPBED #endif // PIDTEMP || PIDTEMPBED
#ifdef HAS_LCD_CONTRAST #if ENABLED(HAS_LCD_CONTRAST)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
SERIAL_ECHOLNPGM("LCD Contrast:"); SERIAL_ECHOLNPGM("LCD Contrast:");
@ -783,7 +783,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_EOL; SERIAL_EOL;
#endif #endif
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
CONFIG_ECHO_START; CONFIG_ECHO_START;
if (!forReplay) { if (!forReplay) {
@ -857,8 +857,8 @@ void Config_PrintSettings(bool forReplay) {
/** /**
* Auto Bed Leveling * Auto Bed Leveling
*/ */
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(ENABLE_AUTO_BED_LEVELING)
#ifdef CUSTOM_M_CODES #if ENABLED(CUSTOM_M_CODES)
if (!forReplay) { if (!forReplay) {
CONFIG_ECHO_START; CONFIG_ECHO_START;
SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); SERIAL_ECHOLNPGM("Z-Probe Offset (mm):");

4
Marlin/configuration_store.h

@ -5,13 +5,13 @@
void Config_ResetDefault(); void Config_ResetDefault();
#ifndef DISABLE_M503 #if DISABLED(DISABLE_M503)
void Config_PrintSettings(bool forReplay=false); void Config_PrintSettings(bool forReplay=false);
#else #else
FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {} FORCE_INLINE void Config_PrintSettings(bool forReplay=false) {}
#endif #endif
#ifdef EEPROM_SETTINGS #if ENABLED(EEPROM_SETTINGS)
void Config_StoreSettings(); void Config_StoreSettings();
void Config_RetrieveSettings(); void Config_RetrieveSettings();
#else #else

Loading…
Cancel
Save