Vybhav Kadaba
/
EV-PRO-MW1001_Development_20April
Code clean up and handling FIFO errors
Diff: common/utils.c
- Revision:
- 10:14954555be2a
- Parent:
- 6:9d393a9677f4
- Child:
- 15:b5d57daeb7c0
--- a/common/utils.c Fri Jun 21 07:35:21 2019 +0000 +++ b/common/utils.c Fri Jun 21 10:53:09 2019 +0000 @@ -113,11 +113,17 @@ uint32_t nNumSamples, ADMW_MEASUREMENT_MODE eMeasurementMode) { - - - - - + + for (uint32_t i = 0; i < nNumSamples; i++) + { + ADMW_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/1024.0), + pSampleBuffer[i].processedValue, + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "", + pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : ""); + } } static void gpioCallbackFn(ADMW_GPIO_PIN ePinId, void * pArg)