Skip to content

Commit

Permalink
Minor test cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <travis.collins@analog.com>
  • Loading branch information
tfcollins committed Dec 14, 2023
1 parent afeab80 commit 4af31e2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/hardware/test_ad9364.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#define assertm(exp, msg) assert(((void)msg, exp))

// User Set
#define N_TX_SAMPLES 16
#define N_TX_SAMPLES 128
#define RX_OVERSAMPLE 4
#define SUCCESSIVE_BUFFER_TO_CHECK 2
#define SUCCESSIVE_BUFFER_TO_CHECK 10
#define N_RX_BLOCKS 4

// Calculated/Constant
Expand Down Expand Up @@ -116,7 +116,6 @@ int main() {

bool found_start = false;
int16_t ramp_indx = 0;
int16_t looped = 0;

// Create check vector
bool ramp_found_check_vector[SUCCESSIVE_BUFFER_TO_CHECK];
Expand All @@ -139,6 +138,7 @@ int main() {
// blocks
found_start = false;
continuous_check_vector[i] = true; // assume good
ramp_indx = 0;

for (p_dat = iio_block_first(rxblock, chn); p_dat < p_end;
p_dat += p_inc / sizeof(*p_dat)) {
Expand All @@ -147,7 +147,7 @@ int main() {
if (p_dat[0] == (N_TX_SAMPLES - 1) && p_dat[1] == (N_TX_SAMPLES - 1) &&
!found_start) {
found_start = true;
continue;
continue; // Wrap to ramp restarts on next sample
}

// Make sure ramp is continuous
Expand All @@ -167,7 +167,6 @@ int main() {
}
if (ramp_indx == (N_TX_SAMPLES - 1)) {
ramp_indx = 0;
looped++;
} else
ramp_indx++;
}
Expand Down

0 comments on commit 4af31e2

Please sign in to comment.