Browse Source

Merge pull request #2225 from Wurstnase/naming

consistency name for multiplier
pull/1/head
AnHardt 10 years ago
parent
commit
35af5ef23e
  1. 2
      Marlin/Marlin.h
  2. 8
      Marlin/Marlin_main.cpp
  3. 4
      Marlin/planner.cpp
  4. 10
      Marlin/ultralcd.cpp

2
Marlin/Marlin.h

@ -269,7 +269,7 @@ extern float homing_feedrate[];
extern bool axis_relative_modes[]; extern bool axis_relative_modes[];
extern int feedrate_multiplier; extern int feedrate_multiplier;
extern bool volumetric_enabled; extern bool volumetric_enabled;
extern int extruder_multiply[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually extern int extruder_multiplier[EXTRUDERS]; // sets extrude multiply factor (in percent) for each extruder individually
extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder. extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
extern float current_position[NUM_AXIS]; extern float current_position[NUM_AXIS];

8
Marlin/Marlin_main.cpp

@ -251,7 +251,7 @@ float homing_feedrate[] = HOMING_FEEDRATE;
bool axis_relative_modes[] = AXIS_RELATIVE_MODES; bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
int feedrate_multiplier = 100; //100->1 200->2 int feedrate_multiplier = 100; //100->1 200->2
int saved_feedrate_multiplier; int saved_feedrate_multiplier;
int extruder_multiply[EXTRUDERS] = ARRAY_BY_EXTRUDERS(100, 100, 100, 100); int extruder_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS(100, 100, 100, 100);
bool volumetric_enabled = false; bool volumetric_enabled = false;
float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS(DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA); float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS(DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA, DEFAULT_NOMINAL_FILAMENT_DIA);
float volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS(1.0, 1.0, 1.0, 1.0); float volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS(1.0, 1.0, 1.0, 1.0);
@ -4187,10 +4187,10 @@ inline void gcode_M221() {
int sval = code_value(); int sval = code_value();
if (code_seen('T')) { if (code_seen('T')) {
if (setTargetedHotend(221)) return; if (setTargetedHotend(221)) return;
extruder_multiply[target_extruder] = sval; extruder_multiplier[target_extruder] = sval;
} }
else { else {
extruder_multiply[active_extruder] = sval; extruder_multiplier[active_extruder] = sval;
} }
} }
} }
@ -4637,7 +4637,7 @@ inline void gcode_M400() { st_synchronize(); }
//SERIAL_PROTOCOLPGM("Filament dia (measured mm):"); //SERIAL_PROTOCOLPGM("Filament dia (measured mm):");
//SERIAL_PROTOCOL(filament_width_meas); //SERIAL_PROTOCOL(filament_width_meas);
//SERIAL_PROTOCOLPGM("Extrusion ratio(%):"); //SERIAL_PROTOCOLPGM("Extrusion ratio(%):");
//SERIAL_PROTOCOL(extruder_multiply[active_extruder]); //SERIAL_PROTOCOL(extruder_multiplier[active_extruder]);
} }
/** /**

4
Marlin/planner.cpp

@ -540,7 +540,7 @@ float junction_deviation = 0.1;
block->steps[Z_AXIS] = labs(dz); block->steps[Z_AXIS] = labs(dz);
block->steps[E_AXIS] = labs(de); block->steps[E_AXIS] = labs(de);
block->steps[E_AXIS] *= volumetric_multiplier[extruder]; block->steps[E_AXIS] *= volumetric_multiplier[extruder];
block->steps[E_AXIS] *= extruder_multiply[extruder]; block->steps[E_AXIS] *= extruder_multiplier[extruder];
block->steps[E_AXIS] /= 100; block->steps[E_AXIS] /= 100;
block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS]))); block->step_event_count = max(block->steps[X_AXIS], max(block->steps[Y_AXIS], max(block->steps[Z_AXIS], block->steps[E_AXIS])));
@ -674,7 +674,7 @@ float junction_deviation = 0.1;
delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS]; delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
#endif #endif
delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS]; delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiply[extruder] / 100.0; delta_mm[E_AXIS] = (de / axis_steps_per_unit[E_AXIS]) * volumetric_multiplier[extruder] * extruder_multiplier[extruder] / 100.0;
if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) { if (block->steps[X_AXIS] <= dropsegments && block->steps[Y_AXIS] <= dropsegments && block->steps[Z_AXIS] <= dropsegments) {
block->millimeters = fabs(delta_mm[E_AXIS]); block->millimeters = fabs(delta_mm[E_AXIS]);

10
Marlin/ultralcd.cpp

@ -488,16 +488,16 @@ static void lcd_tune_menu() {
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15); MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
#endif #endif
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255); MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_FAN_SPEED, &fanSpeed, 0, 255);
MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiply[active_extruder], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW, &extruder_multiplier[active_extruder], 10, 999);
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N0, &extruder_multiply[0], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N0, &extruder_multiplier[0], 10, 999);
#if TEMP_SENSOR_1 != 0 #if TEMP_SENSOR_1 != 0
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N1, &extruder_multiply[1], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N1, &extruder_multiplier[1], 10, 999);
#endif #endif
#if TEMP_SENSOR_2 != 0 #if TEMP_SENSOR_2 != 0
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N2, &extruder_multiply[2], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N2, &extruder_multiplier[2], 10, 999);
#endif #endif
#if TEMP_SENSOR_3 != 0 #if TEMP_SENSOR_3 != 0
MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &extruder_multiply[3], 10, 999); MENU_ITEM_EDIT(int3, MSG_FLOW MSG_N3, &extruder_multiplier[3], 10, 999);
#endif #endif
#ifdef BABYSTEPPING #ifdef BABYSTEPPING

Loading…
Cancel
Save