void* adc_run (void* arg)
{
while(1)
{
while(ADS1256_Scan()==0);
adc[0] = ADS1256_GetAdc(0);
volt[0] = (adc[0] * 100)/167;
a[i] = volt[0];
i++;
if(timestamp != time(NULL))
{
timestamp = time(NULL);
j=i; // copying the number of elements read in that second
ApplicationDeviceClass_UpdateTimeCount( DeviceObject, (XInt32)i);
i=0;
}
}
return NULL;
}
This is the function(adc_run) doing the acquisition in the separate thread. The array a[] collects all the acquired values .
#ifdef _ApplicationDeviceClass__UpdateADC_
for (k=0;k<(j/60);k++)
{
ApplicationDeviceClass__UpdateADC( DeviceObject, (XInt32)a[l*(j/60)+k]);
}
l++;
if (timestamp1 != time(NULL))
{
l=0;
timestamp1 = time(NULL);
}
#endif
This is the main EmWi loop . We know 60 iterations happen every second so each iteration uploads N/60 values to the UI.


This chora expression is written inside a slot method(UpdatePath) which is called when the Timer completes its period ( currently at 1ms).
I cannot exactly say how many data points have reached the UI but they are certainly much less than 1K as I can conclude after giving a suitable input to the sensor-adc system.
The example is the path-data6 given here https://doc.embedded-wizard.de/path-data?v=9.20#2. The random number function has been removed and device class added.