Пример #1
0
void grabspot(void)
{
    extern char hiscall[];
    extern char mode[];
    extern int cqmode;
    extern int trx_control;

    extern float mem;
    extern float freq;

#ifdef HAVE_LIBHAMLIB
    extern freq_t outfreq;
#else
    extern int outfreq;
#endif

    spot *data;

    if (trx_control == 0)
	return;

    if (hiscall[0] != '\0') {

	data = bandmap_lookup( hiscall );

	if (data != NULL) {

	    outfreq = data -> freq;
	    outfreq -= fldigi_get_carrier();
	    send_bandswitch( (int) outfreq );

	    strcpy( hiscall, data->call );

	    showinfo( getctydata( hiscall ) );
	    searchlog( hiscall );

	    /* if in CQ mode switch to S&P and remember QRG */
	    if (cqmode == CQ) {
		cqmode = S_P;
		strcpy(mode, "S&P     ");
		mem = freq;
		mvprintw(14, 68, "MEM: %7.1f", mem);
	    }

	    refreshp();

	    g_free( data->call );
	    g_free( data );
	}

    }
}
Пример #2
0
double grabspot(void) {
    extern char hiscall[];
    extern int trx_control;

    spot *data;

    if (!trx_control) {
	return 0;   // no trx control
    }

    if (hiscall[0] == '\0') {
	return 0;   // call input is empty
    }

    data = bandmap_lookup(hiscall);

    if (data == NULL) {
	return 0;   // no spot found
    }

    return execute_grab(data);
}