Drop extra initializers for vars initialized by EEPROM code

master
Scott Lahteine 7 years ago
parent 7afafb05b8
commit b0173ccdb9

@ -427,16 +427,10 @@ static float saved_feedrate_mm_s;
int16_t feedrate_percentage = 100, saved_feedrate_percentage, int16_t feedrate_percentage = 100, saved_feedrate_percentage,
flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100);
// Initialized by settings.load()
bool axis_relative_modes[] = AXIS_RELATIVE_MODES, bool axis_relative_modes[] = AXIS_RELATIVE_MODES,
volumetric_enabled = volumetric_enabled;
#if ENABLED(VOLUMETRIC_DEFAULT_ON) float filament_size[EXTRUDERS], volumetric_multiplier[EXTRUDERS];
true
#else
false
#endif
;
float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA),
volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0);
#if HAS_WORKSPACE_OFFSET #if HAS_WORKSPACE_OFFSET
#if HAS_POSITION_SHIFT #if HAS_POSITION_SHIFT
@ -513,7 +507,7 @@ static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL
static uint8_t target_extruder; static uint8_t target_extruder;
#if HAS_BED_PROBE #if HAS_BED_PROBE
float zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; float zprobe_zoffset; // Initialized by settings.load()
#endif #endif
#if HAS_ABL #if HAS_ABL
@ -542,18 +536,12 @@ static uint8_t target_extruder;
#endif #endif
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(Z_DUAL_ENDSTOPS)
float z_endstop_adj = float z_endstop_adj;
#ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
Z_DUAL_ENDSTOPS_ADJUSTMENT
#else
0
#endif
;
#endif #endif
// Extruder offsets // Extruder offsets
#if HOTENDS > 1 #if HOTENDS > 1
float hotend_offset[XYZ][HOTENDS]; float hotend_offset[XYZ][HOTENDS]; // Initialized by settings.load()
#endif #endif
#if HAS_Z_SERVO_ENDSTOP #if HAS_Z_SERVO_ENDSTOP
@ -596,8 +584,7 @@ static uint8_t target_extruder;
float delta[ABC], float delta[ABC],
endstop_adj[ABC] = { 0 }; endstop_adj[ABC] = { 0 };
// These values are loaded or reset at boot time when setup() calls // Initialized by settings.load()
// settings.load(), which calls recalc_delta_settings().
float delta_radius, float delta_radius,
delta_tower_angle_trim[2], delta_tower_angle_trim[2],
delta_tower[ABC][2], delta_tower[ABC][2],

@ -38,14 +38,7 @@ Endstops endstops;
// public: // public:
bool Endstops::enabled = true, bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
Endstops::enabled_globally =
#if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
(true)
#else
(false)
#endif
;
volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
#if ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(Z_DUAL_ENDSTOPS)

@ -95,6 +95,8 @@ uint32_t Planner::max_acceleration_steps_per_s2[XYZE_N],
Planner::max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software Planner::max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software
millis_t Planner::min_segment_time; millis_t Planner::min_segment_time;
// Initialized by settings.load()
float Planner::min_feedrate_mm_s, float Planner::min_feedrate_mm_s,
Planner::acceleration, // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX Planner::acceleration, // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX
Planner::retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX Planner::retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
@ -111,7 +113,7 @@ float Planner::min_feedrate_mm_s,
#endif #endif
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
float Planner::z_fade_height, float Planner::z_fade_height, // Initialized by settings.load()
Planner::inverse_z_fade_height; Planner::inverse_z_fade_height;
#endif #endif
@ -143,8 +145,8 @@ float Planner::previous_speed[NUM_AXIS],
#endif #endif
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
float Planner::extruder_advance_k = LIN_ADVANCE_K, float Planner::extruder_advance_k, // Initialized by settings.load()
Planner::advance_ed_ratio = LIN_ADVANCE_E_D_RATIO, Planner::advance_ed_ratio, // Initialized by settings.load()
Planner::position_float[NUM_AXIS] = { 0 }; Planner::position_float[NUM_AXIS] = { 0 };
#endif #endif

@ -77,7 +77,7 @@ block_t* Stepper::current_block = NULL; // A pointer to the block currently bei
#endif #endif
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM
uint32_t Stepper::motor_current_setting[3] = PWM_MOTOR_CURRENT; uint32_t Stepper::motor_current_setting[3]; // Initialized by settings.load()
#endif #endif
// private: // private:

@ -73,28 +73,24 @@ int16_t Temperature::current_temperature_raw[HOTENDS] = { 0 },
int16_t Temperature::target_temperature_bed = 0; int16_t Temperature::target_temperature_bed = 0;
#endif #endif
// Initialized by settings.load()
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
#if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1 #if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
float Temperature::Kp[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kp), float Temperature::Kp[HOTENDS], Temperature::Ki[HOTENDS], Temperature::Kd[HOTENDS];
Temperature::Ki[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Ki) * (PID_dT)),
Temperature::Kd[HOTENDS] = ARRAY_BY_HOTENDS1((DEFAULT_Kd) / (PID_dT));
#if ENABLED(PID_EXTRUSION_SCALING) #if ENABLED(PID_EXTRUSION_SCALING)
float Temperature::Kc[HOTENDS] = ARRAY_BY_HOTENDS1(DEFAULT_Kc); float Temperature::Kc[HOTENDS];
#endif #endif
#else #else
float Temperature::Kp = DEFAULT_Kp, float Temperature::Kp, Temperature::Ki, Temperature::Kd;
Temperature::Ki = (DEFAULT_Ki) * (PID_dT),
Temperature::Kd = (DEFAULT_Kd) / (PID_dT);
#if ENABLED(PID_EXTRUSION_SCALING) #if ENABLED(PID_EXTRUSION_SCALING)
float Temperature::Kc = DEFAULT_Kc; float Temperature::Kc;
#endif #endif
#endif #endif
#endif #endif
// Initialized by settings.load()
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
float Temperature::bedKp = DEFAULT_bedKp, float Temperature::bedKp, Temperature::bedKi, Temperature::bedKd;
Temperature::bedKi = ((DEFAULT_bedKi) * PID_dT),
Temperature::bedKd = ((DEFAULT_bedKd) / PID_dT);
#endif #endif
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)

@ -49,6 +49,7 @@
bool ubl_lcd_map_control = false; bool ubl_lcd_map_control = false;
#endif #endif
// Initialized by settings.load()
int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2]; int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2];
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT) #if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)

@ -202,7 +202,7 @@
#include "utf_mapper.h" #include "utf_mapper.h"
uint16_t lcd_contrast; uint16_t lcd_contrast; // Initialized by settings.load()
static char currentfont = 0; static char currentfont = 0;
// The current graphical page being rendered // The current graphical page being rendered

Loading…
Cancel
Save