Skip to content

Commit

Permalink
Remove unfinished changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VE3NEA authored and w7sst committed Jul 29, 2022
1 parent f77c157 commit ea2bb5f
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 26 deletions.
8 changes: 4 additions & 4 deletions Contest.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ constructor TContest.Create;
Modul := TModulator.Create;
Agc := TVolumeControl.Create(nil);

Filt.Points := Round(0.7 * 11025 / Ini.BandWidth);
Filt.Points := Round(0.7 * DEFAULTRATE / Ini.BandWidth);
Filt.Passes := 3;
Filt.SamplesInInput := Ini.BufSize;
Filt.GainDb := 10 * Log10(500/Ini.Bandwidth);
Expand All @@ -64,7 +64,7 @@ constructor TContest.Create;
Filt2.SamplesInInput := Filt.SamplesInInput;
Filt2.GainDb := Filt.GainDb;

Modul.SamplesPerSec := 11025;
Modul.SamplesPerSec := DEFAULTRATE;
Modul.CarrierFreq := Ini.Pitch;

Agc.NoiseInDb := 76;
Expand Down Expand Up @@ -140,14 +140,14 @@ function TContest.GetAudio: TSingleArray;
Blk := Stations[Stn].GetBlock;
for i:=0 to High(Blk) do
begin
Bfo := Stations[Stn].Bfo - RitPhase - i * TWO_PI * Ini.Rit / 11025;
Bfo := Stations[Stn].Bfo - RitPhase - i * TWO_PI * Ini.Rit / DEFAULTRATE;
ReIm.Re[i] := ReIm.Re[i] + Blk[i] * Cos(Bfo);
ReIm.Im[i] := ReIm.Im[i] - Blk[i] * Sin(Bfo);
end;
end;

//Rit
RitPhase := RitPhase + Ini.BufSize * TWO_PI * Ini.Rit / 11025;
RitPhase := RitPhase + Ini.BufSize * TWO_PI * Ini.Rit / DEFAULTRATE;
while RitPhase > TWO_PI do RitPhase := RitPhase - TWO_PI;
while RitPhase < -TWO_PI do RitPhase := RitPhase + TWO_PI;

Expand Down
8 changes: 3 additions & 5 deletions DxOper.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TDxOperator = class
function GetSendDelay: integer;
function GetReplyTimeout: integer;
function GetWpm: integer;
function GetNR: string;
function GetNR: integer;
procedure MsgReceived(AMsg: TStationMessages);
procedure SetState(AState: TOperatorState);
function GetReply: TStationMessage;
Expand Down Expand Up @@ -71,11 +71,9 @@ function TDxOperator.GetWpm: integer;
else Result := Round(Ini.Wpm * 0.5 * (1 + Random));
end;

function TDxOperator.GetNR: string;
function TDxOperator.GetNR: integer;
begin
if RunMode = rmCustom
then
else Result := IntToStr(1 + Round(Random * Tst.Minute * Skills));
Result := 1 + Round(Random * Tst.Minute * Skills);
end;

function TDxOperator.GetReplyTimeout: integer;
Expand Down
3 changes: 1 addition & 2 deletions Ini.pas
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ interface


type
TRunMode = (rmStop, rmPileup, rmSingle, rmWpx, rmHst, rmCustom);

TRunMode = (rmStop, rmPileup, rmSingle, rmWpx, rmHst);

var
Call: string = 'VE3NEA';
Expand Down
6 changes: 3 additions & 3 deletions Log.pas
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TQso = record
T: TDateTime;
Call, TrueCall: string;
Rst, TrueRst: integer;
Nr, TrueNr: string;
Nr, TrueNr: integer;
Pfx: string;
Dupe: boolean;
Err: string;
Expand Down Expand Up @@ -222,7 +222,7 @@ procedure SaveQso;
Qso.T := BlocksToSeconds(Tst.BlockNumber) / 86400;
Qso.Call := StringReplace(Edit1.Text, '?', '', [rfReplaceAll]);
Qso.Rst := StrToInt(Edit2.Text);
Qso.Nr := Trim(Edit3.Text);
Qso.Nr := StrToInt(Edit3.Text);
Qso.Pfx := ExtractPrefix(Qso.Call);
{if PfxList.Find(Qso.Pfx, Idx) then Qso.Pfx := '' else }PfxList.Add(Qso.Pfx);
if Ini.RunMode = rmHst then Qso.Pfx := IntToStr(CallToScore(Qso.Call));
Expand Down Expand Up @@ -252,7 +252,7 @@ procedure SaveQso;
//wipe
MainForm.WipeBoxes;
//inc NR
Tst.Me.NR := IntToStr(StrToInt(Tst.Me.NR) + 1);
Inc(Tst.Me.NR);
end;


Expand Down
1 change: 1 addition & 0 deletions Main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ object MainForm: TMainForm
end
end
object AlSoundOut1: TAlSoundOut
SamplesPerSec = 11025
BufCount = 8
OnBufAvailable = AlSoundOut1BufAvailable
Left = 384
Expand Down
8 changes: 4 additions & 4 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
FromIni;

MakeKeyer;
Keyer.Rate := 11025;
Keyer.Rate := DEFAULTRATE;
Keyer.BufSize := Ini.BufSize;

Panel2.DoubleBuffered := true;
Expand Down Expand Up @@ -582,7 +582,7 @@ procedure TMainForm.SetBw(BwNo: integer);
Ini.Bandwidth := 100 + BwNo * 50;
ComboBox2.ItemIndex := BwNo;

Tst.Filt.Points := Round(0.7 * 11025 / Ini.BandWidth);
Tst.Filt.Points := Round(0.7 * DEFAULTRATE / Ini.BandWidth);
Tst.Filt.GainDb := 10 * Log10(500/Ini.Bandwidth);
Tst.Filt2.Points := Tst.Filt.Points;
Tst.Filt2.GainDb := Tst.Filt.GainDb;
Expand Down Expand Up @@ -725,7 +725,7 @@ procedure TMainForm.EnableCtl(Ctl: TWinControl; AEnable: boolean);
procedure TMainForm.Run(Value: TRunMode);
const
Title: array[TRunMode] of string =
('', 'Pile-Up', 'Single Calls', 'COMPETITION', 'H S T', 'Custom');
('', 'Pile-Up', 'Single Calls', 'COMPETITION', 'H S T');
var
BCompet, BStop: boolean;
begin
Expand Down Expand Up @@ -812,7 +812,7 @@ procedure TMainForm.Run(Value: TRunMode);
begin
Tst.Me.AbortSend;
Tst.BlockNumber := 0;
Tst.Me.Nr := '1';
Tst.Me.Nr := 1;
Log.Clear;
WipeBoxes;
RichEdit1.Visible := true;
Expand Down
2 changes: 1 addition & 1 deletion MyStn.pas
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ destructor TMyStation.Destroy;
procedure TMyStation.Init;
begin
MyCall := Ini.Call;
NR := '1';
NR := 1;
RST := 599;
Pitch := Ini.Pitch;
Wpm := Ini.Wpm;
Expand Down
2 changes: 1 addition & 1 deletion Qsb.pas
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ procedure TQsb.SetBandwidth(const Value: Single);
i: integer;
begin
FBandwidth := Value;
Filt.Points := Ceil(0.37 * 11025 / ((Ini.BufSize div 4) * Value));
Filt.Points := Ceil(0.37 * DEFAULTRATE / ((Ini.BufSize div 4) * Value));
for i:=0 to Filt.Points*3 do FGain := NewGain;
end;

Expand Down
4 changes: 2 additions & 2 deletions RndFunc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ function RndRayleigh(AMean: Single): Single;

function SecondsToBlocks(Sec: Single): integer;
begin
Result := Round(11025 / Ini.BufSize * Sec);
Result := Round(DEFAULTRATE / Ini.BufSize * Sec);
end;

function BlocksToSeconds(Blocks: Single): Single;
begin
Result := Blocks * Ini.BufSize / 11025;
Result := Blocks * Ini.BufSize / DEFAULTRATE;
end;

function RndUniform: Single;
Expand Down
5 changes: 2 additions & 3 deletions Station.pas
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ TStation = class (TCollectionItem)
Envelope: TSingleArray;
State: TStationState;

NR: string;
RST: integer;
NR, RST: integer;
MyCall, HisCall: string;

Msg: TStationMessages;
Expand Down Expand Up @@ -169,7 +168,7 @@ procedure TStation.SendMorse(AMorse: string);

procedure TStation.SetPitch(const Value: integer);
begin
FPitch := 11025;
FPitch := Value;
dPhi := TWO_PI * FPitch / DEFAULTRATE;
end;

Expand Down
2 changes: 1 addition & 1 deletion VCL/Mixers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ procedure TModulator.CalcSinCos;
for i:=0 to Cnt-1 do
begin
Cs[i] := Cs[i] * FGain;
Sn[i] := Cs[i] * FGain;
Sn[i] := Sn[i] * FGain;
end;
end;

Expand Down

0 comments on commit ea2bb5f

Please sign in to comment.