[WT-support] Script for getting next call in Bandmap
Oliver Grossmann
oliver.grossmann at bretzi.de
Sat Nov 20 12:14:17 CET 2010
Hi,
i tried some stuff and i have further questions.
1) if I'm sending a command with wtRadio:Send(), will the answer be
captured by Win-Test? I tried RadioState = wtRadio:Send("IF;"), but it
wasn't possible to display the variable.
2) To be able to use this also on a VFO on a different Band i changed
the script to:
-- Save current Active VFO frequency
local ActiveVFOfreq = wtRadio:GetFreq()
-- Work on
wtRadio:SetFreq( wtRadio:GetFreqInactiveVfo() )
-- Press Ctrl-Up to move active VFO to new freq
wtApp:SendKeyCode(294, WT_KEY_CTRL)
-- Set VFO B freq to current VFO A freq
wtRadio:SetFreqInactiveVfo( wtRadio:GetFreq() )
-- Restore original VFO A freq
wtRadio:SetFreq(ActiveVFOfreq)
-- No further keystrokes
return -1#
For my understanding Set/Get FreqInactiveVfo should work on the non
active VFO, but for my TS-850, the commands were send always to VFO B,
even if active VFO is B (VFO B iy yellow in Bandmap). (I checked the CAT
command with microHam CAT Monitor). Is this a bug or am i wrong with my
understanding of this command? For now i can just step jump around in
Bandmap if VFO A is the active on. Mainly this would be enough, but it
would be nice if there are no odds in Programm Control.
Olli
------------------------------------------------------------------------
Oliver Grossmann | DH2WQ | oliver.grossmann at bretzi.de
On 20.11.2010 10:21, Oliver Grossmann wrote:
> Hello Bob,
> this script works great. But I for me the 2nd line is reading from the
> radio.
> What do you mean by
>
> "You cannot write a Lua script to read a response from the radio"?
> I'm new to LUA, i'm more in C and C++, but i will read the LUA manual
> to get a better understanding.
>
> I will change the script so it is working either with VFO A and VFO B.
>
> thanks Olli
> ------------------------------------------------------------------------
> Oliver Grossmann | DH2WQ | oliver.grossmann at bretzi.de
>
> On 20.11.2010 02:55, Bob Wilson, N6TV wrote:
>> Olli,
>>
>> You cannot write a Lua script to read a response from the radio. You
>> can issue an "IF;" command to the K3, but you cannot read the results.
>>
>> Maybe the problem is that once you switch VFO B, the frequency in the
>> band map changes, so Ctrl-Up is going to start from a new place.
>>
>> One approach that may work better than swapping VFOs is to :
>>
>> -- Save current VFO A frequency
>> local VFOAfreq = wtRadio:GetFreq(WT_RADIO_VFOA)
>>
>> -- Press Ctrl-Up to move VFO A to new freq
>> wtApp:SendKeyCode(294, WT_KEY_CTRL)
>>
>> -- Set VFO B freq to current VFO A freq
>> wtRadio:SetFreqSubVfo( wtRadio:GetFreq(WT_RADIO_VFOA) )
>>
>> -- Restore original VFO A freq
>> wtRadio:SetFreq(VFOAfreq, WT_RADIO_VFOA)
>>
>> -- No further keystrokes
>> return -1
>>
>> You may have to add a wtApp:Sleep(100) to allow the radio to switch
>> frequencies.
>>
>> On a K3 you could issue a command to do A->B directly (SWT13;).
>>
>> I have not tested it, please report results.
>>
>> 73,
>> Bob, N6TV
>>
>> On Fri, Nov 19, 2010 at 5:18 PM, Oliver Grossmann
>> <oliver.grossmann at bretzi.de <mailto:oliver.grossmann at bretzi.de>> wrote:
>>
>> Hello,
>> I tried some stuff, but nothing seems to work. The cat command
>> for the TRX works just fine for switching.
>> The problem seems to be in time gap between setting TRX to 2nd
>> VFO and WinTest getting confirmation of switching VFO from the radio.
>>
>> If I'm placing a wtApp:Sleep(n) the Programm will do nothing in
>> this time, even not checking if TRX status has changed.
>>
>> I think i will try to get the status from the TS-850 by
>> interpreting the return value of the IF command, or implement an
>> delay from system time without stopping the WinTest Application.
>>
>> If someone has anymore hints i will be looking for this.
>>
>> Olli
>>
>> ------------------------------------------------------------------------
>> Oliver Grossmann | DH2WQ | oliver.grossmann at bretzi.de
>> <mailto:oliver.grossmann at bretzi.de>
>>
>> On 19.11.2010 20:00, Laurent HAAS - F6FVY wrote:
>>> Hi
>>>
>>> Le 19/11/2010 19:44, Bob Wilson, N6TV a écrit :
>>>
>>>
>>>> If I could figure out how to send up arrow and down arrow commands (key
>>>> code?) from Lua
>>>>
>>> Try
>>>
>>> wtApp:SendKeyCode(294. 4) for the Ctrl-Up key
>>> wtApp:SendKeyCode(296, 4) for the Ctrl-Down key
>>>
>>> Not deeply tested.
>>>
>>> 73
>>>
>>> Larry - F6FVY
>>> _______________________________________________
>>> Support mailing list
>>> Support at win-test.com <mailto:Support at win-test.com>
>>> http://www.f5mzn.org/cgi-bin/mailman/listinfo/support
>>>
>>
>> _______________________________________________
>> Support mailing list
>> Support at win-test.com <mailto:Support at win-test.com>
>> http://www.f5mzn.org/cgi-bin/mailman/listinfo/support
>>
>>
>>
>> _______________________________________________
>> Support mailing list
>> Support at win-test.com
>> http://www.f5mzn.org/cgi-bin/mailman/listinfo/support
>>
>
>
> _______________________________________________
> Support mailing list
> Support at win-test.com
> http://www.f5mzn.org/cgi-bin/mailman/listinfo/support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.f5mzn.org/pipermail/support/attachments/20101120/63715e58/attachment.htm
More information about the Support
mailing list