mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
#3287 - Fixed GCodeAnalyzer and GCodeTimeEstimator when using Machinekit and Mach3/Linuxcnc gcode flavours
This commit is contained in:
@@ -803,6 +803,7 @@ void GCode::_do_export(Print& print, FILE* file)
|
||||
// resets time estimators
|
||||
m_normal_time_estimator.reset();
|
||||
m_normal_time_estimator.set_dialect(print.config().gcode_flavor);
|
||||
m_normal_time_estimator.set_extrusion_axis(print.config().get_extrusion_axis()[0]);
|
||||
m_silent_time_estimator_enabled = (print.config().gcode_flavor == gcfMarlin) && print.config().silent_mode;
|
||||
|
||||
// Until we have a UI support for the other firmwares than the Marlin, use the hardcoded default values
|
||||
@@ -832,6 +833,7 @@ void GCode::_do_export(Print& print, FILE* file)
|
||||
{
|
||||
m_silent_time_estimator.reset();
|
||||
m_silent_time_estimator.set_dialect(print.config().gcode_flavor);
|
||||
m_silent_time_estimator.set_extrusion_axis(print.config().get_extrusion_axis()[0]);
|
||||
/* "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
|
||||
@@ -881,6 +883,9 @@ void GCode::_do_export(Print& print, FILE* file)
|
||||
}
|
||||
m_analyzer.set_extruder_offsets(extruder_offsets);
|
||||
|
||||
// tell analyzer about the extrusion axis
|
||||
m_analyzer.set_extrusion_axis(print.config().get_extrusion_axis()[0]);
|
||||
|
||||
// send extruders count to analyzer to allow it to detect invalid extruder idxs
|
||||
const ConfigOptionStrings* extruders_opt = dynamic_cast<const ConfigOptionStrings*>(print.config().option("extruder_colour"));
|
||||
const ConfigOptionStrings* filamemts_opt = dynamic_cast<const ConfigOptionStrings*>(print.config().option("filament_colour"));
|
||||
|
||||
Reference in New Issue
Block a user