Fixup of 8df0181
(turning off the export of machine limits)
This should solve #1212 for good
This commit is contained in:
parent
6ed25f6e1c
commit
b42a12db66
4 changed files with 7 additions and 7 deletions
|
@ -819,7 +819,7 @@ namespace DoExport {
|
|||
// this->print_machine_envelope(file, print);
|
||||
// shall be adjusted as well to produce a G-code block compatible with the particular firmware flavor.
|
||||
if (config.gcode_flavor.value == gcfMarlin) {
|
||||
if (config.machine_limits_type.value != MachineLimitsUsage::Ignore) {
|
||||
if (config.machine_limits_usage.value != MachineLimitsUsage::Ignore) {
|
||||
normal_time_estimator.set_max_acceleration((float)config.machine_max_acceleration_extruding.values[0]);
|
||||
normal_time_estimator.set_retract_acceleration((float)config.machine_max_acceleration_retracting.values[0]);
|
||||
normal_time_estimator.set_minimum_feedrate((float)config.machine_min_extruding_rate.values[0]);
|
||||
|
@ -844,7 +844,7 @@ namespace DoExport {
|
|||
silent_time_estimator.set_dialect(config.gcode_flavor);
|
||||
silent_time_estimator.set_extrusion_axis(config.get_extrusion_axis()[0]);
|
||||
|
||||
if (config.machine_limits_type.value != MachineLimitsUsage::Ignore) {
|
||||
if (config.machine_limits_usage.value != MachineLimitsUsage::Ignore) {
|
||||
/* "Stealth mode" values can be just a copy of "normal mode" values
|
||||
* (when they aren't input for a printer preset).
|
||||
* Thus, use back value from values, instead of second one, which could be absent
|
||||
|
@ -1700,7 +1700,7 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc
|
|||
// Do not process this piece of G-code by the time estimator, it already knows the values through another sources.
|
||||
void GCode::print_machine_envelope(FILE *file, Print &print)
|
||||
{
|
||||
if (print.config().gcode_flavor.value == gcfMarlin && print.config().machine_limits_type.value == MachineLimitsUsage::EmitToGCode) {
|
||||
if (print.config().gcode_flavor.value == gcfMarlin && print.config().machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) {
|
||||
fprintf(file, "M201 X%d Y%d Z%d E%d ; sets maximum accelerations, mm/sec^2\n",
|
||||
int(print.config().machine_max_acceleration_x.values.front() + 0.5),
|
||||
int(print.config().machine_max_acceleration_y.values.front() + 0.5),
|
||||
|
|
|
@ -505,7 +505,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||
m_filament_diameters[i] = static_cast<float>(config.filament_diameter.values[i]);
|
||||
}
|
||||
|
||||
if (config.machine_limits_type.value != MachineLimitsUsage::Ignore)
|
||||
if (config.machine_limits_usage.value != MachineLimitsUsage::Ignore)
|
||||
m_time_processor.machine_limits = reinterpret_cast<const MachineEnvelopeConfig&>(config);
|
||||
|
||||
// Filament load / unload times are not specific to a firmware flavor. Let anybody use it if they find it useful.
|
||||
|
|
|
@ -20,7 +20,7 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
|||
this->config.apply(print_config, true);
|
||||
m_extrusion_axis = this->config.get_extrusion_axis();
|
||||
m_single_extruder_multi_material = print_config.single_extruder_multi_material.value;
|
||||
m_max_acceleration = std::lrint((print_config.gcode_flavor.value == gcfMarlin && print_config.machine_limits_type.value == MachineLimitsUsage::EmitToGCode) ?
|
||||
m_max_acceleration = std::lrint((print_config.gcode_flavor.value == gcfMarlin && print_config.machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) ?
|
||||
print_config.machine_max_acceleration_extruding.values.front() : 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -615,7 +615,7 @@ class MachineEnvelopeConfig : public StaticPrintConfig
|
|||
STATIC_PRINT_CONFIG_CACHE(MachineEnvelopeConfig)
|
||||
public:
|
||||
// Allowing the machine limits to be completely ignored or used just for time estimator.
|
||||
ConfigOptionEnum<MachineLimitsUsage> machine_limits_type;
|
||||
ConfigOptionEnum<MachineLimitsUsage> machine_limits_usage;
|
||||
// M201 X... Y... Z... E... [mm/sec^2]
|
||||
ConfigOptionFloats machine_max_acceleration_x;
|
||||
ConfigOptionFloats machine_max_acceleration_y;
|
||||
|
@ -643,7 +643,7 @@ public:
|
|||
protected:
|
||||
void initialize(StaticCacheBase &cache, const char *base_ptr)
|
||||
{
|
||||
OPT_PTR(machine_limits_type);
|
||||
OPT_PTR(machine_limits_usage);
|
||||
OPT_PTR(machine_max_acceleration_x);
|
||||
OPT_PTR(machine_max_acceleration_y);
|
||||
OPT_PTR(machine_max_acceleration_z);
|
||||
|
|
Loading…
Reference in a new issue