From 4af31e21bad0146b6497d127b84a44db832d19ce Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Thu, 14 Dec 2023 15:46:01 -0700 Subject: [PATCH] Minor test cleanup Signed-off-by: Travis F. Collins --- tests/hardware/test_ad9364.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/hardware/test_ad9364.c b/tests/hardware/test_ad9364.c index 5a13934ca..d629bfd8e 100644 --- a/tests/hardware/test_ad9364.c +++ b/tests/hardware/test_ad9364.c @@ -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 @@ -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]; @@ -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)) { @@ -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 @@ -167,7 +167,6 @@ int main() { } if (ramp_indx == (N_TX_SAMPLES - 1)) { ramp_indx = 0; - looped++; } else ramp_indx++; }