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.
Diff: DRIVERS/CHEM_BOX_COMMON.cpp
- Revision:
- 5:b56a4592aac0
- Parent:
- 4:e3eda81c97ae
- Child:
- 6:6a870e1e52c1
--- a/DRIVERS/CHEM_BOX_COMMON.cpp	Thu Aug 05 02:16:11 2021 +0000
+++ b/DRIVERS/CHEM_BOX_COMMON.cpp	Sun Sep 12 20:14:44 2021 +0000
@@ -968,18 +968,39 @@
 {
     float Temp = 0;
     int Channel = -1;
+    int Status = 0;
     
      if(sscanf(arg,"%d",&Channel) == 1)
         {
                 Temp = ReadThermocouple(Channel);
-                 PC.printf("TEMP:%d:%.2f:%d\r\n",Channel,Temp,Thermocouple_OC);
+                
+                if(ReadThermocouple_FAULT() & (1<<Channel))
+                {
+                    Status = 1;
+                }
+                else
+                {
+                    Status = 0;
+                }
+                
+                 PC.printf("TEMP:%d:%.2f:%d\r\n",Channel,Temp,Status);
         }
         else
         {
             for(Channel = 0; Channel<12;Channel++)
             {
                  Temp = ReadThermocouple(Channel);
-                  PC.printf("TEMP:%d:%.2f:%d\r\n",Channel,Temp,Thermocouple_OC);
+                 
+                 if(ReadThermocouple_FAULT() & (1<<Channel))
+                 {
+                    Status = 1;
+                 }
+                 else
+                 {
+                    Status = 0;
+                 }
+                 
+                  PC.printf("TEMP:%d:%.2f:%d\r\n",Channel,Temp,Status);
             }
         }
 }
    