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>2019-07-29 15:23:30 +0300
committerDavid Crocker <dcrocker@eschertech.com>2019-07-29 15:23:30 +0300
commit618300eabe93c96bfa1e88efc0241f1ebb7874b9 (patch)
tree2c4b9862b7f186a30e0487e919f5ded543929645 /src
parente8b3883006c7757a33f67160b64c87bbb28a5bcd (diff)
Minor changes
Diffstat (limited to 'src')
-rw-r--r--src/BugList.txt5
-rw-r--r--src/CAN/CanMessageGenericConstructor.cpp14
-rw-r--r--src/Duet3_V05/Pins_Duet3_V05.h3
-rw-r--r--src/Heating/Heat.h2
-rw-r--r--src/Heating/Heater.cpp2
-rw-r--r--src/Heating/Heater.h1
-rw-r--r--src/Heating/LocalHeater.cpp8
-rw-r--r--src/Heating/LocalHeater.h2
-rw-r--r--src/Heating/RemoteHeater.cpp4
-rw-r--r--src/Heating/RemoteHeater.h1
-rw-r--r--src/Heating/Sensors/SensorWithPort.cpp2
-rw-r--r--src/Heating/Sensors/TemperatureSensor.h7
-rw-r--r--src/Version.h2
13 files changed, 31 insertions, 22 deletions
diff --git a/src/BugList.txt b/src/BugList.txt
index d04ba751..c0d1de0d 100644
--- a/src/BugList.txt
+++ b/src/BugList.txt
@@ -6,6 +6,7 @@ Duet 3 work list
- [done] Separate temperature sensors from heaters
- [done] Remote temperature sensors
- [part done] Remote heaters
+- HeaterProtection objects probably don't work
- Driver on/off voltages to be defined in Pins.h, they depend on the board
- Enable dotstar support
- SWdebug stuff for main board
@@ -16,6 +17,7 @@ Duet 3 work list
- Remote M906 and M913
- Remote M569
- Remote M915
+- Move M912 function to sensor creation
Done in 2.03beta1:
- [done, ok] MBytes/sec -> Mbytes/sec in M122 P104 report
@@ -211,7 +213,8 @@ Outstanding issues:
- [defer] When writing resurrect.g after a pause, the G92 coordinates are wrong
Duet 3:
-- Bug: code queue ont always used then it should be, https://github.com/chrishamm/DuetSoftwareFramework/issues/1
+- Bug: code queue not always used when it should be, https://github.com/chrishamm/DuetSoftwareFramework/issues/1
+- Bug: M308 Y"mcutemp" or "drivers" doesn't work without P"nil" parameter
Planned for 3.0:
- M291 not displaying on PanelDue as well as web interface, https://forum.duet3d.com/topic/11240/m291-display-on-lcd-not-always-working-when-web-session-is-open
diff --git a/src/CAN/CanMessageGenericConstructor.cpp b/src/CAN/CanMessageGenericConstructor.cpp
index 6fc9d90f..f2a73887 100644
--- a/src/CAN/CanMessageGenericConstructor.cpp
+++ b/src/CAN/CanMessageGenericConstructor.cpp
@@ -1,5 +1,5 @@
/*
- * CanMessageGenericConstructo.cpp
+ * CanMessageGenericConstructor.cpp
*
* Created on: 23 Jul 2019
* Author: David
@@ -10,6 +10,7 @@
#if SUPPORT_CAN_EXPANSION
#include "CanMessageBuffer.h"
+#include "CanSender.h"
#include "GCodes/GCodeBuffer/GCodeBuffer.h"
#define STRINGIZE(_v) #_v
@@ -465,11 +466,12 @@ GCodeResult CanMessageGenericConstructor::SendAndGetResponse(CanMessageType msgT
CanMessageGeneric *m2 = buf->SetupGenericMessage(msgType, dest, dataLen);
memcpy(m2, &msg, dataLen + sizeof(msg.paramMap));
- //TODO
- m2->DebugPrint(paramTable);
- CanMessageBuffer::Free(buf);
- reply.copy("CAN message sending not implemented");
- return GCodeResult::error;
+ m2->DebugPrint(paramTable); //DEBUG
+ CanSender::Send(buf);
+
+ //TODO wait for reply
+ reply.copy("CAN message reception not implemented");
+ return GCodeResult::ok;
}
#endif
diff --git a/src/Duet3_V05/Pins_Duet3_V05.h b/src/Duet3_V05/Pins_Duet3_V05.h
index 65be1655..7463e7f8 100644
--- a/src/Duet3_V05/Pins_Duet3_V05.h
+++ b/src/Duet3_V05/Pins_Duet3_V05.h
@@ -239,9 +239,6 @@ bool LookupPinName(const char *pn, LogicalPin& lpin, bool& hardwareInverted);
// Default pin allocations
constexpr const char *DefaultEndstopPinNames[] = { "nil" };
constexpr const char *DefaultZProbePinNames = "^zprobe.in+zprobe.mod";
-constexpr const char *DefaultHeaterPinNames[] = { "nil" };
-constexpr const char *DefaultFanPinNames[] = { "nil" };
-constexpr PwmFrequency DefaultFanPwmFrequencies[] = { DefaultFanPwmFreq };
// SAME70 Flash locations
// These are designed to work with 1Mbyte flash processors as well as 2Mbyte
diff --git a/src/Heating/Heat.h b/src/Heating/Heat.h
index 967de8d5..fe94bcbb 100644
--- a/src/Heating/Heat.h
+++ b/src/Heating/Heat.h
@@ -90,7 +90,7 @@ public:
void Diagnostics(MessageType mtype); // Output useful information
// Methods that relate to a particular heater
- const char *GetHeaterSensorName(size_t heater) const; // Get the name of the sensor associated with heater, or nullptr if it hasn't been named
+ const char *GetHeaterSensorName(size_t heater) const; // Get the name of the sensor associated with heater, or nullptr if it hasn't been named
float GetAveragePWM(size_t heater) const // Return the running average PWM to the heater as a fraction in [0, 1].
pre(heater < MaxHeaters);
diff --git a/src/Heating/Heater.cpp b/src/Heating/Heater.cpp
index f1fe12c4..db5d3926 100644
--- a/src/Heating/Heater.cpp
+++ b/src/Heating/Heater.cpp
@@ -48,7 +48,7 @@ GCodeResult Heater::SetModel(float gain, float tc, float td, float maxPwm, float
}
else
{
- Reset();
+ ResetHeater();
}
return GCodeResult::ok;
}
diff --git a/src/Heating/Heater.h b/src/Heating/Heater.h
index d495024b..2a8c15e8 100644
--- a/src/Heating/Heater.h
+++ b/src/Heating/Heater.h
@@ -91,6 +91,7 @@ protected:
lastTuningMode = tuning3
};
+ virtual void ResetHeater() = 0;
virtual HeaterMode GetMode() const = 0;
virtual void SwitchOn() = 0;
virtual GCodeResult UpdateModel(const StringRef& reply) = 0;
diff --git a/src/Heating/LocalHeater.cpp b/src/Heating/LocalHeater.cpp
index 31feca4e..9ac0b369 100644
--- a/src/Heating/LocalHeater.cpp
+++ b/src/Heating/LocalHeater.cpp
@@ -5,7 +5,7 @@
* Author: David
*/
-#include <Heating/LocalHeater.h>
+#include "LocalHeater.h"
#include "GCodes/GCodes.h"
#include "GCodes/GCodeBuffer/GCodeBuffer.h"
#include "Heat.h"
@@ -42,7 +42,7 @@ float tuningVoltageAccumulator; // sum of the voltage readings we take during
LocalHeater::LocalHeater(unsigned int heaterNum) : Heater(heaterNum), mode(HeaterMode::off)
{
- Reset();
+ ResetHeater();
SetHeater(0.0); // set up the pin even if the heater is not enabled (for PCCB)
// Time the sensor was last sampled. During startup, we use the current
@@ -52,7 +52,7 @@ LocalHeater::LocalHeater(unsigned int heaterNum) : Heater(heaterNum), mode(Heate
LocalHeater::LocalHeater(const Heater& h) : Heater(h), mode(HeaterMode::off)
{
- Reset();
+ ResetHeater();
SetHeater(0.0); // set up the pin even if the heater is not enabled (for PCCB)
// Time the sensor was last sampled. During startup, we use the current
@@ -75,7 +75,7 @@ inline void LocalHeater::SetHeater(float power) const
port.WriteAnalog(power);
}
-void LocalHeater::Reset()
+void LocalHeater::ResetHeater()
{
mode = HeaterMode::off;
previousTemperaturesGood = 0;
diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h
index 6e291473..da922bb0 100644
--- a/src/Heating/LocalHeater.h
+++ b/src/Heating/LocalHeater.h
@@ -40,12 +40,12 @@ public:
void Suspend(bool sus) override; // Suspend the heater to conserve power or while doing Z probing
protected:
+ void ResetHeater() override;
HeaterMode GetMode() const override { return mode; }
void SwitchOn() override; // Turn the heater on and set the mode
GCodeResult UpdateModel(const StringRef& reply) override; // Called when the heater model has been changed
private:
- void Reset();
void SetHeater(float power) const; // Power is a fraction in [0,1]
TemperatureError ReadTemperature(); // Read and store the temperature of this heater
void DoTuningStep(); // Called on each temperature sample when auto tuning
diff --git a/src/Heating/RemoteHeater.cpp b/src/Heating/RemoteHeater.cpp
index a3afee77..92116433 100644
--- a/src/Heating/RemoteHeater.cpp
+++ b/src/Heating/RemoteHeater.cpp
@@ -15,6 +15,10 @@ void RemoteHeater::Spin()
{
}
+void RemoteHeater::ResetHeater()
+{
+}
+
GCodeResult RemoteHeater::ConfigurePortAndSensor(GCodeBuffer& gb, const StringRef& reply)
{
CanMessageGenericConstructor cons(M950Params);
diff --git a/src/Heating/RemoteHeater.h b/src/Heating/RemoteHeater.h
index bcb58e75..84280533 100644
--- a/src/Heating/RemoteHeater.h
+++ b/src/Heating/RemoteHeater.h
@@ -30,6 +30,7 @@ public:
void Suspend(bool sus) override; // Suspend the heater to conserve power or while doing Z probing
protected:
+ void ResetHeater() override;
HeaterMode GetMode() const override;
void SwitchOn() override; // Turn the heater on and set the mode
GCodeResult UpdateModel(const StringRef& reply) override; // Called when the heater model has been changed
diff --git a/src/Heating/Sensors/SensorWithPort.cpp b/src/Heating/Sensors/SensorWithPort.cpp
index a9d6974a..eb42bba4 100644
--- a/src/Heating/Sensors/SensorWithPort.cpp
+++ b/src/Heating/Sensors/SensorWithPort.cpp
@@ -18,7 +18,7 @@ SensorWithPort::~SensorWithPort()
port.Release();
}
-// Try to configure the port. Return true if the port is valid at the end, els return false and set the error message in 'reply'. Set 'seen' if we saw the P parameter.
+// Try to configure the port. Return true if the port is valid at the end, else return false and set the error message in 'reply'. Set 'seen' if we saw the P parameter.
bool SensorWithPort::ConfigurePort(GCodeBuffer& gb, const StringRef& reply, PinAccess access, bool& seen)
{
if (gb.Seen('P'))
diff --git a/src/Heating/Sensors/TemperatureSensor.h b/src/Heating/Sensors/TemperatureSensor.h
index c15111fb..8f1af0a4 100644
--- a/src/Heating/Sensors/TemperatureSensor.h
+++ b/src/Heating/Sensors/TemperatureSensor.h
@@ -13,6 +13,9 @@ class TemperatureSensor
public:
TemperatureSensor(unsigned int sensorNum, const char *type);
+ // Virtual destructor
+ virtual ~TemperatureSensor();
+
// Try to get a temperature reading
TemperatureError GetTemperature(float& t);
@@ -28,14 +31,12 @@ public:
// Return the sensor number
unsigned int GetSensorNumber() const { return sensorNumber; }
+ // Return the code for the most recent error
TemperatureError GetLastError() const { return lastError; }
// Configure the sensor name, if it is provided
void TryConfigureSensorName(GCodeBuffer& gb, bool& seen);
- // Virtual destructor
- virtual ~TemperatureSensor();
-
// Set the name - normally called only once
void SetSensorName(const char *newName);
diff --git a/src/Version.h b/src/Version.h
index 01ee9421..b54db9e3 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -15,7 +15,7 @@
#endif
#ifndef DATE
-# define DATE "2019-07-26b3"
+# define DATE "2019-07-29b1"
#endif
#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d"