File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 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 }
You can’t perform that action at this time.
0 commit comments