mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 23:48:44 +03:00
Update P2 P3 fan gcode
This commit is contained in:
@@ -39,6 +39,9 @@ void CoolingBuffer::reset(const Vec3d &position)
|
|||||||
m_current_pos[2] = float(position.z());
|
m_current_pos[2] = float(position.z());
|
||||||
m_current_pos[4] = float(m_config.travel_speed.value);
|
m_current_pos[4] = float(m_config.travel_speed.value);
|
||||||
m_fan_speed = -1;
|
m_fan_speed = -1;
|
||||||
|
//Y12
|
||||||
|
m_fan_speed = -1;
|
||||||
|
m_fan_speed = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CoolingLine
|
struct CoolingLine
|
||||||
@@ -807,15 +810,23 @@ std::string CoolingBuffer::apply_layer_cooldown(
|
|||||||
}
|
}
|
||||||
//B15 //B39
|
//B15 //B39
|
||||||
if (int(layer_id) == disable_rapid_cooling_fan_first_layers) {
|
if (int(layer_id) == disable_rapid_cooling_fan_first_layers) {
|
||||||
std::ostringstream fan_gcode;
|
int auxiliary_fan_speed_new = 255 * enable_auxiliary_fan / 100;
|
||||||
fan_gcode << "M106 P2 S" << 255.0 * enable_auxiliary_fan / 100.0 << "\n";
|
if (auxiliary_fan_speed_new != m_auxiliary_fan_speed) {
|
||||||
new_gcode += fan_gcode.str();
|
std::ostringstream fan_gcode;
|
||||||
|
m_auxiliary_fan_speed = auxiliary_fan_speed_new;
|
||||||
|
fan_gcode << "M106 P2 S" << auxiliary_fan_speed_new << "\n";
|
||||||
|
new_gcode += fan_gcode.str();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//B25
|
//B25
|
||||||
if (int(layer_id) == disable_fan_first_layers) {
|
if (int(layer_id) == disable_fan_first_layers) {
|
||||||
std::ostringstream fan_gcode;
|
int volume_fan_speed_new = 255 * enable_volume_fan / 100;
|
||||||
fan_gcode << "M106 P3 S" << 255.0 * enable_volume_fan / 100.0 << "\n";
|
if (volume_fan_speed_new != m_volume_fan_speed) {
|
||||||
new_gcode += fan_gcode.str();
|
std::ostringstream fan_gcode;
|
||||||
|
m_volume_fan_speed = volume_fan_speed_new;
|
||||||
|
fan_gcode << "M106 P3 S" << volume_fan_speed_new << "\n";
|
||||||
|
new_gcode += fan_gcode.str();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fan_speed_new != m_fan_speed) {
|
if (fan_speed_new != m_fan_speed) {
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ private:
|
|||||||
std::vector<float> m_current_pos;
|
std::vector<float> m_current_pos;
|
||||||
// Current known fan speed or -1 if not known yet.
|
// Current known fan speed or -1 if not known yet.
|
||||||
int m_fan_speed;
|
int m_fan_speed;
|
||||||
|
//Y12
|
||||||
|
int m_auxiliary_fan_speed;
|
||||||
|
int m_volume_fan_speed;
|
||||||
// Cached from GCodeWriter.
|
// Cached from GCodeWriter.
|
||||||
// Printing extruder IDs, zero based.
|
// Printing extruder IDs, zero based.
|
||||||
std::vector<unsigned int> m_extruder_ids;
|
std::vector<unsigned int> m_extruder_ids;
|
||||||
|
|||||||
Reference in New Issue
Block a user