Code clean up and handling FIFO errors

Revision:
2:e391aa125721
Parent:
1:63dd03580de4
Child:
5:0728bde67bdb
diff -r 63dd03580de4 -r e391aa125721 common/utils.c
--- a/common/utils.c	Mon Apr 15 14:36:02 2019 +0000
+++ b/common/utils.c	Fri Apr 26 15:57:57 2019 +0000
@@ -133,10 +133,10 @@
         }
         else
         {
-            ADI_SENSE_LOG_INFO("Sample # %2d Channel # %2d :: Raw %8d  :: Processed %f :: flags:%s%s",
+            ADI_SENSE_LOG_INFO("Sample # %2d Channel # %2d :: Raw %0X %f :: Processed %f :: flags:%s%s",
                                i+1,
                                pSampleBuffer[i].channelId,
-                               pSampleBuffer[i].rawValue,
+                               pSampleBuffer[i].rawValue, (pSampleBuffer[i].rawValue/1024.0),
                                pSampleBuffer[i].processedValue,
                                pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ERROR ? " ERROR" : "",
                                pSampleBuffer[i].status & ADI_SENSE_DEVICE_STATUS_ALERT ? " ALERT" : "");