Feat: chamber temp control and chamber fan (#2483)

* init

* tweak
This commit is contained in:
SoftFever 2023-10-22 16:38:20 +08:00 committed by GitHub
parent 809e6d1cc7
commit 90601c098a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 100 additions and 65 deletions

View file

@ -164,9 +164,13 @@ std::string GCodeWriter::set_chamber_temperature(int temperature, bool wait)
if (wait)
{
gcode<<"M106 P2 S255 \n";
gcode<<"M191 S"<<std::to_string(temperature)<<" ;"<<"set chamber_temperature and wait for it to be reached\n";
gcode<<"M106 P2 S0 \n";
// Orca: should we let the M191 command to turn on the auxiliary fan?
if (config.auxiliary_fan)
gcode << "M106 P2 S255 \n";
gcode << "M191 S" << std::to_string(temperature) << " ;"
<< "set chamber_temperature and wait for it to be reached\n";
if (config.auxiliary_fan)
gcode << "M106 P2 S0 \n";
}
else {
code = "M141";