Skip to content

Commit ab583b1

Browse files
committed
Add error code values for thermocouple faults
The MAX31850 maintains data from the fault detection circuit in the scratchpad, which indicates these conditions.
1 parent ac1eb7f commit ab583b1

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

DallasTemperature.h

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
#define DEVICE_DISCONNECTED_F -427
3838
#define DEVICE_DISCONNECTED_RAW -32640
3939

40+
#define DEVICE_FAULT_OPEN_C -254
41+
#define DEVICE_FAULT_OPEN_F -425.199982
42+
#define DEVICE_FAULT_OPEN_RAW -32512
43+
44+
#define DEVICE_FAULT_SHORTGND_C -253
45+
#define DEVICE_FAULT_SHORTGND_F -423.399994
46+
#define DEVICE_FAULT_SHORTGND_RAW -32384
47+
48+
#define DEVICE_FAULT_SHORTVDD_C -252
49+
#define DEVICE_FAULT_SHORTVDD_F -421.599976
50+
#define DEVICE_FAULT_SHORTVDD_RAW -32256
51+
4052
// For readPowerSupply on oneWire bus
4153
// definition of nullptr for C++ < 11, using official workaround:
4254
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf

keywords.txt

+9
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,12 @@ calculateTemperature KEYWORD2
7676
DEVICE_DISCONNECTED_C LITERAL1
7777
DEVICE_DISCONNECTED_F LITERAL1
7878
DEVICE_DISCONNECTED_RAW LITERAL1
79+
DEVICE_FAULT_OPEN_C LITERAL1
80+
DEVICE_FAULT_OPEN_F LITERAL1
81+
DEVICE_FAULT_OPEN_RAW LITERAL1
82+
DEVICE_FAULT_SHORTGND_C LITERAL1
83+
DEVICE_FAULT_SHORTGND_F LITERAL1
84+
DEVICE_FAULT_SHORTGND_RAW LITERAL1
85+
DEVICE_FAULT_SHORTVDD_C LITERAL1
86+
DEVICE_FAULT_SHORTVDD_F LITERAL1
87+
DEVICE_FAULT_SHORTVDD_RAW LITERAL1

0 commit comments

Comments
 (0)