mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: refine global bed type config logic
Add default type to plate bed types. Signed-off-by: yifan.wu <yifan.wu@bambulab.com> Change-Id: I26f3a64dba4a19b0d882b828f1ee54c84df1879c (cherry picked from commit 1ebed465d2b3bcd482dd4ba7a5930b721c79fc13)
This commit is contained in:
@@ -120,13 +120,12 @@ std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, in
|
||||
}
|
||||
|
||||
// BBS
|
||||
std::string GCodeWriter::set_bed_temperature(std::vector<int> temps_per_bed, int default_temp, bool wait)
|
||||
std::string GCodeWriter::set_bed_temperature(int temperature, bool wait)
|
||||
{
|
||||
if (temps_per_bed == m_last_bed_temperature && (! wait || m_last_bed_temperature_reached))
|
||||
if (temperature == m_last_bed_temperature && (! wait || m_last_bed_temperature_reached))
|
||||
return std::string();
|
||||
|
||||
bool target_temp_changed = (temps_per_bed != m_last_bed_temperature);
|
||||
m_last_bed_temperature = temps_per_bed;
|
||||
m_last_bed_temperature = temperature;
|
||||
m_last_bed_temperature_reached = wait;
|
||||
|
||||
std::string code, comment;
|
||||
@@ -141,7 +140,7 @@ std::string GCodeWriter::set_bed_temperature(std::vector<int> temps_per_bed, int
|
||||
comment = "set bed temperature";
|
||||
}
|
||||
|
||||
gcode << code << " S" << default_temp << " ; " << comment << "\n";
|
||||
gcode << code << " S" << temperature << " ; " << comment << "\n";
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user