From ef6246a61de3c4106e4e44c0d7fef111e9aea023 Mon Sep 17 00:00:00 2001 From: Mike Brashler Date: Thu, 9 Mar 2023 16:25:31 -0800 Subject: [PATCH 1/2] 172 simplify SST exchanges --- CWSST.pas | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/CWSST.pas b/CWSST.pas index 51bb077..2f87f7b 100644 --- a/CWSST.pas +++ b/CWSST.pas @@ -183,6 +183,8 @@ procedure TCWSST.GetExchange(id : integer; out station : TDxStation); Adding a contest: TContest.SendMsg(AMsg): send contest-specfic messages } procedure TCWSST.SendMsg(const AStn: TStation; const AMsg: TStationMessage); +var + prefix : String; begin case AMsg of msgCQ: SendText(AStn, 'CQ SST '); // sent by MyStation @@ -193,27 +195,34 @@ procedure TCWSST.SendMsg(const AStn: TStation; const AMsg: TStationMessage); 3: SendText(AStn, 'ST?'); 4: SendText(AStn, 'AGN?'); end; - msgTU: // sent by MyStation - case Random(20) of - 0..9: SendText(AStn, '73 E E'); // 50% - 10..13: SendText(AStn, 'GL TU'); // 20% - 14: SendText(AStn, 'GL OM 73 E E'); // 5% - 15: SendText(AStn, 'FB 73 E E'); // 5% - 16: SendText(AStn, 'OK FB TU 73'); // 5% - 17: SendText(AStn, 'GL TU SST'); // 5% - 18: SendText(AStn, 'TU E E'); // 5% - 19: SendText(AStn, '73 DE SST'); // 5% - end; - msgR_NR: // sent by calling station (DxStation) + msgTU: // TU message sent by MyStation if Random < 0.9 - then SendText(AStn, ' <#>') - else SendText(AStn, 'R <#>'); - msgR_NR2: // sent by calling station (DxStation) - case Random(20) of - 0..8: SendText(AStn, ' <#> <#>'); - 9..17: SendText(AStn, ' '); - 18: SendText(AStn, 'R <#> <#>'); - 19: SendText(AStn, 'R '); + then SendText(AStn, 'TU') + else SendText(AStn, 'TU '); + msgR_NR: // exchange msg sent by remote station in response to my exchange + begin + // leading 'R ' 10% of the time + prefix := ''; + if Random < 0.10 then prefix := 'R '; + + // include a presentry greeting 20% of the time + if Random < 0.20 then prefix := prefix + ' '; + + SendText(AStn, prefix + '<#>'); + end; + msgR_NR2: // repeated exchange sent by remote station (DxStation) + begin + // leading 'R ' 10% of the time + prefix := ''; + if Random < 0.10 then prefix := 'R '; + + // include a presentry greeting 20% of the time + if Random < 0.20 then prefix := prefix + ' '; + + // repeat exchange in usual order 80% of the time + if Random < 0.80 + then SendText(AStn, prefix + '<#> <#>') + else SendText(AStn, prefix + ' '); end; msgLongCQ: SendText(AStn, 'CQ CQ SST '); // QrmStation only else From ee4104807f343ecff61e6f225bc3703c05b283fd Mon Sep 17 00:00:00 2001 From: Mike Brashler Date: Thu, 9 Mar 2023 23:39:41 -0800 Subject: [PATCH 2/2] 172 drop dual exchange variant; fix spelling error --- CWSST.pas | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CWSST.pas b/CWSST.pas index 2f87f7b..4109441 100644 --- a/CWSST.pas +++ b/CWSST.pas @@ -216,13 +216,10 @@ procedure TCWSST.SendMsg(const AStn: TStation; const AMsg: TStationMessage); prefix := ''; if Random < 0.10 then prefix := 'R '; - // include a presentry greeting 20% of the time + // include a pleasantry greeting 20% of the time if Random < 0.20 then prefix := prefix + ' '; - // repeat exchange in usual order 80% of the time - if Random < 0.80 - then SendText(AStn, prefix + '<#> <#>') - else SendText(AStn, prefix + ' '); + SendText(AStn, prefix + '<#> <#>'); end; msgLongCQ: SendText(AStn, 'CQ CQ SST '); // QrmStation only else