Ooops, this version will not wait until the last second to obtain the QSY frequency, as you requested.<br><br>QRX for version 2.<br><br>73,<br>Bob, N6TV<br><br><div class="gmail_quote">On Mon, Sep 13, 2010 at 12:02 PM, Bob Wilson, N6TV <span dir="ltr"><<a href="mailto:n6tv@arrl.net">n6tv@arrl.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><div class="gmail_quote">On Mon, Sep 13, 2010 at 6:50 AM, Laurent HAAS - F6FVY <span dir="ltr"><<a href="mailto:f6fvy@free.fr" target="_blank">f6fvy@free.fr</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
> 2) How can I set the rounding for the freqs?<br>
<br>
</div><br><a href="http://www.lua.org/manual/5.1/manual.html" target="_blank">http://www.lua.org/manual/5.1/manual.html</a><br>
<div><br>

</div><br></blockquote></div><br></div>Unfortunately Laurent assumes everyone is computer programmer. :-)<br><br>Fortunately I can help.  The attached script, repeated below, will send a PSE QSY message to the nearest half kHz.  Please test.<br>


<br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">-- FreqS - Send a "PSE QSY" message to the frequency of the secondary radio</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">--         rounding to nearest half kHz</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Assign to F8, F9, F10, or F12 or user choice</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Time-stamp: "13 September 2010 18:56 UTC"   </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Written by N6TV</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">local QSYmsg = "PSE QSY"</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">local QSYfreq = ""</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- Get the VFOA frequency of the secondary radio</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">local freqS = wtRadioSecondary:GetFreq()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- If frequency obtained OK</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">if freqS ~= nil and freqS ~= 0 then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   -- Split the frequency into the whole kHz and the fractional kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   local freqInt, freqFrac = math.modf(freqS)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   -- If fractional kHz is below 0.250 kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   if freqFrac <= 0.25 then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      -- Round DOWN to nearest kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">      QSYfreq = math.floor(freqS)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      -- Else if fractional kHz is above 0.750 kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   elseif freqFrac >= 0.75 then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      -- Round UP to nearest kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">      QSYfreq = math.ceil(freqS)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      -- Else round to nearest half kHz</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   else</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      QSYfreq = math.floor(freqS) .. "R5"</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   end</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">QSYmsg = QSYmsg .. " --" .. QSYfreq .. "++ ?"</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- Play the PSE QSY message</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">wtKeyer:Play(QSYmsg)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- No further keystroke processing</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">return -1</span><br style="font-family: courier new,monospace;"></div><br>Or if you don't want any rounding:<br><br>
<div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">-- FreqSnr - Send a "PSE QSY" message to the frequency of the secondary radio,</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">--           like the FREQnn messages, with no rounding.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Assign to F8, F9, F10, or F12 or user choice</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Time-stamp: "13 September 2010 18:54 UTC"   </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">--</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Written by N6TV</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">local QSYmsg = "PSE QSY"</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">local QSYfreq = ""</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">local freqFrac = ""</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">-- Get the VFOA frequency of the secondary radio</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">local freqS = wtRadioSecondary:GetFreq()</span><br style="font-family: courier new,monospace;">


<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- If frequency obtained OK</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">if freqS ~= nil and freqS ~= 0 then</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   -- Split the frequency into the whole kHz and the fractional kHz</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   QSYfreq, freqFrac = math.modf(freqS)</span><br style="font-family: courier new,monospace;">


<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   -- If fractional kHz is to be sent</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   if freqFrac >= 0.1 and freqFrac <= 0.9 then</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">      -- Play fractional kHz after "R"</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      QSYfreq = QSYfreq .. "R" .. math.floor(freqFrac * 10)</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">   end</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">end</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">QSYmsg = QSYmsg .. " --" .. QSYfreq .. "++ ?"</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- Play the PSE QSY message</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">wtKeyer:Play(QSYmsg)</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">-- No further keystroke processing</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">return -1</span><br style="font-family: courier new,monospace;"></div><br>Unfortunately I cannot enhance either one to work with networked computers at a
multi-multi until new LUA APIs are provided to obtain the values of the
$FREQnn variables, or obtain the frequencies of
networked radios, by band.<br>
<br>73,<br><font color="#888888">Bob, N6TV<br>
</font></blockquote></div><br>