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
path: root/src
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2016-11-06 17:51:21 +0300
committerDavid Crocker <dcrocker@eschertech.com>2016-11-06 17:51:49 +0300
commit089f6ed16c1c48d3a5ef0a9b5e19d59e57db4ce8 (patch)
treeedbe759e9e2633ca9d7a07835a93c4d580fc9477 /src
parent9a62e77a86338458b9381df0519da32de8c78234 (diff)
Version 1.16rc3
Initialise all heater model parameters in constructor so that on a Durt 0.8.5 heater 6 has sensible model parameters even though it is disabled Fixed PWM frequenct on Duet 0.6/0.8.5
Diffstat (limited to 'src')
-rw-r--r--src/Configuration.h4
-rw-r--r--src/Heating/FOPDT.cpp15
-rw-r--r--src/Heating/FOPDT.h2
-rw-r--r--src/Platform.h2
4 files changed, 19 insertions, 4 deletions
diff --git a/src/Configuration.h b/src/Configuration.h
index 26982b4f..9d809ed4 100644
--- a/src/Configuration.h
+++ b/src/Configuration.h
@@ -26,11 +26,11 @@ Licence: GPL
// Firmware name is now defined in the Pins file
#ifndef VERSION
-# define VERSION "1.16rc2"
+# define VERSION "1.16rc3"
#endif
#ifndef DATE
-# define DATE "2016-11-05"
+# define DATE "2016-11-06"
#endif
#define AUTHORS "reprappro, dc42, zpl, t3p3, dnewman"
diff --git a/src/Heating/FOPDT.cpp b/src/Heating/FOPDT.cpp
index 1e943443..f68b4639 100644
--- a/src/Heating/FOPDT.cpp
+++ b/src/Heating/FOPDT.cpp
@@ -7,13 +7,26 @@
#include "FOPDT.h"
#include "Core.h"
+#include "Configuration.h"
+
+FopDt::FopDt()
+{
+ // Heater 6 on the Duet 0.8.5 is disabled by default at startup so that we can use fan 2.
+ // Set up sensible defaults in case the user enables the heater without specifying values for all the parameters.
+ enabled = false;
+ gain = DefaultHotEndHeaterGain;
+ timeConstant = DefaultHotEndHeaterTimeConstant;
+ deadTime = DefaultHotEndHeaterDeadTime;
+ maxPwm = 1.0;
+ usePid = true;
+}
// Check the model parameters are sensible, if they are then save them and return true.
bool FopDt::SetParameters(float pg, float ptc, float pdt, float pMaxPwm, bool pUsePid)
{
if (pg == -1.0 && ptc == -1.0 && pdt == -1.0)
{
- // Setting all parameters to -1 disabled the heater control completely so we can use the pin for other purposes
+ // Setting all parameters to -1 disables the heater control completely so we can use the pin for other purposes
enabled = false;
return true;
}
diff --git a/src/Heating/FOPDT.h b/src/Heating/FOPDT.h
index 8c6a860e..55757331 100644
--- a/src/Heating/FOPDT.h
+++ b/src/Heating/FOPDT.h
@@ -20,6 +20,8 @@ struct PidParams
class FopDt
{
public:
+ FopDt();
+
bool SetParameters(float pg, float ptc, float pdt, float pMaxPwm, bool pUsePid);
float GetGain() const { return gain; }
diff --git a/src/Platform.h b/src/Platform.h
index e80704d2..e5ce5480 100644
--- a/src/Platform.h
+++ b/src/Platform.h
@@ -973,7 +973,7 @@ private:
AnalogOut(pin, pwm, freq);
}
#else
- AnalogOut(pin, pwm);
+ AnalogOut(pin, pwm, freq);
#endif
}