ctb:separated analog and digital samples in server and send analog and digital data packed separately per frame to reciever

This commit is contained in:
2019-04-30 18:55:32 +02:00
parent b0cffcd570
commit 2f3b0e0b06
17 changed files with 489 additions and 300 deletions

View File

@ -574,27 +574,12 @@ int allocateRAM() {
void updateDataBytes() {
int oldDataBytes = dataBytes;
dataBytes = NCHIP * getChannels() * NUM_BYTES_PER_PIXEL * nSamples;
dataBytes = NCHIP * NUM_BYTES_PER_PIXEL * nSamples;
if (dataBytes != oldDataBytes) {
FILE_LOG(logINFO, ("\tUpdating Databytes: %d\n", dataBytes));
}
}
int getChannels() {
int nchans = 0;
nchans += NCHAN;
// remove the channels disabled
int ichan = 0;
for (ichan = 0; ichan < NCHAN; ++ichan) {
if (adcDisableMask & (1 << ichan))
--nchans;
}
FILE_LOG(logINFO, ("\tNumber of Channels calculated: %d\n", nchans))
return nchans;
}
/* firmware functions (resets) */