Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: lib_MAX31856_example
Diff: lib_MAX31856.cpp
- Revision:
- 1:916d3fb3b21d
- Parent:
- 0:9aa539a3d0f8
- Child:
- 2:c5e7f83a00ed
diff -r 9aa539a3d0f8 -r 916d3fb3b21d lib_MAX31856.cpp
--- 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