ctb: added command 'rx_dbitreorder' that sets a flag in the receiver to set the reorder flag. By default it is 1. Setting to false means 'do not reorder' and to keep what the board spits out, which is that all signals in a sample are grouped together

This commit is contained in:
2025-03-12 17:13:30 +01:00
parent 8d87a6ee4e
commit e8ac048114
20 changed files with 244 additions and 10 deletions

View File

@ -75,10 +75,10 @@ void DataProcessor::SetCtbDbitList(std::vector<int> value) {
ctbDbitList = value;
}
void DataProcessor::SetReorder(const bool value) { reorder = value; }
void DataProcessor::SetCtbDbitOffset(int value) { ctbDbitOffset = value; }
void DataProcessor::SetCtbDbitReorder(bool value) { ctbDbitReorder = value; }
void DataProcessor::SetQuadEnable(bool value) { quadEnable = value; }
void DataProcessor::SetFlipRows(bool fd) {
@ -556,7 +556,7 @@ void DataProcessor::ArrangeDbitData(size_t &size, char *data) {
0; // number of bytes for selected digital data given by dtbDbitList
// store each selected bit from all samples consecutively
if (reorder) {
if (ctbDbitReorder) {
int numBitsPerDbit = numDigitalSamples; // num bits per selected digital
// Bit for all samples
if ((numBitsPerDbit % 8) != 0)
@ -575,7 +575,7 @@ void DataProcessor::ArrangeDbitData(size_t &size, char *data) {
std::vector<uint8_t> result(totalNumBytes, 0);
uint8_t *dest = &result[0];
if (reorder) {
if (ctbDbitReorder) {
// loop through digital bit enable vector
int bitoffset = 0;
for (auto bi : ctbDbitList) {