Use cs.volumetric_enabled from ConfigurationStore.
This commit is contained in:
parent
a201128b20
commit
e225e9cab0
@ -144,7 +144,7 @@ void Config_PrintSettings(uint8_t level)
|
||||
printf_P(PSTR("%SMulti-extruder settings:\n%S Swap retract length (mm): %.2f\n%S Swap rec. addl. length (mm): %.2f\n"),
|
||||
echomagic, echomagic, retract_length_swap, echomagic, retract_recover_length_swap);
|
||||
#endif
|
||||
if (volumetric_enabled) {
|
||||
if (cs.volumetric_enabled) {
|
||||
printf_P(PSTR("%SFilament settings:\n%S M200 D%.2f\n"),
|
||||
echomagic, echomagic, filament_size[0]);
|
||||
#if EXTRUDERS > 1
|
||||
|
@ -269,7 +269,6 @@ extern float homing_feedrate[];
|
||||
extern bool axis_relative_modes[];
|
||||
extern int feedmultiply;
|
||||
extern int extrudemultiply; // Sets extrude multiply factor (in percent) for all extruders
|
||||
extern bool volumetric_enabled;
|
||||
extern int extruder_multiply[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 volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
|
||||
|
@ -368,7 +368,6 @@ char dir_names[3][9];
|
||||
|
||||
bool sortAlpha = false;
|
||||
|
||||
bool volumetric_enabled = false;
|
||||
float filament_size[EXTRUDERS] = { DEFAULT_NOMINAL_FILAMENT_DIA
|
||||
#if EXTRUDERS > 1
|
||||
, DEFAULT_NOMINAL_FILAMENT_DIA
|
||||
@ -5847,7 +5846,7 @@ Sigma_Exit:
|
||||
// setting any extruder filament size disables volumetric on the assumption that
|
||||
// slicers either generate in extruder values as cubic mm or as as filament feeds
|
||||
// for all extruders
|
||||
volumetric_enabled = false;
|
||||
cs.volumetric_enabled = false;
|
||||
} else {
|
||||
filament_size[extruder] = (float)code_value();
|
||||
// make sure all extruders have some sane value for the filament size
|
||||
@ -5858,7 +5857,7 @@ Sigma_Exit:
|
||||
filament_size[2] = (filament_size[2] == 0.0 ? DEFAULT_NOMINAL_FILAMENT_DIA : filament_size[2]);
|
||||
#endif
|
||||
#endif
|
||||
volumetric_enabled = true;
|
||||
cs.volumetric_enabled = true;
|
||||
}
|
||||
} else {
|
||||
//reserved for setting filament diameter via UFID or filament measuring device
|
||||
@ -7646,7 +7645,7 @@ void save_statistics(unsigned long _total_filament_used, unsigned long _total_pr
|
||||
|
||||
float calculate_extruder_multiplier(float diameter) {
|
||||
float out = 1.f;
|
||||
if (volumetric_enabled && diameter > 0.f) {
|
||||
if (cs.volumetric_enabled && diameter > 0.f) {
|
||||
float area = M_PI * diameter * diameter * 0.25;
|
||||
out = 1.f / area;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user