Y SI / lib_MAX31856

Dependents:   lib_MAX31856_example

Revision:
1:916d3fb3b21d
Parent:
0:9aa539a3d0f8
Child:
2:c5e7f83a00ed
--- a/lib_MAX31856.cpp	Tue Jun 30 09:21:19 2020 +0000
+++ b/lib_MAX31856.cpp	Thu Oct 01 11:37:04 2020 +0000
@@ -62,7 +62,8 @@
 
 //*****************************************************************************
 float MAX31856::readTC()
-{    
+{
+    if(isnan(readCJ())) return NAN;
     //Check and see if the MAX31856 is set to conversion mode ALWAYS ON
     if (conversion_mode==0) {   //means that the conversion mode is normally off
         setOneShotMode(CR0_1_SHOT_MODE_ONE_CONVERSION); // turn on the one shot mode for singular conversion