Set the speeds of fans mapped for the current tool to lastDefaultFanSpeed. gbp is nullptr when called from the Display subsystem.
| 4117 | // Set the speeds of fans mapped for the current tool to lastDefaultFanSpeed. |
| 4118 | // gbp is nullptr when called from the Display subsystem. |
| 4119 | void GCodes::SetMappedFanSpeed(const GCodeBuffer *null gbp, float f) noexcept |
| 4120 | { |
| 4121 | MovementState& ms = (gbp == nullptr) ? moveStates[0] : GetMovementState(*gbp); |
| 4122 | ms.virtualFanSpeed = f; |
| 4123 | if (ms.currentTool == nullptr) |
| 4124 | { |
| 4125 | reprap.GetFansManager().SetFanValue(0, f); |
| 4126 | } |
| 4127 | else |
| 4128 | { |
| 4129 | ms.currentTool->SetFansPwm(f); |
| 4130 | } |
| 4131 | } |
| 4132 | |
| 4133 | // Handle sending a reply back to the appropriate interface(s) and update lastResult |
| 4134 | // Note that 'reply' may be empty. If it isn't, then we need to append newline when sending it. |
no test coverage detected