Exemplo n.º 1
0
/**
* @brief Set the A vfo frequency
*
* @param f
*/
void setAFrequency(long long f) {

    double cal;
    dspAFrequency=0;
    ddsAFrequency=0;
    frequencyA=f;

    dspAFrequency=0;
    ddsAFrequency=f-frequencyALO;

    cal=(float)f*calibOffset;
    SetRXOsc(0,0,cal);
    updateVfoADisplay();

    frequencyAChanged=1;

    // check the band
    if(displayHF) {
        int thisBand=getBand(f);
        if(band!=thisBand) {
            if(band!=-1) {
                forceBand(thisBand,FALSE);
            }
        }
    }
}
Exemplo n.º 2
0
void configureXVTRButton() {
    int i;
    int count=0;
    for(i=0;i<12;i++) {
        if(strcmp(xvtr[i].name,"")) {
            count++;
        }
    }

    if(displayHF) {
        gtk_widget_set_sensitive(buttonBand14,count>0);
    }

    if(count==0) {
        if(displayHF==0) {
            // force back to HF bands
            selectBand(buttonBand14);
        }
    } else {
        if(displayHF==0) {
            setXVTRTitles();
            // check xvtr_band still valid
            if(strcmp(xvtr[xvtr_band].name,"")==0) {
                for(i=0;i<12;i++) {
                    if(strcmp(xvtr[i].name,"")) {
                        xvtr_band=i;
                        if(displayHF==0) {
                        }
                        break;
                    }
                }
            }
            forceBand(xvtr_band);
        }
    }

}