Mbed Development branch for MeasrueWare

Revision:
65:d91e1d63153d
Parent:
64:e8670e971e22
Child:
70:420fac5132f5
--- a/src/admw_1001.c	Tue Apr 14 07:04:24 2020 +0000
+++ b/src/admw_1001.c	Tue Apr 14 08:40:24 2020 +0000
@@ -645,6 +645,7 @@
              (commandResponse[1] != ADMW1001_HOST_COMMS_CMD_RESP_1));
 
     for (unsigned i = 0; i < nRequested; i++) {
+      
         bool bHoldCs = true;
         /* Keep the CS signal asserted for all but the last sample */
         if ((i + 1) == nRequested)
@@ -671,21 +672,7 @@
         }
 
         ADMW_DATA_SAMPLE *pSample = &pSamples[nValidSamples];
-
-        pSample->status = (ADMW_DEVICE_STATUS_FLAGS)0;
-        if (sensorResult.Ch_Error)
-            pSample->status |= ADMW_DEVICE_STATUS_ERROR;
-        if (sensorResult.Ch_Alert)
-            pSample->status |= ADMW_DEVICE_STATUS_ALERT;
-
-        if (sensorResult.Ch_Raw)
-            pSample->rawValue = sensorResult.Raw_Sample;
-        else
-            pSample->rawValue = 0;
-
-        pSample->channelId = sensorResult.Channel_ID;
-        pSample->processedValue = sensorResult.Sensor_Result;
-
+        memcpy(pSample,&sensorResult,sizeof(sensorResult));
         nValidSamples++;
 
         admw_TimeDelayUsec(ADMW1001_HOST_COMMS_XFER_DELAY);