[WT-support] Script for getting next call in Bandmap

Oliver Grossmann oliver.grossmann at bretzi.de
Sat Nov 20 22:53:43 CET 2010


Hi Bob,
thanks for reply, so i understand more and more the API.
Maybe there will be some improvement for the wtRadio:Send() command in 
the future, it would support better homemade equipment and future rigs.

For the InactiveVfo feature, this would help if you are working on the 
2nd VFO and you want to switch 1st VFO to next spot, but this isn't so 
important.
But if the command isn't working like the name says, it should be 
removed from the API or should be fixed. It would help for implementing 
some Radio features.

I will check this with my K3 after the CQWW next weekend.

Thanks for all
Olli

------------------------------------------------------------------------
   Oliver Grossmann   |   DH2WQ   |   oliver.grossmann at bretzi.de

On 20.11.2010 19:45, Bob Wilson, N6TV wrote:
> On Sat, Nov 20, 2010 at 1:21 AM, Oliver Grossmann 
> <oliver.grossmann at bretzi.de <mailto:oliver.grossmann at bretzi.de>> wrote:
>
>     What do you mean by
>
>     "You cannot write a Lua script to read a response from the radio"?
>
>
> What I mean is that the Win-Test Lua API does not allow you to send 
> your own CAT command and receive the response.  This is not a Lua 
> limitation, this is a limitation of the Win-Test API.
>
> The GetFreq API is there to let you read the radio frequency.
>
> On Sat, Nov 20, 2010 at 3:14 AM, Oliver Grossmann 
> <oliver.grossmann at bretzi.de <mailto:oliver.grossmann at bretzi.de>> wrote:
>
>     1) if I'm sending a command with wtRadio:Send(), will the answer
>     be captured by Win-Test?
>
>
> No, whatever reply Win-Test gets from the radio, it cannot be 
> forwarded to your Lua script due to internal Win-Test implementation 
> restrictions.
>
>     I tried RadioState = wtRadio:Send("IF;"), but it wasn't possible
>     to display the variable.
>
>
> Correct, as I was saying, you cannot send your own CAT command to the 
> radio and expect the answer to be returned.  You need to use the 
> GetFreq API instead.
>
>     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).
>
>
> Don't worry about active / inactive.  If you want to get/set the 
> frequency of VFO B, just do:
>
> VFOBfreq = wtRadio:GetFreq(WT_RADIO_VFOB)
>
> wtRadio:SetFreq(VFOBFreq, WT_RADIO_VFOB)
>
> See http://download.win-test.com/v4/lua for the complete Lua API 
> documentation (Wiki has not been able to keep up).
>
> I will be busy with a domestic contest this weekend and unable to 
> response further until Monday.
>
> 73,
> Bob, N6TV
>
>
> _______________________________________________
> 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/baa52a8a/attachment.htm 


More information about the Support mailing list