Low voltage digital temperature sensor

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Files at this revision

API Documentation at this revision

Comitter:
cparata
Date:
Tue May 05 13:50:14 2020 +0000
Parent:
1:5859badee052
Commit message:
Fix bug get_temp_limit_status

Changed in this revision

STTS751Sensor.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 5859badee052 -r 2ea2e88ce467 STTS751Sensor.cpp
--- a/STTS751Sensor.cpp	Wed Jul 24 14:20:10 2019 +0000
+++ b/STTS751Sensor.cpp	Tue May 05 13:50:14 2020 +0000
@@ -363,9 +363,17 @@
         return 1;
     }
 
-    *high_limit = status.t_high;
-    *low_limit = status.t_low;
-    *therm_limit = status.thrm;
+    if(high_limit) {
+        *high_limit = status.t_high;
+    }
+
+    if(low_limit) {
+        *low_limit = status.t_low;
+    }
+
+    if(therm_limit) {
+        *therm_limit = status.thrm;
+    }
 
     return 0;
 }