From: c vw Date: Fri, 31 May 2019 15:44:51 +0000 (+0200) Subject: We needed a more permanent solution to the problem of RX panels X-Git-Url: https://git.rkrishnan.org/%5B/listings/flags/status?a=commitdiff_plain;h=084b409d185aa0c329ac07d26488b700e0bdc975;p=pihpsdr.git We needed a more permanent solution to the problem of RX panels that are un-used at program startup. --- diff --git a/Makefile.mac b/Makefile.mac index 980dca8..ec053b9 100644 --- a/Makefile.mac +++ b/Makefile.mac @@ -481,7 +481,9 @@ hpsdrsim: hpsdrsim.o # ========= # Upon starting a freshly built application in an "app" bundle, # it will do the FFT calculations required for wdsp-Wisdom, since -# this is then stored *within* the app bundle. +# this is then stored *within* the app bundle. For experimentation, +# use "make localapp", this will copy such run-time files (WDSP wisom, +# ".props" files and the definition of the MIDI device) to the app bundle. # ############################################################################# app: $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(LIMESDR_OBJS) $(FREEDV_OBJS) \ diff --git a/radio.c b/radio.c index b52f5f8..82c6fbf 100644 --- a/radio.c +++ b/radio.c @@ -564,30 +564,22 @@ void start_radio() { rx_height-=SLIDERS_HEIGHT; } int tx_height=rx_height; - rx_height=rx_height/receivers; + rx_height=rx_height/RECEIVERS; -//fprintf(stderr,"Create %d receivers: height=%d\n",receivers,rx_height); + // + // To be on the safe side, we create ALL receiver panels here + // If upon startup, we only should display one panel, we do the switch below + // for(i=0;ix=0; receiver[i]->y=y; gtk_fixed_put(GTK_FIXED(fixed),receiver[i]->panel,0,y); g_object_ref((gpointer)receiver[i]->panel); - if (isample_rate!=receiver[1]->sample_rate)) { @@ -658,6 +650,18 @@ void start_radio() { gtk_fixed_put(GTK_FIXED(fixed),toolbar,0,y); y+=TOOLBAR_HEIGHT; +// +// Now, if there should only one receiver be displayed +// at startup, do the change. We must momentarily fake +// the number of receivers otherwise radio_change_receivers +// will do nothing. +// + if (receivers != RECEIVERS) { + i=receivers, + receivers=RECEIVERS; + radio_change_receivers(i); + } + gtk_widget_show_all (fixed); //#ifdef FREEDV // if(!active_receiver->freedv) { @@ -746,8 +750,8 @@ void radio_change_sample_rate(int rate) { old_protocol_run(); #ifdef PURESIGNAL tx_set_ps_sample_rate(transmitter,rate); - } #endif + } break; #ifdef LIMESDR case LIMESDR_PROTOCOL: diff --git a/rigctl.c b/rigctl.c index e1dcc8d..ddb6f87 100644 --- a/rigctl.c +++ b/rigctl.c @@ -302,8 +302,6 @@ static long dashlen; static int dotsamples; static int dashsamples; -extern int cw_key_up, cw_key_down, cw_not_ready; - // // send_dash() send a "key-down" of a dashlen, followed by a "key-up" of a dotlen // send_dot() send a "key-down" of a dotlen, followed by a "key-up" of a dotlen diff --git a/transmitter.h b/transmitter.h index 177075e..ed8d82f 100644 --- a/transmitter.h +++ b/transmitter.h @@ -121,6 +121,12 @@ extern TRANSMITTER *create_transmitter(int id, int buffer_size, int fft_size, in void reconfigure_transmitter(TRANSMITTER *tx,int height); +// +// CW pulse shaper variables, needed by rigctl (CAT CW) and iambic.c (LOCALCW) +// +extern int cw_key_up; +extern int cw_key_down; +extern int cw_not_ready; extern void tx_set_mode(TRANSMITTER* tx,int m); extern void tx_set_filter(TRANSMITTER *tx,int low,int high);