Skip to content

Commit

Permalink
Add error code values for thermocouple faults
Browse files Browse the repository at this point in the history
The MAX31850 maintains data from the fault detection circuit in the
scratchpad, which indicates these conditions.
  • Loading branch information
karlg100 committed Jan 2, 2021
1 parent ac1eb7f commit ab583b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions DallasTemperature.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
#define DEVICE_DISCONNECTED_F -427
#define DEVICE_DISCONNECTED_RAW -32640

#define DEVICE_FAULT_OPEN_C -254
#define DEVICE_FAULT_OPEN_F -425.199982
#define DEVICE_FAULT_OPEN_RAW -32512

#define DEVICE_FAULT_SHORTGND_C -253
#define DEVICE_FAULT_SHORTGND_F -423.399994
#define DEVICE_FAULT_SHORTGND_RAW -32384

#define DEVICE_FAULT_SHORTVDD_C -252
#define DEVICE_FAULT_SHORTVDD_F -421.599976
#define DEVICE_FAULT_SHORTVDD_RAW -32256

// For readPowerSupply on oneWire bus
// definition of nullptr for C++ < 11, using official workaround:
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
Expand Down
9 changes: 9 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,12 @@ calculateTemperature KEYWORD2
DEVICE_DISCONNECTED_C LITERAL1
DEVICE_DISCONNECTED_F LITERAL1
DEVICE_DISCONNECTED_RAW LITERAL1
DEVICE_FAULT_OPEN_C LITERAL1
DEVICE_FAULT_OPEN_F LITERAL1
DEVICE_FAULT_OPEN_RAW LITERAL1
DEVICE_FAULT_SHORTGND_C LITERAL1
DEVICE_FAULT_SHORTGND_F LITERAL1
DEVICE_FAULT_SHORTGND_RAW LITERAL1
DEVICE_FAULT_SHORTVDD_C LITERAL1
DEVICE_FAULT_SHORTVDD_F LITERAL1
DEVICE_FAULT_SHORTVDD_RAW LITERAL1

0 comments on commit ab583b1

Please sign in to comment.