mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
ENABLE_GCODE_VIEWER -> Integration of time estimator into GCodeProcessor
This commit is contained in:
parent
755fdb5ab4
commit
3a88e69896
9 changed files with 1631 additions and 704 deletions
|
@ -678,21 +678,6 @@ namespace Slic3r {
|
|||
return _get_time_minutes(get_time());
|
||||
}
|
||||
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> GCodeTimeEstimator::get_custom_gcode_times(bool include_remaining) const
|
||||
{
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> ret;
|
||||
|
||||
float total_time = 0.0f;
|
||||
for (const auto& [type, time] : m_custom_gcode_times) {
|
||||
float remaining = include_remaining ? m_time - total_time : 0.0f;
|
||||
ret.push_back({ type, { time, remaining } });
|
||||
total_time += time;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
std::vector<std::pair<CustomGCode::Type, float>> GCodeTimeEstimator::get_custom_gcode_times() const
|
||||
{
|
||||
return m_custom_gcode_times;
|
||||
|
@ -736,7 +721,6 @@ namespace Slic3r {
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<std::string, std::string>>> GCodeTimeEstimator::get_custom_gcode_times_dhm(bool include_remaining) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue