//Loop through channel_list until all channels recognized
//start with channelprocessing = 0 and increment through channels.
//If a channel is found in the list set it up appropriately.
@@ -220,7 +252,7 @@ static int nerd_init_channels(deststruct * destination, int numChannels, int *ch
return numDuplicates;
}
*/
int nerd_data_stream(int data_fd, int numChannels, int *channel_list, int precision, int convert, int lines, int showmem, unsigned short * currentcount)
{
//Variables that should persist across retries
@@ -235,7 +267,6 @@ int nerd_data_stream(int data_fd, int numChannels, int *channel_list, int precis
unsigned short dataline[NERDJACK_CHANNELS];
long double voltline[NERDJACK_CHANNELS];
int i;
deststruct destination[NERDJACK_CHANNELS];
unsigned long memused = 0;
@@ -254,11 +285,22 @@ int nerd_data_stream(int data_fd, int numChannels, int *channel_list, int precis
}
int numDuplicates = nerd_init_channels(destination,numChannels, channel_list);
int numChannelsSampled = channel_list[0] + 1;
//The number sampled will be the highest channel requested plus 1 (i.e. channel 0 requested means 1 sampled)