Hi Roger, Daniel and all, > Perhaps there is a reason why this shouldn't work, but... Hmm, yes....
> When I started using 4 simultaneous instances of Linrad for contests, > using a slightly different center frequency for each instance [for various > reasons not germane to this discussion] I didn't want to have to keep > recompiling Linrad with different frequency labels. I hoped that one of > the runtime user files would contain this data and become an easy way of > changing the frequency scale without recompiling Linrad each time I wanted > a different center frequency. > > That is, I wanted to do just what Daniel asked, and for the same > reasons...at 2 am during a contest my math skills are not as good as > usual, and I didn't want to have to do any calculating to figure out where > I was listening. Actually, what really happened was that I decided to set > things up so that each of the 4 separate instances of Linrad could set the > frequency of my FT1000MP to the Linrad receive frequency, so that I could > immediately qsy to any frequency on any of the 4 monitored bands if I > heard a signal I wanted to work. And to do this, the displayed frequency > in Linrad needed to reflect the actual receive frequency. But the 'need' > is exactly the same as what Daniel proposed...a need for the Linrad > display to show the actual Linrad received frequency rather than having an > arbitrary [e.g. zero] center frequency displayed by Linrad. > > I discovered that one of the user files generated by Linrad and contained > in Linrad operating directory had the necessary info, and that by changing > it I could make the scale across the top of the Linrad display read > whatever was necessary. > > The file, for example, for SSB mode is par_ssb_fg and the parameter is > 'freq'. To have the center be '110 kHz' I set this to: > freq [000.110000000000010000000000000000] The problem with changing the information in the par_xx_fg files is that this information is used only when you start receiving. It means you have to exit with X and then return with B to get the new info on the screen. Another easy fix is to make a users_hwaredriver.c by copying users.c (or renaming it.) Then add these two lines: (You must run './configure' before 'make linrad') fg.passband_center =ug.par2; sd[SC_SHOW_CENTER_FQ]++; The place is in new_user_par2(void) just before resume_thread(THREAD_SCREEN); (line 336) This way you can use the the users control box to set whatever value you want for the center frequency of your hardware. Do not use the normal frequency control window in case you use this simple fix. It is a good idea to add the same two lines as the last lines of init_users_control_window(void) (line 458) This will override the info in par_xx_fg and use the stored info from the users graph for the initial frequency. The routine new_user_par2(void) just sets ug.par2 to whatever value you type in and that is then what you will see on the screen. In Daniels case it may be a good idea to make a table with the frequency value for all crystals and then search the table and pick the best matching number from the table rather than precisely what was typed into the box. You can also make boxes to click on to step the frequency up and down between frequencies listed in a table. Look at the routines for ug.par1 to see how to create boxes and how to use them. The "proper" way to set the center frequency of both the hardware and the number displayed on the Linrad screen is to make a users_hwaredriver.c, copy relevant parts from hwaredriver.c into it and modify them to fit your own hardware. There is a table to associate a name to each crystal: // Associate a number to each frequency band that will // need a separate case in set_hardware_frequency. #define AUDIO_MODE 0 #define RX2500_TO_ANT 1 #define RX10700_TO_ANT 2 #define RX70_TO_ANT 3 #define RX144_TO_ANT 4 #define RXHFA_TO_ANT_1800 5 #define RXHFA_TO_ANT_3500 6 #define RXHFA_TO_ANT_7000 7 #define RXHFA_TO_ANT_10000 8 #define RXHFA_TO_ANT_14000 9 #define MAX_BANDS 10 Then there is a table telling what step size to use and what frequency range each crystal covers. FQ_INFO fqinfo[MAX_BANDS]= {0.0 , 0.0 , 0.0 , 1, AUDIO_MODE, 0.025, 1.675, 2.150,-1, RXHFA_TO_ANT_1800, 0.025, 2.500, 2.500, 1, RX2500_TO_ANT, 0.025, 3.475, 3.950,-1, RXHFA_TO_ANT_3500, 0.025, 6.975, 7.450,-1, RXHFA_TO_ANT_7000, 0.025, 9.975, 10.450,-1, RXHFA_TO_ANT_10000, 0.025, 10.675, 10.750,-1, RX10700_TO_ANT, 0.025, 13.975, 14.450,-1, RXHFA_TO_ANT_14000, 0.025, 69.975, 70.450,-1, RX70_TO_ANT, 0.025, 143.975, 145.950,-1, RX144_TO_ANT }; What you will need is something like this: FQ_INFO fqinfo[MAX_BANDS]= {0.0 , 144.0385, 144.0385, 1, XTAL_0385, 0.0 , 144.0780, 144.0780, 1, XTAL_0780, etc. Then you can use the ordinary frequency setting box. By changing set_hardware_frequency you can also use the parallel or serial ports to control your hardware. 73 Leif / SM5BSZ ############################################################# This message is sent to you because you are subscribed to the mailing list <linrad@antennspecialisten.se>. To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>