[WT-support] Little help with LUA-stuff

Laurent HAAS - F6FVY f6fvy at free.fr
Mon Sep 13 15:50:52 CEST 2010


Hi Toni

Toni Lindén a écrit :

> 1) Changing the CW speed in the middle of the message.
> I tried "old school way" putting -- and ++ in the message (like now-
> pse- qsy- #FREQS +++) but that don't work since I shouldn't put
> anything after calling the script, right?
> I also tried with scripts putting wtKeyer:SetCwSpeed(28) in the
> beginning of the message, but then I'm sticked with 28WPM
> Also tried to put the another speed at the end of the message, but
> then we'll go with that speed all the time.
> As well as if I make two different scripts and put them like #FREQS #SETCW35
> So what I'd like to do is to have message like F7:NW- PSE- QSY
> #FREQS(played 28WPM) ++
> Can I do that somehow?

Actually, while the CW thread fires the Lua script, "its" message is 
ending, and the CW speed is already restored to the same value when it 
started.

Thus, you have to set the CW speed by yourself in the script (with +/- 
speed bursts - balancing is not mandatory), or with wtKeyer:SetCwSpeed 
instructions.

Example :

F7 = PSE- QSY #FREQS

freqs.wts

wtKeyer:Play("---" .. wtRadioSecondary:GetFreq() .. " +++ R?");

If the speed is set at 30 WPM when hitting F7, PSE will be keyed at 30 
WPM, QSY at 26 (= 30 - 4), the radioFreq at 18 (30 - (3 x 4)) and "R?" 
at 30.

> 2) How can I set the rounding for the freqs?

http://www.lua.org/manual/5.1/manual.html

> 3) For some reason #FREQS defined as
> wtKeyer:Play(wtRadioSecondary:GetFreq()) doesn't sent the QRG like it
> should. If I have QRG 14025.3, script will play it like 14025.3 (14025
> .-.-.- 3), not as we're used to 14025R3. Is this bug?

No. The GetFreq function gets the freq as a number. If you want to 
manipulate this number you have to DIY with the Lua language. This is a 
part of the "homework".

73

Larry - F6FVY


More information about the Support mailing list