Skip to content

Commit

Permalink
Merge branch 'main' into CURA-10831
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/gcodeExport.cpp
  • Loading branch information
jellespijker committed Dec 8, 2023
2 parents 6427083 + 92cea65 commit 950be2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gcodeExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,9 @@ void GCodeExport::writeFanCommand(double speed)
else if (speed > 0)
{
const bool should_scale_zero_to_one = Application::getInstance().current_slice_->scene.settings.get<bool>("machine_scale_fan_speed_zero_to_one");
*output_stream_ << "M106 S" << PrecisionedDouble{ static_cast<uint8_t>((should_scale_zero_to_one ? 2u : 1u)), (should_scale_zero_to_one ? speed : speed * 255) / 100 };
*output_stream_ << "M106 S"
<< PrecisionedDouble{ (should_scale_zero_to_one ? static_cast<uint8_t>(2) : static_cast<uint8_t>(1)),
(should_scale_zero_to_one ? speed : speed * 255) / 100 };
if (fan_number_)
{
*output_stream_ << " P" << fan_number_;
Expand Down

0 comments on commit 950be2e

Please sign in to comment.