Skip to content

Commit 4af31e2

Browse files
committed
Minor test cleanup
Signed-off-by: Travis F. Collins <[email protected]>
1 parent afeab80 commit 4af31e2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/hardware/test_ad9364.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#define assertm(exp, msg) assert(((void)msg, exp))
1616

1717
// User Set
18-
#define N_TX_SAMPLES 16
18+
#define N_TX_SAMPLES 128
1919
#define RX_OVERSAMPLE 4
20-
#define SUCCESSIVE_BUFFER_TO_CHECK 2
20+
#define SUCCESSIVE_BUFFER_TO_CHECK 10
2121
#define N_RX_BLOCKS 4
2222

2323
// Calculated/Constant
@@ -116,7 +116,6 @@ int main() {
116116

117117
bool found_start = false;
118118
int16_t ramp_indx = 0;
119-
int16_t looped = 0;
120119

121120
// Create check vector
122121
bool ramp_found_check_vector[SUCCESSIVE_BUFFER_TO_CHECK];
@@ -139,6 +138,7 @@ int main() {
139138
// blocks
140139
found_start = false;
141140
continuous_check_vector[i] = true; // assume good
141+
ramp_indx = 0;
142142

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

153153
// Make sure ramp is continuous
@@ -167,7 +167,6 @@ int main() {
167167
}
168168
if (ramp_indx == (N_TX_SAMPLES - 1)) {
169169
ramp_indx = 0;
170-
looped++;
171170
} else
172171
ramp_indx++;
173172
}

0 commit comments

Comments
 (0)