kopia lustrzana https://github.com/jamescoxon/dl-fldigi
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 signalpull/2/head
rodzic
a454879c97
commit
82eaead785
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue