mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06: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:
parent
3b3ad1b390
commit
d152b4d235
11 changed files with 109 additions and 100 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue