WIP: added samp_rate/4 CW to test_scheduled_retune
This commit is contained in:
parent
b4cc0acb6e
commit
ae6ef3b2a1
1 changed files with 11 additions and 2 deletions
|
|
@ -59,6 +59,8 @@
|
|||
#define TS_INC SAMPLE_RATE // 1 second hop intervals
|
||||
#define RETUNE_INC (NUM_SAMPLES + (TS_INC - NUM_SAMPLES) / 10)
|
||||
|
||||
#define CW true
|
||||
|
||||
int schedule_retune(struct bladerf *dev, bladerf_module m, struct hop_set *hops,
|
||||
bool quick_tune, uint64_t *hop_ts)
|
||||
{
|
||||
|
|
@ -100,9 +102,16 @@ int run_test(struct bladerf *dev, bladerf_module module,
|
|||
}
|
||||
|
||||
if (module == BLADERF_MODULE_TX) {
|
||||
/* Set IQ values to ~ sqrt(2)/2 */
|
||||
int16_t cw_samp_values[4] = {0, 2047, 0, -2047};
|
||||
for (i = 0; i < (2 * NUM_SAMPLES); i += 2) {
|
||||
samples[i] = samples[i+1] = 1448;
|
||||
if (CW) {
|
||||
/* IQ values for CW @ -1/4 samp_rate */
|
||||
samples[i] = cw_samp_values[(i/2) % 4];
|
||||
samples[i+1] = cw_samp_values[(i/2 + 1) % 4];
|
||||
} else {
|
||||
/* Set IQ values to ~ sqrt(2)/2 */
|
||||
samples[i] = samples[i+1] = 1448;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out = fopen("samples.bin", "wb");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue