diff --git a/tr4w/src/MainUnit.pas b/tr4w/src/MainUnit.pas index 694f0ded..85e0a8f0 100644 --- a/tr4w/src/MainUnit.pas +++ b/tr4w/src/MainUnit.pas @@ -1,7 +1,7 @@ { Copyright Dmitriy Gulyaev UA4WLI 2015. - This file is part of TR4W (SRC) + This file is part of TR4W (SRC) 4 TR4W is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -198,6 +198,7 @@ procedure RunExplorer(Command: PChar); procedure RunOptionsDialog(f: CFGFunc); procedure OpenUrl(url: PChar); function ParseADIFRecord(sADIF: string; var exch: ContestExchange): boolean; +procedure ProcessImportedSRX_String(fieldValue: string; var exch: ContestExchange); function GetContestByADIFName(sADIFName: string): ContestType; procedure SetExtendedModeFromMode (RData: ContestExchange); @@ -6435,8 +6436,7 @@ function ParseADIFRecord(sADIF: string; var exch: ContestExchange): boolean; 22: exch.RSTSent := StrToIntDef(fieldValue,599); //fieldValue; // Same for ADIF RST Sent... 23: exch.Power := fieldValue; 24: exch.NumberReceived := StrToInt(fieldValue); - 25: // SRX_STRING // Call a function passing my contest type and break this out based on exchange. Sweepstakes will be fun :) - ; + 25: ProcessImportedSRX_String(fieldValue, exch); 26: if Length(exch.QTHString) = 0 then begin exch.QTHString := fieldValue; // STATE @@ -8032,6 +8032,18 @@ procedure SetExtendedModeFromMode (RData: ContestExchange); end; end; +procedure ProcessImportedSRX_String(fieldValue: string; var exch: ContestExchange); +begin + case exch.ceContest of + ARRLFIELDDAY, WINTERFIELDDAY: + // parse SRX_STRING of 1A EPA into class 1A and QTHString of EPA + ProcessClassAndDomesticOrDXQTHExchange(fieldValue, exch); + + end; // case + + + +end; diff --git a/tr4w/src/trdos/LOGSTUFF.PAS b/tr4w/src/trdos/LOGSTUFF.PAS index 86a3e7cb..d9782b9d 100644 --- a/tr4w/src/trdos/LOGSTUFF.PAS +++ b/tr4w/src/trdos/LOGSTUFF.PAS @@ -659,7 +659,8 @@ procedure ParseFourFields(sExch: Str80; var s1, s2, s3, s4: Str20); procedure PassStationToCTNetwork; //procedure PrintLogHeader; - +function ProcessClassAndDomesticOrDXQTHExchange(Exchange: string {Str80}; var + RXData: ContestExchange): boolean; function ProcessExchange(ExchangeString: Str80; var RData: ContestExchange): boolean; function ParseArray(e: Str80): boolean; diff --git a/tr4w/src/trdos/PostUnit.PAS b/tr4w/src/trdos/PostUnit.PAS index 94041a50..bf780ef0 100644 --- a/tr4w/src/trdos/PostUnit.PAS +++ b/tr4w/src/trdos/PostUnit.PAS @@ -1918,6 +1918,7 @@ begin if TempRXData.QTHString <> 'DX' then // Change to validate it is a section begin WriteADIFField('ARRL_SECT',TempRXData.QTHString); + WriteADIFField('CLASS',TempRXData.ceClass); //nNumberOfBytesToWrite := Format(CABRILLO_BUFFER, '%s ', tCallStringLength, p); //sWriteFile(tReportFileWrite, CABRILLO_BUFFER, nNumberOfBytesToWrite); end;