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:
authorMax Matveev <mail@maxmatveev.com>2017-11-01 17:19:40 +0300
committerdc42 <dcrocker@eschertech.com>2017-11-01 17:19:40 +0300
commit1f15e46454ec2ee0d0db6e0661fff09b85a821ae (patch)
tree708e1408c774e743d778d888f96c06fa6a9518d8 /src
parent8127d85ade4cc0f924c901407c5388f85c4e2835 (diff)
Support for 3-wire PT100 sensor (#141)
* Support for 3-wire PT100 sensor * Support for 3-wire PT100 sensor -- added 2/4 or 3-wire mode reporting
Diffstat (limited to 'src')
-rw-r--r--src/Heating/Sensors/RtdSensor31865.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Heating/Sensors/RtdSensor31865.cpp b/src/Heating/Sensors/RtdSensor31865.cpp
index 25b17966..f94e130a 100644
--- a/src/Heating/Sensors/RtdSensor31865.cpp
+++ b/src/Heating/Sensors/RtdSensor31865.cpp
@@ -90,6 +90,19 @@ bool RtdSensor31865::Configure(unsigned int mCode, unsigned int heater, GCodeBuf
}
}
+ if (gb.Seen('W'))
+ {
+ seen = true;
+ if (gb.GetUIValue() == 3)
+ {
+ cr0 |= 0x10;
+ }
+ else
+ {
+ cr0 &= ~0x10;
+ }
+ }
+
if (gb.Seen('R'))
{
seen = true;
@@ -99,7 +112,7 @@ bool RtdSensor31865::Configure(unsigned int mCode, unsigned int heater, GCodeBuf
if (!seen && !gb.Seen('X'))
{
CopyBasicHeaterDetails(heater, reply);
- reply.catf(", reject %dHz, reference resistor %u ohms", (cr0 & 0x01) ? 50 : 60, (unsigned int)rref);
+ reply.catf(", %s wires, reject %dHz, reference resistor %u ohms", (cr0 & 0x10) ? "3" : "2/4", (cr0 & 0x01) ? 50 : 60, (unsigned int)rref);
}
}
return false;