void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0; i<4; i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef ULTIPANEL 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; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP float tmp_motor_current_setting[]=DEFAULT_PWM_MOTOR_CURRENT; motor_current_setting[0] = tmp_motor_current_setting[0]; motor_current_setting[1] = tmp_motor_current_setting[1]; motor_current_setting[2] = tmp_motor_current_setting[2]; #ifdef ENABLE_ULTILCD2 led_brightness_level = 100; led_mode = LED_MODE_ALWAYS_ON; #endif retract_length = 4.5; retract_feedrate = 25 * 60; SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
// Callback for after editing PID i value // grab the pid i value out of the temp variable; scale it; then update the PID driver void copy_and_scalePID_i() { #ifdef PIDTEMP Ki = scalePID_i(raw_Ki); updatePID(); #endif }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; long tmp4[]=DEFAULT_DIGIPOT_MOTOR_CURRENT; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; digipot_motor_current[i]=tmp4[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef DELTA endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0; #endif #ifdef ULTIPANEL 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; #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); st_init(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP zprobe_offset=DEFAULT_Z_PROBE_OFFSET_FROM_EXTRUDER; SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; short i; for (i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef ENABLE_AUTO_BED_LEVELING bed_level_probe_offset[0] = X_PROBE_OFFSET_FROM_EXTRUDER_DEFAULT; bed_level_probe_offset[1] = Y_PROBE_OFFSET_FROM_EXTRUDER_DEFAULT; bed_level_probe_offset[2] = Z_PROBE_OFFSET_FROM_EXTRUDER_DEFAULT; #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP base_min_pos[0] = X_MIN_POS_DEFAULT; base_min_pos[1] = Y_MIN_POS_DEFAULT; base_min_pos[2] = Z_MIN_POS_DEFAULT; base_max_pos[0] = X_MAX_POS_DEFAULT; base_max_pos[1] = Y_MAX_POS_DEFAULT; base_max_pos[2] = Z_MAX_POS_DEFAULT; ECHO_STRING("Hardcoded Default Settings Loaded"); }
/** * M502 - Reset Configuration */ void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef ULTIPANEL #ifdef PRINT_PLA plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP; plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP; plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED; #endif #ifdef PRINT_ABS absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP; absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP; absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; #endif #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif // PID_ADD_EXTRUSION_RATE #endif // PIDTEMP #if HAS_BED_PROBE zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; #endif Config_Postprocess(); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[] = DEFAULT_MAX_FEEDRATE; long tmp3[] = DEFAULT_MAX_ACCELERATION; for (uint8_t i = 0; i < NUM_AXIS; i++) { axis_steps_per_unit[i] = tmp1[i]; max_feedrate[i] = tmp2[i]; max_acceleration_units_per_sq_second[i] = tmp3[i]; #if ENABLED(SCARA) if (i < COUNT(axis_scaling)) axis_scaling[i] = 1; #endif } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration = DEFAULT_ACCELERATION; retract_acceleration = DEFAULT_RETRACT_ACCELERATION; travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; minimumfeedrate = DEFAULT_MINIMUMFEEDRATE; minsegmenttime = DEFAULT_MINSEGMENTTIME; mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk = DEFAULT_XYJERK; max_z_jerk = DEFAULT_ZJERK; max_e_jerk = DEFAULT_EJERK; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; #if ENABLED(MESH_BED_LEVELING) mbl.active = 0; #endif #if ENABLED(AUTO_BED_LEVELING_FEATURE) zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; #endif #if ENABLED(DELTA) endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; delta_radius = DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; recalc_delta_settings(delta_radius, delta_diagonal_rod); #elif ENABLED(Z_DUAL_ENDSTOPS) z_endstop_adj = 0; #endif #if ENABLED(ULTIPANEL) 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; #endif #if ENABLED(HAS_LCD_CONTRAST) lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #if ENABLED(PIDTEMP) #if ENABLED(PID_PARAMS_PER_EXTRUDER) for (int e = 0; e < EXTRUDERS; e++) #else int e = 0; UNUSED(e); // only need to write once #endif { PID_PARAM(Kp, e) = DEFAULT_Kp; PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki); PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd); #if ENABLED(PID_ADD_EXTRUSION_RATE) PID_PARAM(Kc, e) = DEFAULT_Kc; #endif } #if ENABLED(PID_ADD_EXTRUSION_RATE) lpq_len = 20; // default last-position-queue size #endif // call updatePID (similar to when we have processed M301) updatePID(); #endif // PIDTEMP #if ENABLED(PIDTEMPBED) bedKp = DEFAULT_bedKp; bedKi = scalePID_i(DEFAULT_bedKi); bedKd = scalePID_d(DEFAULT_bedKd); #endif #if ENABLED(FWRETRACT) autoretract_enabled = false; retract_length = RETRACT_LENGTH; #if EXTRUDERS > 1 retract_length_swap = RETRACT_LENGTH_SWAP; #endif retract_feedrate = RETRACT_FEEDRATE; retract_zlift = RETRACT_ZLIFT; retract_recover_length = RETRACT_RECOVER_LENGTH; #if EXTRUDERS > 1 retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; #endif retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; #endif volumetric_enabled = false; for (uint8_t q = 0; q < COUNT(filament_size); q++) filament_size[q] = DEFAULT_NOMINAL_FILAMENT_DIA; calculate_volumetric_multipliers(); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef DELTA endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0; delta_radius = DEFAULT_DELTA_RADIUS; delta_diagonal_rod = DEFAULT_DELTA_DIAGONAL_ROD; tower_adj[0] = tower_adj[1] = tower_adj[2] = tower_adj[3] = tower_adj[4] = tower_adj[5] = 0; max_pos[2] = MANUAL_Z_HOME_POS; delta_segments_per_second= DELTA_SEGMENTS_PER_SECOND; set_default_z_probe_offset(); set_delta_constants(); #endif #ifdef ULTIPANEL 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; #endif #ifdef ENABLE_AUTO_BED_LEVELING zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); e1_steps_per_unit=DEFAULT_E1_STEPS_PER_UNIT; // Extruder offset //for(short i=0; i<2; i++) //{ //float e_offset_x[] = EXTRUDER_OFFSET_X; //float e_offset_y[] = EXTRUDER_OFFSET_Y; //extruder_offset[0][i]=e_offset_x[i]; //extruder_offset[1][i]=e_offset_y[i]; //} acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef DELTA endstop_adj[0] = endstop_adj[1] = endstop_adj[2] = 0; #endif #ifdef ULTIPANEL plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP; plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP; plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED; hipsPreheatHotendTemp = HIPS_PREHEAT_HOTEND_TEMP; hipsPreheatHPBTemp = HIPS_PREHEAT_HPB_TEMP; hipsPreheatFanSpeed = HIPS_PREHEAT_FAN_SPEED; absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP; absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP; absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED; bridgePreheatHotendTemp = BRIDGE_PREHEAT_HOTEND_TEMP; bridgePreheatHPBTemp = BRIDGE_PREHEAT_HPB_TEMP; bridgePreheatFanSpeed = BRIDGE_PREHEAT_FAN_SPEED; pctpePreheatHotendTemp = PCTPE_PREHEAT_HOTEND_TEMP; pctpePreheatHPBTemp = PCTPE_PREHEAT_HPB_TEMP; pctpePreheatFanSpeed = PCTPE_PREHEAT_FAN_SPEED; alloy_910PreheatHotendTemp = ALLOY_910_PREHEAT_HOTEND_TEMP; alloy_910PreheatHPBTemp = ALLOY_910_PREHEAT_HPB_TEMP; alloy_910PreheatFanSpeed = ALLOY_910_PREHEAT_FAN_SPEED; //~ bambooPreheatHotendTemp = BAMBOO_PREHEAT_HOTEND_TEMP; //~ bambooPreheatHPBTemp = BAMBOO_PREHEAT_HPB_TEMP; //~ bambooPreheatFanSpeed = BAMBOO_PREHEAT_FAN_SPEED; n_ventPreheatHotendTemp = N_VENT_PREHEAT_HOTEND_TEMP; n_ventPreheatHPBTemp = N_VENT_PREHEAT_HPB_TEMP; n_ventPreheatFanSpeed = N_VENT_PREHEAT_FAN_SPEED; laybrickPreheatHotendTemp = LAYBRICK_PREHEAT_HOTEND_TEMP; laybrickPreheatHPBTemp = LAYBRICK_PREHEAT_HPB_TEMP; laybrickPreheatFanSpeed = LAYBRICK_PREHEAT_FAN_SPEED; laywoodPreheatHotendTemp = LAYWOOD_PREHEAT_HOTEND_TEMP; laywoodPreheatHPBTemp = LAYWOOD_PREHEAT_HPB_TEMP; laywoodPreheatFanSpeed = LAYWOOD_PREHEAT_FAN_SPEED; polycarbonatePreheatHotendTemp = POLYCARBONATE_PREHEAT_HOTEND_TEMP; polycarbonatePreheatHPBTemp = POLYCARBONATE_PREHEAT_HPB_TEMP; polycarbonatePreheatFanSpeed = POLYCARBONATE_PREHEAT_FAN_SPEED; tglasePreheatHotendTemp = TGLASE_PREHEAT_HOTEND_TEMP; tglasePreheatHPBTemp = TGLASE_PREHEAT_HPB_TEMP; tglasePreheatFanSpeed = TGLASE_PREHEAT_FAN_SPEED; #endif #ifdef ENABLE_AUTO_BED_LEVELING zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[] = DEFAULT_MAX_FEEDRATE; long tmp3[] = DEFAULT_MAX_ACCELERATION; for (int i = 0; i < NUM_AXIS; i++) { axis_steps_per_unit[i] = tmp1[i]; max_feedrate[i] = tmp2[i]; max_acceleration_units_per_sq_second[i] = tmp3[i]; #ifdef SCARA if (i < sizeof(axis_scaling) / sizeof(*axis_scaling)) axis_scaling[i] = 1; #endif } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration = DEFAULT_ACCELERATION; retract_acceleration = DEFAULT_RETRACT_ACCELERATION; travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; minimumfeedrate = DEFAULT_MINIMUMFEEDRATE; minsegmenttime = DEFAULT_MINSEGMENTTIME; mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk = DEFAULT_XYJERK; max_z_jerk = DEFAULT_ZJERK; max_e_jerk = DEFAULT_EJERK; add_homing[X_AXIS] = add_homing[Y_AXIS] = add_homing[Z_AXIS] = 0; #ifdef DELTA endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; delta_radius = DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; recalc_delta_settings(delta_radius, delta_diagonal_rod); #endif #ifdef ULTIPANEL 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; #endif #ifdef LEVEL_SENSOR zprobe_zoffset = eeprom::StorageManager::single::instance().getOffset(); #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP #ifdef PID_PARAMS_PER_EXTRUDER for (int e = 0; e < EXTRUDERS; e++) #else int e = 0; // only need to write once #endif { PID_PARAM(Kp, e) = DEFAULT_Kp; PID_PARAM(Ki, e) = scalePID_i(DEFAULT_Ki); PID_PARAM(Kd, e) = scalePID_d(DEFAULT_Kd); #ifdef PID_ADD_EXTRUSION_RATE PID_PARAM(Kc, e) = DEFAULT_Kc; #endif } // call updatePID (similar to when we have processed M301) updatePID(); #endif // PIDTEMP #ifdef FWRETRACT autoretract_enabled = false; retract_length = RETRACT_LENGTH; #if EXTRUDERS > 1 retract_length_swap = RETRACT_LENGTH_SWAP; #endif retract_feedrate = RETRACT_FEEDRATE; retract_zlift = RETRACT_ZLIFT; retract_recover_length = RETRACT_RECOVER_LENGTH; #if EXTRUDERS > 1 retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; #endif retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; #endif volumetric_enabled = false; filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA; #if EXTRUDERS > 1 filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA; #if EXTRUDERS > 2 filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA; #if EXTRUDERS > 3 filament_size[3] = DEFAULT_NOMINAL_FILAMENT_DIA; #endif #endif #endif calculate_volumetric_multipliers(); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; #ifdef HYSTERESIS_H menu_hysteresis_X=X_DEFAULT_HYSTERESIS_MM; menu_hysteresis_Y=Y_DEFAULT_HYSTERESIS_MM; #endif #ifdef ULTIPANEL 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; nylonPreheatHotendTemp = NYLON_PREHEAT_HOTEND_TEMP; nylonPreheatHPBTemp = NYLON_PREHEAT_HPB_TEMP; nylonPreheatFanSpeed = NYLON_PREHEAT_FAN_SPEED; pvaPreheatHotendTemp = PVA_PREHEAT_HOTEND_TEMP; pvaPreheatHPBTemp = PVA_PREHEAT_HPB_TEMP; pvaPreheatFanSpeed = PVA_PREHEAT_FAN_SPEED; int laywoodPreheatHotendTemp = LAYWOOD_PREHEAT_HOTEND_TEMP; int laywoodPreheatHPBTemp = LAYWOOD_PREHEAT_HPB_TEMP; int laywoodPreheatFanSpeed = LAYWOOD_PREHEAT_FAN_SPEED; int laybrickPreheatHotendTemp = LAYBRICK_PREHEAT_HOTEND_TEMP; int laybrickPreheatHPBTemp = LAYBRICK_PREHEAT_HPB_TEMP; int laybrickPreheatFanSpeed = LAYBRICK_PREHEAT_FAN_SPEED; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
/** * M502 - Reset Configuration */ void Config_ResetDefault() { float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[] = DEFAULT_MAX_FEEDRATE; float tmp3[] = DEFAULT_MAX_ACCELERATION; float tmp4[] = DEFAULT_RETRACT_ACCELERATION; float tmp5[] = DEFAULT_EJERK; float tmp6[] = DEFAULT_Kp; float tmp7[] = DEFAULT_Ki; float tmp8[] = DEFAULT_Kd; float tmp9[] = DEFAULT_Kc; #if ENABLED(HOTEND_OFFSET_X) && ENABLED(HOTEND_OFFSET_Y) && ENABLED(HOTEND_OFFSET_Z) float tmp10[] = HOTEND_OFFSET_X; float tmp11[] = HOTEND_OFFSET_Y; float tmp12[] = HOTEND_OFFSET_Z; #endif #if MB(ALLIGATOR) float tmp13[] = MOTOR_CURRENT; for (int8_t i = 0; i < 3 + DRIVER_EXTRUDERS; i++) motor_current[i] = tmp13[i]; #endif for (int8_t i = 0; i < 3 + EXTRUDERS; i++) { planner.axis_steps_per_mm[i] = tmp1[i]; planner.max_feedrate[i] = tmp2[i]; planner.max_acceleration_mm_per_s2[i] = tmp3[i]; } for (int8_t i = 0; i < EXTRUDERS; i++) { planner.retract_acceleration[i] = tmp4[i]; planner.max_e_jerk[i] = tmp5[i]; } for (int8_t i = 0; i < HOTENDS; i++) { #if ENABLED(HOTEND_OFFSET_X) && ENABLED(HOTEND_OFFSET_Y) && ENABLED(HOTEND_OFFSET_Z) hotend_offset[X_AXIS][i] = tmp10[i]; hotend_offset[Y_AXIS][i] = tmp11[i]; hotend_offset[Z_AXIS][i] = tmp12[i]; #else hotend_offset[X_AXIS][i] = 0; hotend_offset[Y_AXIS][i] = 0; hotend_offset[Z_AXIS][i] = 0; #endif } #if MECH(SCARA) for (int8_t i = 0; i < NUM_AXIS; i++) { if (i < COUNT(axis_scaling)) axis_scaling[i] = 1; } #endif // steps per sq second need to be updated to agree with the units per sq second planner.reset_acceleration_rates(); planner.acceleration = DEFAULT_ACCELERATION; planner.travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; planner.min_feedrate = DEFAULT_MINIMUMFEEDRATE; planner.min_segment_time = DEFAULT_MINSEGMENTTIME; planner.min_travel_feedrate = DEFAULT_MINTRAVELFEEDRATE; planner.max_xy_jerk = DEFAULT_XYJERK; planner.max_z_jerk = DEFAULT_ZJERK; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; #if ENABLED(MESH_BED_LEVELING) mbl.reset(); #endif #if HAS(BED_PROBE) zprobe_zoffset = Z_PROBE_OFFSET_FROM_NOZZLE; #endif #if MECH(DELTA) delta_radius = DEFAULT_DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; endstop_adj[0] = TOWER_A_ENDSTOP_ADJ; endstop_adj[1] = TOWER_B_ENDSTOP_ADJ; endstop_adj[2] = TOWER_C_ENDSTOP_ADJ; tower_adj[0] = TOWER_A_POSITION_ADJ; tower_adj[1] = TOWER_B_POSITION_ADJ; tower_adj[2] = TOWER_C_POSITION_ADJ; tower_adj[3] = TOWER_A_RADIUS_ADJ; tower_adj[4] = TOWER_B_RADIUS_ADJ; tower_adj[5] = TOWER_C_RADIUS_ADJ; diagrod_adj[0] = TOWER_A_DIAGROD_ADJ; diagrod_adj[1] = TOWER_B_DIAGROD_ADJ; diagrod_adj[2] = TOWER_C_DIAGROD_ADJ; #endif #if ENABLED(ULTIPANEL) 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; gumPreheatHotendTemp = GUM_PREHEAT_HOTEND_TEMP; gumPreheatHPBTemp = GUM_PREHEAT_HPB_TEMP; gumPreheatFanSpeed = GUM_PREHEAT_FAN_SPEED; #endif #if HAS(LCD_CONTRAST) lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #if ENABLED(PIDTEMP) for (int8_t h = 0; h < HOTENDS; h++) { Kp[h] = tmp6[h]; Ki[h] = scalePID_i(tmp7[h]); Kd[h] = scalePID_d(tmp8[h]); Kc[h] = tmp9[h]; } #if ENABLED(PID_ADD_EXTRUSION_RATE) lpq_len = 20; // default last-position-queue size #endif #endif // PIDTEMP #if ENABLED(PIDTEMPBED) bedKp = DEFAULT_bedKp; bedKi = scalePID_i(DEFAULT_bedKi); bedKd = scalePID_d(DEFAULT_bedKd); #endif #if ENABLED(PIDTEMPCHAMBER) chamberKp = DEFAULT_chamberKp; chamberKi = scalePID_i(DEFAULT_chamberKi); chamberKd = scalePID_d(DEFAULT_chamberKd); #endif #if ENABLED(PIDTEMPCOOLER) coolerKp = DEFAULT_coolerKp; coolerKi = scalePID_i(DEFAULT_coolerKi); coolerKd = scalePID_d(DEFAULT_coolerKd); #endif #if ENABLED(FWRETRACT) autoretract_enabled = false; retract_length = RETRACT_LENGTH; #if EXTRUDERS > 1 retract_length_swap = RETRACT_LENGTH_SWAP; #endif retract_feedrate = RETRACT_FEEDRATE; retract_zlift = RETRACT_ZLIFT; retract_recover_length = RETRACT_RECOVER_LENGTH; #if EXTRUDERS > 1 retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; #endif retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; #endif volumetric_enabled = false; #if ENABLED(IDLE_OOZING_PREVENT) IDLE_OOZING_enabled = true; #endif Config_Postprocess(); ECHO_LM(DB, "Hardcoded Default Settings Loaded"); }
void Config_ResetDefault() { float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[]=DEFAULT_MAX_FEEDRATE; long tmp3[]=DEFAULT_MAX_ACCELERATION; for (short i=0;i<4;i++) { axis_steps_per_unit[i]=tmp1[i]; max_feedrate[i]=tmp2[i]; max_acceleration_units_per_sq_second[i]=tmp3[i]; #ifdef SCARA axis_scaling[i]=1; #endif } // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration=DEFAULT_ACCELERATION; retract_acceleration=DEFAULT_RETRACT_ACCELERATION; minimumfeedrate=DEFAULT_MINIMUMFEEDRATE; minsegmenttime=DEFAULT_MINSEGMENTTIME; mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; max_e_jerk=DEFAULT_EJERK; add_homing[X_AXIS] = add_homing[Y_AXIS] = add_homing[Z_AXIS] = 0; #ifdef DELTA endstop_adj[X_AXIS] = endstop_adj[Y_AXIS] = endstop_adj[Z_AXIS] = 0; delta_radius= DELTA_RADIUS; delta_diagonal_rod= DELTA_DIAGONAL_ROD; delta_segments_per_second= DELTA_SEGMENTS_PER_SECOND; recalc_delta_settings(delta_radius, delta_diagonal_rod); #endif #ifdef ULTIPANEL 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; #endif #ifdef ENABLE_AUTO_BED_LEVELING zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER; #endif #ifdef DOGLCD lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #ifdef PIDTEMP Kp = DEFAULT_Kp; Ki = scalePID_i(DEFAULT_Ki); Kd = scalePID_d(DEFAULT_Kd); // call updatePID (similar to when we have processed M301) updatePID(); #ifdef PID_ADD_EXTRUSION_RATE Kc = DEFAULT_Kc; #endif//PID_ADD_EXTRUSION_RATE #endif//PIDTEMP #ifdef FWRETRACT autoretract_enabled = false; retract_length = RETRACT_LENGTH; #if EXTRUDERS > 1 retract_length_swap = RETRACT_LENGTH_SWAP; #endif retract_feedrate = RETRACT_FEEDRATE; retract_zlift = RETRACT_ZLIFT; retract_recover_length = RETRACT_RECOVER_LENGTH; #if EXTRUDERS > 1 retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; #endif retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; #endif volumetric_enabled = false; filament_size[0] = DEFAULT_NOMINAL_FILAMENT_DIA; #if EXTRUDERS > 1 filament_size[1] = DEFAULT_NOMINAL_FILAMENT_DIA; #if EXTRUDERS > 2 filament_size[2] = DEFAULT_NOMINAL_FILAMENT_DIA; #endif #endif calculate_volumetric_multipliers(); SERIAL_ECHO_START; SERIAL_ECHOLNPGM("Hardcoded Default Settings Loaded"); }
// Callback for after editing PID i value // grab the pid i value out of the temp variable; scale it; then update the PID driver void copy_and_scalePID_i() { Ki = scalePID_i(raw_Ki); updatePID(); }
/** * Reset Configuration Settings - M502 */ void Config_ResetDefault() { float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT; float tmp2[] = DEFAULT_MAX_FEEDRATE; float tmp3[] = DEFAULT_MAX_ACCELERATION; float tmp4[] = DEFAULT_RETRACT_ACCELERATION; float tmp5[] = DEFAULT_EJERK; #if ENABLED(PIDTEMP) float tmp6[] = DEFAULT_Kp; float tmp7[] = DEFAULT_Ki; float tmp8[] = DEFAULT_Kd; float tmp9[] = DEFAULT_Kc; #endif // PIDTEMP #if ENABLED(HOTEND_OFFSET_X) && ENABLED(HOTEND_OFFSET_Y) && ENABLED(HOTEND_OFFSET_Z) float tmp10[] = HOTEND_OFFSET_X; float tmp11[] = HOTEND_OFFSET_Y; float tmp12[] = HOTEND_OFFSET_Z; #else float tmp10[] = {0}; float tmp11[] = {0}; float tmp12[] = {0}; #endif #if MB(ALLIGATOR) float tmp13[] = MOTOR_CURRENT; #endif for (int8_t i = 0; i < 3 + EXTRUDERS; i++) { short max_i; max_i = sizeof(tmp1) / sizeof(*tmp1); if(i < max_i) axis_steps_per_unit[i] = tmp1[i]; else axis_steps_per_unit[i] = tmp1[max_i - 1]; max_i = sizeof(tmp2) / sizeof(*tmp2); if(i < max_i) max_feedrate[i] = tmp2[i]; else max_feedrate[i] = tmp2[max_i - 1]; max_i = sizeof(tmp3) / sizeof(*tmp3); if(i < max_i) max_acceleration_units_per_sq_second[i] = tmp3[i]; else max_acceleration_units_per_sq_second[i] = tmp3[max_i - 1]; if(i < EXTRUDERS) { max_i = sizeof(tmp4) / sizeof(*tmp4); if(i < max_i) retract_acceleration[i] = tmp4[i]; else retract_acceleration[i] = tmp4[max_i - 1]; max_i = sizeof(tmp5) / sizeof(*tmp5); if(i < max_i) max_e_jerk[i] = tmp5[i]; else max_e_jerk[i] = tmp5[max_i - 1]; max_i = sizeof(tmp10) / sizeof(*tmp10); if(i < max_i) hotend_offset[X_AXIS][i] = tmp10[i]; else hotend_offset[X_AXIS][i] = 0; max_i = sizeof(tmp11) / sizeof(*tmp11); if(i < max_i) hotend_offset[Y_AXIS][i] = tmp11[i]; else hotend_offset[Y_AXIS][i] = 0; max_i = sizeof(tmp12) / sizeof(*tmp12); if(i < max_i) hotend_offset[Z_AXIS][i] = tmp12[i]; else hotend_offset[Z_AXIS][i] = 0; } #if MB(ALLIGATOR) max_i = sizeof(tmp13) / sizeof(*tmp13); if(i < max_i) motor_current[i] = tmp13[i]; else motor_current[i] = tmp13[max_i - 1]; #endif } #if MECH(SCARA) for (int8_t i = 0; i < NUM_AXIS; i++) { if (i < COUNT(axis_scaling)) axis_scaling[i] = 1; } #endif // steps per sq second need to be updated to agree with the units per sq second reset_acceleration_rates(); acceleration = DEFAULT_ACCELERATION; travel_acceleration = DEFAULT_TRAVEL_ACCELERATION; minimumfeedrate = DEFAULT_MINIMUMFEEDRATE; minsegmenttime = DEFAULT_MINSEGMENTTIME; mintravelfeedrate = DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk = DEFAULT_XYJERK; max_z_jerk = DEFAULT_ZJERK; home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0; #if ENABLED(AUTO_BED_LEVELING_FEATURE) zprobe_zoffset = Z_PROBE_OFFSET_FROM_EXTRUDER; #elif !MECH(DELTA) zprobe_zoffset = 0; #endif #if MECH(DELTA) delta_radius = DEFAULT_DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; endstop_adj[0] = TOWER_A_ENDSTOP_ADJ; endstop_adj[1] = TOWER_B_ENDSTOP_ADJ; endstop_adj[2] = TOWER_C_ENDSTOP_ADJ; tower_adj[0] = TOWER_A_POSITION_ADJ; tower_adj[1] = TOWER_B_POSITION_ADJ; tower_adj[2] = TOWER_C_POSITION_ADJ; tower_adj[3] = TOWER_A_RADIUS_ADJ; tower_adj[4] = TOWER_B_RADIUS_ADJ; tower_adj[5] = TOWER_C_RADIUS_ADJ; diagrod_adj[0] = TOWER_A_DIAGROD_ADJ; diagrod_adj[1] = TOWER_B_DIAGROD_ADJ; diagrod_adj[2] = TOWER_C_DIAGROD_ADJ; z_probe_offset[0] = X_PROBE_OFFSET_FROM_EXTRUDER; z_probe_offset[1] = Y_PROBE_OFFSET_FROM_EXTRUDER; z_probe_offset[2] = Z_PROBE_OFFSET_FROM_EXTRUDER; set_delta_constants(); #endif #if ENABLED(ULTIPANEL) 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; gumPreheatHotendTemp = GUM_PREHEAT_HOTEND_TEMP; gumPreheatHPBTemp = GUM_PREHEAT_HPB_TEMP; gumPreheatFanSpeed = GUM_PREHEAT_FAN_SPEED; #endif #if HAS(LCD_CONTRAST) lcd_contrast = DEFAULT_LCD_CONTRAST; #endif #if ENABLED(PIDTEMP) for (int8_t h = 0; h < HOTENDS; h++) { Kp[h] = tmp6[h]; Ki[h] = scalePID_i(tmp7[h]); Kd[h] = scalePID_d(tmp8[h]); Kc[h] = tmp9[h]; } #if ENABLED(PID_ADD_EXTRUSION_RATE) lpq_len = 20; // default last-position-queue size #endif // call updatePID (similar to when we have processed M301) updatePID(); #endif // PIDTEMP #if ENABLED(PIDTEMPBED) bedKp = DEFAULT_bedKp; bedKi = scalePID_i(DEFAULT_bedKi); bedKd = scalePID_d(DEFAULT_bedKd); #endif #if ENABLED(FWRETRACT) autoretract_enabled = false; retract_length = RETRACT_LENGTH; #if EXTRUDERS > 1 retract_length_swap = RETRACT_LENGTH_SWAP; #endif retract_feedrate = RETRACT_FEEDRATE; retract_zlift = RETRACT_ZLIFT; retract_recover_length = RETRACT_RECOVER_LENGTH; #if EXTRUDERS > 1 retract_recover_length_swap = RETRACT_RECOVER_LENGTH_SWAP; #endif retract_recover_feedrate = RETRACT_RECOVER_FEEDRATE; #endif volumetric_enabled = false; calculate_volumetric_multipliers(); #if ENABLED(IDLE_OOZING_PREVENT) IDLE_OOZING_enabled = true; #endif ECHO_LM(DB, "Hardcoded Default Settings Loaded"); }