From e14c122d1233a7af9bfe63425d3bfb4e5906ede3 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Mon, 26 Oct 2020 11:44:38 +0100 Subject: [PATCH] Fixed percentage value exported into gcode M73 lines --- src/libslic3r/GCode/GCodeProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 665316296f..26391e06b8 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -400,7 +400,7 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename) const TimeMachine& machine = machines[i]; if (machine.enabled && g1_lines_counter < machine.g1_times_cache.size()) { float elapsed_time = machine.g1_times_cache[g1_lines_counter]; - std::pair to_export = { int(::roundf(100.0f * elapsed_time / machine.time)), + std::pair to_export = { int(100.0f * elapsed_time / machine.time), time_in_minutes(machine.time - elapsed_time) }; if (last_exported[i] != to_export) { export_line += format_line_M73(machine.line_m73_mask.c_str(),