From: John Melton - G0ORX/N6LYT Date: Thu, 24 Nov 2016 21:31:32 +0000 (+0000) Subject: interim push for XVTR X-Git-Url: https://git.rkrishnan.org/pf/components//%22%22.?a=commitdiff_plain;h=37c5465b3e6fea1721d8542d4aae240cda0f50e1;p=pihpsdr.git interim push for XVTR --- diff --git a/Makefile b/Makefile index c6d9e3e..896a946 100644 --- a/Makefile +++ b/Makefile @@ -192,8 +192,7 @@ sliders.h \ version.h \ vfo.h \ waterfall.h \ -wdsp_init.h \ -xvtr.h +wdsp_init.h OBJS= \ diff --git a/band.c b/band.c index 39660e6..0f104e1 100644 --- a/band.c +++ b/band.c @@ -19,12 +19,12 @@ #include #include +#include #include "bandstack.h" #include "band.h" #include "filter.h" #include "mode.h" -#include "xvtr.h" #include "alex.h" #include "property.h" @@ -57,7 +57,7 @@ BANDSTACK_ENTRY bandstack_entries60[] = BANDSTACK_ENTRY bandstack_entries40[] = {{7001000LL,7001000LL,modeCWL,filterF0,-2800,-200,-2800,-200}, - {7152000LL,71521000LL,modeLSB,filterF5,-2800,-200,-2800,-200}, + {7152000LL,7152000LL,modeLSB,filterF5,-2800,-200,-2800,-200}, {7255000LL,7255000LL,modeLSB,filterF5,-2800,-200,-2800,-200}}; BANDSTACK_ENTRY bandstack_entries30[] = @@ -186,59 +186,6 @@ BANDSTACK bandstackAIR={6,1,bandstack_entriesAIR}; BANDSTACK bandstackGEN={3,1,bandstack_entriesGEN}; BANDSTACK bandstackWWV={5,1,bandstack_entriesWWV}; -BAND bands[BANDS] = - {{"160",&bandstack160,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.0}, - {"80",&bandstack80,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5}, - {"60",&bandstack60,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5}, - {"40",&bandstack40,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5}, - {"30",&bandstack30,0,0,0,0,0,ALEX_ATTENUATION_0dB,41.3}, - {"20",&bandstack20,0,0,0,0,0,ALEX_ATTENUATION_0dB,40.5}, - {"18",&bandstack18,0,0,0,0,0,ALEX_ATTENUATION_0dB,40.0}, - {"15",&bandstack15,0,0,0,0,0,ALEX_ATTENUATION_0dB,39.6}, - {"12",&bandstack12,0,0,0,0,0,ALEX_ATTENUATION_0dB,39.0}, - {"10",&bandstack10,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"50",&bandstack50,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, -#ifdef LIMESDR - {"70",&bandstack70,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"144",&bandstack144,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"220",&bandstack144,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"430",&bandstack430,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"902",&bandstack430,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"1240",&bandstack1240,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"2300",&bandstack2300,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"3400",&bandstack3400,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, - {"AIR",&bandstackAIR,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8}, -#endif - {"GEN",&bandstackGEN,0,0,0,0,0,ALEX_ATTENUATION_0dB,0}, - {"WWV",&bandstackWWV,0,0,0,0,0,ALEX_ATTENUATION_0dB,0}}; - -#define NUM_BAND_LIMITS 22 - -BAND_LIMITS bandLimits[NUM_BAND_LIMITS] = { - {1800000LL,2000000LL}, - {3500000LL,4000000LL}, - {5330500LL,5403500LL}, - {7000000LL,7300000LL}, - {10100000LL,10150000LL}, - {14000000LL,14350000LL}, - {18068000LL,18168000LL}, - {21000000LL,21450000LL}, - {24890000LL,24990000LL}, - {28000000LL,29700000LL}, - {50000000LL,54000000LL}, - {144000000LL,148000000LL}, - {222000000LL,224980000LL}, - {420000000LL,450000000LL}, - {902000000LL,928000000LL}, - {1240000000LL,1300000000LL}, - {2300000000LL,2450000000LL}, - {3400000000LL,3410000000LL}, - {5760000000LL,5760400000LL}, - {10368000000LL,10368400000LL}, - {24192000000LL,24192400000LL}, - {47088000000LL,47088400000LL} -}; - /* --------------------------------------------------------------------------*/ /** * @brief xvtr @@ -246,9 +193,9 @@ BAND_LIMITS bandLimits[NUM_BAND_LIMITS] = { /* ----------------------------------------------------------------------------*/ BANDSTACK_ENTRY bandstack_entries_xvtr_0[] = - {{144000000LL,modeUSB,filterF6,150,2550,150,2550}}; + {{0LL,modeUSB,filterF6,150,2550,150,2550}}; BANDSTACK_ENTRY bandstack_entries_xvtr_1[] = - {{430000000LL,modeUSB,filterF6,150,2550,150,2550}}; + {{0LL,modeUSB,filterF6,150,2550,150,2550}}; BANDSTACK_ENTRY bandstack_entries_xvtr_2[] = {{0LL,modeUSB,filterF6,150,2550,150,2550}}; BANDSTACK_ENTRY bandstack_entries_xvtr_3[] = @@ -271,21 +218,72 @@ BANDSTACK bandstack_xvtr_5={1,1,bandstack_entries_xvtr_5}; BANDSTACK bandstack_xvtr_6={1,1,bandstack_entries_xvtr_6}; BANDSTACK bandstack_xvtr_7={1,1,bandstack_entries_xvtr_7}; -static XVTR xvtrs[XVTRS]= -/* - {{"144",&bandstack_xvtr_0,0x00,0x00,0,0,0,0,0.0,144000000LL,146000000LL,116000000LL}, - {"430",&bandstack_xvtr_1,0x00,0x00,0,0,0,0,0.0,430000000LL,432000000LL,402000000LL}, -*/ - {{"",&bandstack_xvtr_2,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_2,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_2,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_3,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_4,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_5,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_6,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}, - {"",&bandstack_xvtr_7,0x00,0x00,0,0,0,0,0.0,0LL,0LL,0LL}}; +BAND bands[BANDS+XVTRS] = + {{"160",&bandstack160,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.0,0LL,0LL,0LL}, + {"80",&bandstack80,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5,0LL,0LL,0LL}, + {"60",&bandstack60,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5,0LL,0LL,0LL}, + {"40",&bandstack40,0,0,0,0,0,ALEX_ATTENUATION_0dB,42.5,0LL,0LL,0LL}, + {"30",&bandstack30,0,0,0,0,0,ALEX_ATTENUATION_0dB,41.3,0LL,0LL,0LL}, + {"20",&bandstack20,0,0,0,0,0,ALEX_ATTENUATION_0dB,40.5,0LL,0LL,0LL}, + {"18",&bandstack18,0,0,0,0,0,ALEX_ATTENUATION_0dB,40.0,0LL,0LL,0LL}, + {"15",&bandstack15,0,0,0,0,0,ALEX_ATTENUATION_0dB,39.6,0LL,0LL,0LL}, + {"12",&bandstack12,0,0,0,0,0,ALEX_ATTENUATION_0dB,39.0,0LL,0LL,0LL}, + {"10",&bandstack10,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"50",&bandstack50,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, +#ifdef LIMESDR + {"70",&bandstack70,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"144",&bandstack144,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"220",&bandstack144,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"430",&bandstack430,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"902",&bandstack430,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"1240",&bandstack1240,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"2300",&bandstack2300,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"3400",&bandstack3400,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"AIR",&bandstackAIR,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, +#endif + {"GEN",&bandstackGEN,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"WWV",&bandstackWWV,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, +// XVTRS + {"",&bandstack_xvtr_0,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_1,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_2,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_3,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_4,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_5,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_6,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL}, + {"",&bandstack_xvtr_7,0,0,0,0,0,ALEX_ATTENUATION_0dB,38.8,0LL,0LL,0LL} + }; + + +#define NUM_BAND_LIMITS 22 + +BAND_LIMITS bandLimits[NUM_BAND_LIMITS] = { + {1800000LL,2000000LL}, + {3500000LL,4000000LL}, + {5330500LL,5403500LL}, + {7000000LL,7300000LL}, + {10100000LL,10150000LL}, + {14000000LL,14350000LL}, + {18068000LL,18168000LL}, + {21000000LL,21450000LL}, + {24890000LL,24990000LL}, + {28000000LL,29700000LL}, + {50000000LL,54000000LL}, + {144000000LL,148000000LL}, + {222000000LL,224980000LL}, + {420000000LL,450000000LL}, + {902000000LL,928000000LL}, + {1240000000LL,1300000000LL}, + {2300000000LL,2450000000LL}, + {3400000000LL,3410000000LL}, + {5760000000LL,5760400000LL}, + {10368000000LL,10368400000LL}, + {24192000000LL,24192400000LL}, + {47088000000LL,47088400000LL} +}; + BANDSTACK_ENTRY *bandstack_entry_get_current() { BANDSTACK *bandstack=bands[band].bandstack; BANDSTACK_ENTRY *entry=&bandstack->entry[bandstack->current_entry]; @@ -332,11 +330,6 @@ BAND *band_set_current(int b) { return &bands[b]; } -XVTR* band_get_xvtr(int b) { - XVTR* xvtr=&xvtrs[b]; - return xvtr; -} - void bandSaveState() { char name[128]; char value[128]; @@ -345,7 +338,11 @@ void bandSaveState() { int b; int stack; - for(b=0;b0) { + sprintf(name,"band.%d.title",b); + setProperty(name,bands[b].title); + sprintf(value,"%d",bands[b].bandstack->entries); sprintf(name,"band.%d.entries",b); setProperty(name,value); @@ -364,6 +361,7 @@ void bandSaveState() { sprintf(value,"%d",bands[b].alexTxAntenna); sprintf(name,"band.%d.alexTxAntenna",b); + sprintf(name,"band.%d.alexTxAntenna",b); setProperty(name,value); sprintf(value,"%d",bands[b].alexAttenuation); @@ -382,6 +380,18 @@ void bandSaveState() { sprintf(name,"band.%d.OCtx",b); setProperty(name,value); + sprintf(value,"%lld",bands[b].frequencyMin); + sprintf(name,"band.%d.frequencyMin",b); + setProperty(name,value); + + sprintf(value,"%lld",bands[b].frequencyMax); + sprintf(name,"band.%d.frequencyMax",b); + setProperty(name,value); + + sprintf(value,"%lld",bands[b].frequencyLO); + sprintf(name,"band.%d.frequencyLO",b); + setProperty(name,value); + for(stack=0;stackentries;stack++) { entry=bands[b].bandstack->entry; entry+=stack; @@ -415,6 +425,7 @@ void bandSaveState() { setProperty(name,value); } + } } sprintf(value,"%d",band); @@ -429,8 +440,13 @@ void bandRestoreState() { BANDSTACK_ENTRY* entry; int current; +fprintf(stderr,"bandRestoreState: restore bands\n"); + + for(b=0;bentries=atoi(value); @@ -475,6 +491,18 @@ void bandRestoreState() { value=getProperty(name); if(value) bands[b].OCtx=atoi(value); + sprintf(name,"band.%d.frequencyMin",b); + value=getProperty(name); + if(value) bands[b].frequencyMin=atoll(value); + + sprintf(name,"band.%d.frequencyMax",b); + value=getProperty(name); + if(value) bands[b].frequencyMax=atoll(value); + + sprintf(name,"band.%d.frequencyLO",b); + value=getProperty(name); + if(value) bands[b].frequencyLO=atoll(value); + for(stack=0;stackentries;stack++) { entry=bands[b].bandstack->entry; entry+=stack; @@ -509,6 +537,7 @@ void bandRestoreState() { } } + value=getProperty("band"); if(value) band=atoi(value); } diff --git a/band.h b/band.h index cf28845..6438bcc 100644 --- a/band.h +++ b/band.h @@ -22,7 +22,6 @@ #include #include "bandstack.h" -#include "xvtr.h" #define band160 0 #define band80 1 @@ -55,6 +54,8 @@ #define HAM_BANDS 11 #endif +#define XVTRS 8 + /* --------------------------------------------------------------------------*/ /** * @brief Bandlimit definition @@ -80,6 +81,9 @@ struct _BAND { int alexTxAntenna; int alexAttenuation; double pa_calibration; + long long frequencyMin; + long long frequencyMax; + long long frequencyLO; }; typedef struct _BAND BAND; @@ -98,6 +102,4 @@ BANDSTACK_ENTRY *bandstack_entry_get_current(); BAND_LIMITS* getBandLimits(long long minDisplay,long long maxDisplay); -XVTR* getXvtr(int i); - #endif diff --git a/frequency.c b/frequency.c index ac13728..85b6a69 100644 --- a/frequency.c +++ b/frequency.c @@ -30,7 +30,6 @@ // #include -#include "xvtr.h" #include "band.h" #include "frequency.h" diff --git a/new_menu.c b/new_menu.c index d356dd4..7198265 100644 --- a/new_menu.c +++ b/new_menu.c @@ -210,11 +210,10 @@ static gboolean new_menu_pressed_event_cb (GtkWidget *widget, g_signal_connect (freedv_b, "button-press-event", G_CALLBACK(freedv_cb), NULL); gtk_grid_attach(GTK_GRID(grid),freedv_b,3,2,1,1); #endif -/* + GtkWidget *xvtr_b=gtk_button_new_with_label("XVTR"); g_signal_connect (xvtr_b, "button-press-event", G_CALLBACK(xvtr_cb), NULL); gtk_grid_attach(GTK_GRID(grid),xvtr_b,4,2,1,1); -*/ gtk_container_add(GTK_CONTAINER(content),grid); diff --git a/pihpsdr b/pihpsdr index 38cc7fb..f034e9b 100755 Binary files a/pihpsdr and b/pihpsdr differ diff --git a/radio.c b/radio.c index 11aeba1..821e030 100644 --- a/radio.c +++ b/radio.c @@ -331,6 +331,7 @@ int isTransmitting() { } void setFrequency(long long f) { + BAND *band=band_get_current_band(); BANDSTACK_ENTRY* entry=bandstack_entry_get_current(); if(entry->frequencyA!=f) { @@ -366,6 +367,9 @@ void setFrequency(long long f) { } ddsFrequency=f; + if(band->frequencyLO!=0LL) { + ddsFrequency=f-band->frequencyLO; + } switch(protocol) { case NEW_PROTOCOL: schedule_high_priority(5); diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar index 5c01502..5b5102f 100644 Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr index 38cc7fb..f034e9b 100755 Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ diff --git a/toolbar.c b/toolbar.c index 2b518ae..d0514b5 100644 --- a/toolbar.c +++ b/toolbar.c @@ -29,7 +29,6 @@ #include "filter.h" #include "frequency.h" #include "bandstack.h" -#include "xvtr.h" #include "band.h" #include "discovered.h" #include "new_protocol.h" @@ -178,11 +177,7 @@ void band_cb(GtkWidget *widget, gpointer data) { } #endif - if(ititle)>0) { GtkWidget *b=gtk_button_new_with_label(band->title); set_button_text_color(b,"black"); diff --git a/xvtr.h b/xvtr.h deleted file mode 100644 index 4e29307..0000000 --- a/xvtr.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) -* 2015 - John Melton, G0ORX/N6LYT -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -*/ - -#ifndef _XVTR_H -#define _XVTR_H - -#include "bandstack.h" - -#define XVTRS 8 - -/* --------------------------------------------------------------------------*/ -/** -* @brief XVTR definition -*/ -struct _XVTR { - char title[16]; - BANDSTACK *bandstack; - unsigned char OCrx; - unsigned char OCtx; - int preamp; - int alexRxAntenna; - int alexTxAntenna; - int alexAttenuation; - double pa_calibration; - long long frequencyMin; - long long frequencyMax; - long long frequencyLO; -}; - -typedef struct _XVTR XVTR; - -#endif diff --git a/xvtr_menu.c b/xvtr_menu.c index 585a053..943d3c6 100644 --- a/xvtr_menu.c +++ b/xvtr_menu.c @@ -23,18 +23,50 @@ #include #include "new_menu.h" +#include "band.h" +#include "filter.h" +#include "mode.h" #include "xvtr_menu.h" -#include "xvtr.h" #include "radio.h" static GtkWidget *parent_window=NULL; - static GtkWidget *menu_b=NULL; - static GtkWidget *dialog=NULL; +static GtkWidget *title[BANDS+XVTRS]; +static GtkWidget *min_frequency[BANDS+XVTRS]; +static GtkWidget *max_frequency[BANDS+XVTRS]; +static GtkWidget *lo_frequency[BANDS+XVTRS]; static gboolean close_cb (GtkWidget *widget, GdkEventButton *event, gpointer data) { + int i; if(dialog!=NULL) { + const char *t; + const char *minf; + const char *maxf; + const char *lof; + for(i=BANDS;ibandstack; + BANDSTACK_ENTRY *entry=bandstack->entry; + t=gtk_entry_get_text(GTK_ENTRY(title[i])); + strcpy(xvtr->title,t); + if(strlen(t)!=0) { + minf=gtk_entry_get_text(GTK_ENTRY(min_frequency[i])); + xvtr->frequencyMin=atoll(minf); + maxf=gtk_entry_get_text(GTK_ENTRY(max_frequency[i])); + xvtr->frequencyMax=atoll(maxf); + lof=gtk_entry_get_text(GTK_ENTRY(lo_frequency[i])); + xvtr->frequencyLO=atoll(lof); + entry->frequencyA=xvtr->frequencyMin; + entry->frequencyB=xvtr->frequencyMin; + entry->mode=modeUSB; + entry->filter=filterF6; + } else { + xvtr->frequencyMin=0; + xvtr->frequencyMax=0; + xvtr->frequencyLO=0; + } + } gtk_widget_destroy(dialog); dialog=NULL; sub_menu=NULL; @@ -44,7 +76,9 @@ static gboolean close_cb (GtkWidget *widget, GdkEventButton *event, gpointer dat void xvtr_menu(GtkWidget *parent) { int i,j; + char f[16]; +fprintf(stderr,"xvtr_menu\n"); parent_window=parent; dialog=gtk_dialog_new(); @@ -63,14 +97,51 @@ void xvtr_menu(GtkWidget *parent) { GtkWidget *grid=gtk_grid_new(); gtk_grid_set_column_spacing (GTK_GRID(grid),10); - gtk_grid_set_row_spacing (GTK_GRID(grid),10); - gtk_grid_set_row_homogeneous(GTK_GRID(grid),TRUE); + //gtk_grid_set_row_spacing (GTK_GRID(grid),10); + //gtk_grid_set_row_homogeneous(GTK_GRID(grid),TRUE); gtk_grid_set_column_homogeneous(GTK_GRID(grid),TRUE); GtkWidget *close_b=gtk_button_new_with_label("Close XVTR"); g_signal_connect (close_b, "pressed", G_CALLBACK(close_cb), NULL); gtk_grid_attach(GTK_GRID(grid),close_b,0,0,1,1); + GtkWidget *label=gtk_label_new("Title"); + gtk_grid_attach(GTK_GRID(grid),label,0,1,1,1); + label=gtk_label_new("Min Freq (Hz)"); + gtk_grid_attach(GTK_GRID(grid),label,1,1,1,1); + label=gtk_label_new("Max Freq (Hz)"); + gtk_grid_attach(GTK_GRID(grid),label,2,1,1,1); + label=gtk_label_new("LO Freq (Hz)"); + gtk_grid_attach(GTK_GRID(grid),label,3,1,1,1); + + + + for(i=BANDS;ititle); + + title[i]=gtk_entry_new(); + gtk_entry_set_text(GTK_ENTRY(title[i]),xvtr->title); + gtk_grid_attach(GTK_GRID(grid),title[i],0,i+2,1,1); + + min_frequency[i]=gtk_entry_new(); + sprintf(f,"%lld",xvtr->frequencyMin); + gtk_entry_set_text(GTK_ENTRY(min_frequency[i]),f); + gtk_grid_attach(GTK_GRID(grid),min_frequency[i],1,i+2,1,1); + + max_frequency[i]=gtk_entry_new(); + sprintf(f,"%lld",xvtr->frequencyMax); + gtk_entry_set_text(GTK_ENTRY(max_frequency[i]),f); + gtk_grid_attach(GTK_GRID(grid),max_frequency[i],2,i+2,1,1); + + lo_frequency[i]=gtk_entry_new(); + sprintf(f,"%lld",xvtr->frequencyLO); + gtk_entry_set_text(GTK_ENTRY(lo_frequency[i]),f); + gtk_grid_attach(GTK_GRID(grid),lo_frequency[i],3,i+2,1,1); + + } + gtk_container_add(GTK_CONTAINER(content),grid); sub_menu=dialog;