Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2017-01-03 12:49:48 +0300
committerDavid Crocker <dcrocker@eschertech.com>2017-01-03 12:50:33 +0300
commit660e9c7d1ca95df5e31693734c018172f2bae7d8 (patch)
tree2fdb6c72235ae9b2a3d4b44dd7877ac1cdf4323a /src/Fan.cpp
parent8533302849f1f93a65fe072e679afe5dd0497eb0 (diff)
Version 1.17a
Homing speed: - The speed factor (M220 command, or speed control in DWC and PanelDue) no longer affects the speed of homing moves or other special moves (i.e. G1 commands with S1 or S2 parameter) Bug fixes: - Fixed the M120 (Push) command - Setting relative extruder movement (M83) or a feed rate (G1 Fxxx) in config.g now works again - The F (feed rate) parameter is now processed correctly on a G1 command with the R parameter - If you used M106 to change a fan PWM frequency, the change did not take place until you next changed the speed - On boards with SAM3X processors, due to a chip bug the fan speed was sometimes incorrect if you changed the PWM frequency - If an http client requested a non-existent file that was not an HTML file, the server incorrectly returned a 404 HTML page
Diffstat (limited to 'src/Fan.cpp')
-rw-r--r--src/Fan.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Fan.cpp b/src/Fan.cpp
index 67206112..bd29b965 100644
--- a/src/Fan.cpp
+++ b/src/Fan.cpp
@@ -20,7 +20,7 @@ void Fan::Init(Pin p_pin, bool hwInverted)
inverted = blipping = false;
heatersMonitored = 0;
triggerTemperature = HOT_END_FAN_TEMPERATURE;
- lastPwm = -1.0;
+ lastPwm = -1.0; // force a refresh
Refresh();
}
@@ -62,6 +62,8 @@ void Fan::SetInverted(bool inv)
Refresh();
}
+// Set the hardware PWM
+// If you want make sure that the PWM is definitely updated, set lastPWM negative before calling this
void Fan::SetHardwarePwm(float pwmVal)
{
if (pin != NoPin)
@@ -88,6 +90,7 @@ void Fan::SetHardwarePwm(float pwmVal)
void Fan::SetPwmFrequency(float p_freq)
{
freq = (uint16_t)constrain<float>(p_freq, 1.0, 65535.0);
+ lastPwm = -1.0; // force the PWM to be updated
Refresh();
}
@@ -97,6 +100,8 @@ void Fan::SetHeatersMonitored(uint16_t h)
Refresh();
}
+// Refresh the fan PWM
+// If you want make sure that the PWM is definitely updated, set lastPWM negative before calling this
void Fan::Refresh()
{
float reqVal = (heatersMonitored == 0)
@@ -139,6 +144,7 @@ void Fan::Disable()
if (pin != NoPin)
{
inverted = false;
+ lastPwm = -1;
SetHardwarePwm(0.0);
}
pin = NoPin;