mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
FIX:optimize the fan gear
Change-Id: I02361a71b56f1527d85b2085f13fb374faacdc32
This commit is contained in:
parent
b5967505bd
commit
e9045c2f4b
3 changed files with 30 additions and 12 deletions
|
@ -462,7 +462,7 @@ void FanControl::set_name(wxString name)
|
|||
void FanControl::set_fan_speed(int g)
|
||||
{
|
||||
if (g < 0 || g > 255) return;
|
||||
int speed = floor(float(g) / float(25.5));
|
||||
int speed = round(float(g) / float(25.5));
|
||||
|
||||
if (m_current_speed != speed) {
|
||||
m_current_speed = speed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue