Exemple #1
0
void initReceiveChannel() {
    setRXMode(modeAM);
    SetRXABandpassFreqs(CHANNEL_RX, (double)filterLow, (double)filterHigh);
	setFilter(filterLow, filterHigh);
    setAGCMode(AGC_MEDIUM);

    SetRXAAMDSBMode(CHANNEL_RX, 0);
    SetRXAShiftRun(CHANNEL_RX, 0);

    SetRXAEMNRPosition(CHANNEL_RX, nr_agc);
    SetRXAEMNRgainMethod(CHANNEL_RX, nr2_gain_method);
    SetRXAEMNRnpeMethod(CHANNEL_RX, nr2_npe_method);
    SetRXAEMNRRun(CHANNEL_RX, nr2);
    SetRXAEMNRaeRun(CHANNEL_RX, nr2_ae);

    SetRXAANRVals(CHANNEL_RX, 64, 16, 16e-4, 10e-7); // defaults
    SetRXAANRRun(CHANNEL_RX, nr);
    SetRXAANFRun(CHANNEL_RX, anf);
    SetRXASNBARun(CHANNEL_RX, snb);

    SetRXAPanelGain1(CHANNEL_RX, 0.9);//volume
	
	SetRXAShiftFreq(CHANNEL_RX, 0.0);
    SetRXAShiftRun(CHANNEL_RX, 0);
	
	SetChannelState(CHANNEL_RX,1,0);
}
Exemple #2
0
static void setupRX(int rx) {
    setRXMode(rx,mode);
    SetRXABandpassFreqs(rx, (double)filterLow, (double)filterHigh);
    SetRXAAGCMode(rx, agc);
    SetRXAAGCTop(rx,agc_gain);

    SetRXAAMDSBMode(rx, 0);
    SetRXAShiftRun(rx, 0);

    SetRXAEMNRPosition(rx, nr_agc);
    SetRXAEMNRgainMethod(rx, nr2_gain_method);
    SetRXAEMNRnpeMethod(rx, nr2_npe_method);
    SetRXAEMNRRun(rx, nr2);
    SetRXAEMNRaeRun(rx, nr2_ae);

    SetRXAANRVals(rx, 64, 16, 16e-4, 10e-7); // defaults
    SetRXAANRRun(rx, nr);
    SetRXAANFRun(rx, anf);
    SetRXASNBARun(rx, snb);
}
Exemple #3
0
void setFilter(int low,int high) {
fprintf(stderr,"setFilter: %d %d\n",low,high);
    if(mode==modeCWL) {
        filterLow=-cwPitch-low;
        filterHigh=-cwPitch+high;
    } else if(mode==modeCWU) {
        filterLow=cwPitch-low;
        filterHigh=cwPitch+high;
    } else {
        filterLow=low;
        filterHigh=high;
    }

    double fl=filterLow+ddsOffset;
    double fh=filterHigh+ddsOffset;

fprintf(stderr,"setFilter: fl=%f fh=%f\n",fl,fh);
    RXANBPSetFreqs(receiver,(double)filterLow,(double)filterHigh);
    SetRXABandpassFreqs(receiver, fl,fh);
    SetRXASNBAOutputBandwidth(receiver, (double)filterLow, (double)filterHigh);

    SetTXABandpassFreqs(CHANNEL_TX, fl,fh);
}