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.
Fork of Sean_AdiSense1000_V21 by
Diff: common/utils.c
- Revision:
- 36:4aded4b4f060
- Parent:
- 28:4eb837cd71df
--- a/common/utils.c	Thu Sep 27 12:14:22 2018 +0000
+++ b/common/utils.c	Thu Oct 25 08:59:30 2018 +0000
@@ -136,6 +136,35 @@
     }
 }
 
+/* ===ALTERNATE FUNCTION FOR PRINTING RESULT ===*/
+void utils_printSamples_2(
+    ADI_SENSE_DATA_SAMPLE *pSampleBuffer,
+    uint32_t nNumSamples,
+    ADI_SENSE_MEASUREMENT_MODE eMeasurementMode)
+{
+//    bool fftMode = (eMeasurementMode == ADI_SENSE_MEASUREMENT_MODE_FFT);    
+    
+ ADI_SENSE_LOG_INFO("#%.5f#%.5f#%.5f#%.5f#%.5f#%.5f#%.5f#%.5f#%.5f",
+                           //temp
+                           pSampleBuffer[0].processedValue,
+                           //lc1
+                           pSampleBuffer[1].processedValue,
+                           //lc2
+                           pSampleBuffer[2].processedValue,
+                           //lc3
+                           pSampleBuffer[3].processedValue,
+                           //lc4
+                           pSampleBuffer[4].processedValue,
+                           //humidity
+                           pSampleBuffer[5].processedValue,
+                           //AccX
+                           pSampleBuffer[6].processedValue,
+                           //AccY
+                           pSampleBuffer[7].processedValue,
+                           //AccZ
+                           pSampleBuffer[8].processedValue);
+}
+
 static void gpioCallbackFn(ADI_SENSE_GPIO_PIN ePinId, void * pArg)
 {
     volatile bool_t *pbFlag = (volatile bool_t *)pArg;
@@ -315,7 +344,7 @@
              * subsequent samples may be missed if not retrieved promptly when
              * the next DATAREADY assertion occurs.
              */
-            utils_printSamples(pSampleBuffer, nReturned, eMeasurementMode);
+            utils_printSamples_2(pSampleBuffer, nReturned, eMeasurementMode);
             nSampleCount += nReturned;
         }
 
    