Olivia Pre/Postamble visibility on waterfall

Changed pre/postamble sample block sizes to 512 for passing
    to ModulateXmtr.  This allows the waterfall FFT to faithfully
    reproduce the tones on the waterfall.  This change only effects
    the monitored signal and not the actual transmitted signal
pull/2/head
David Freese 2010-03-04 21:34:50 -06:00
rodzic a454879c97
commit 82eaead785
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -89,7 +89,7 @@ void olivia::tx_init(SoundBase *sc)
void olivia::send_preamble()
{
double freqa, freqb;
int i, j, sr4 = samplerate / 4;
int i, j, sr4 = 8192 / 4;
double ampshape[sr4];
for (int i = 0; i < sr4; i++) ampshape[i] = 1.0;
@ -112,13 +112,15 @@ void olivia::send_preamble()
outbuf[i] = nco(freqa) * ampshape[j];
for (i = 3*sr4, j = 0; i < samplerate; i++, j++)
outbuf[i] = nco(freqb) * ampshape[j];
ModulateXmtr(outbuf, samplerate);
for (j = 0; j < 8192; j += 512)
ModulateXmtr(&outbuf[j], 512);
}
void olivia::send_postamble()
{
double freqa, freqb;
int i, j, sr4 = samplerate / 4;
int i, j, sr4 = 8192 / 4;
double ampshape[sr4];
for (int i = 0; i < sr4; i++) ampshape[i] = 1.0;
@ -141,7 +143,9 @@ void olivia::send_postamble()
outbuf[i] = nco(freqa) * ampshape[j];
for (i = 3*sr4, j = 0; i < samplerate; i++, j++)
outbuf[i] = nco(freqb) * ampshape[j];
ModulateXmtr(outbuf, samplerate);
for (j = 0; j < 8192; j += 512)
ModulateXmtr(&outbuf[j], 512);
}
void olivia::rx_init()

Wyświetl plik

@ -395,6 +395,7 @@ void modem::ModulateXmtr(double *buffer, int len)
_mdm_scdbl[scptr] = buffer[i] * progdefaults.TxMonitorLevel;
scptr++;
if (scptr == 512) {
//for (int i = 0; i < 512; i++) printf("%f\n", _mdm_scdbl[i]);
REQ(&waterfall::sig_data, wf, _mdm_scdbl.c_array(), 512, samplerate );
scptr = 0;
_mdm_scdbl.next(); // change buffers