diff --git a/fleprocess/adif_write.go b/fleprocess/adif_write.go index 132a274..0b177db 100644 --- a/fleprocess/adif_write.go +++ b/fleprocess/adif_write.go @@ -69,6 +69,7 @@ func buildAdif(fullLog []LogLine, isWWFF bool, isSOTA bool) (adifList []string) adifLine.WriteString(adifElement("MY_SIG", "WWFF")) adifLine.WriteString(adifElement("MY_SIG_INFO", logLine.MyWWFF)) if logLine.WWFF != "" { + adifLine.WriteString(adifElement("SIG", "WWFF")) adifLine.WriteString(adifElement("SIG_INFO",logLine.WWFF)) } } diff --git a/fleprocess/adif_write_test.go b/fleprocess/adif_write_test.go index 9bc637e..04c4041 100644 --- a/fleprocess/adif_write_test.go +++ b/fleprocess/adif_write_test.go @@ -80,6 +80,20 @@ func Test_buildAdif(t *testing.T) { "ON4KJM/P ON4LY 20200524 1312 20m CW 559 599 WWFF ONFF-0259 ON4KJM JO40eu ", } + sampleFilledLog3 := []LogLine{ + {MyCall: "ON4KJM/P", Call: "S57LC", Date: "2020-05-24", MyGrid: "JO40eu", Time: "1310", Band: "20m", Frequency: "14.045", Mode: "CW", RSTsent: "599", RSTrcvd: "599", GridLoc: "JO50", MyWWFF: "ONFF-0259", Operator: "ON4KJM", Nickname: "ONFF-0259-1"}, + {MyCall: "ON4KJM/P", Call: "ON4LY", Date: "2020-05-24", MyGrid: "JO40eu", Time: "1312", Band: "20m", Mode: "CW", RSTsent: "559", RSTrcvd: "599", MyWWFF: "ONFF-0259", Operator: "ON4KJM", WWFF: "DLFF-0001"}, + } + + expectedOutput3 := []string{ + "ADIF Export for Fast Log Entry by DF3CB", + "FLE", + "3.1.0", + "", + "ON4KJM/P S57LC 20200524 1310 20m CW 14.045 599 599 JO50 WWFF ONFF-0259 ON4KJM JO40eu ONFF-0259-1 ", + "ON4KJM/P ON4LY 20200524 1312 20m CW 559 599 WWFF ONFF-0259 WWFF DLFF-0001 ON4KJM JO40eu ", + } + type args struct { fullLog []LogLine isWWFF bool @@ -100,6 +114,11 @@ func Test_buildAdif(t *testing.T) { args{fullLog: sampleFilledLog2, isWWFF: true, isSOTA: false}, expectedOutput2, }, + { + "Happy case-Park2Park", + args{fullLog: sampleFilledLog3, isWWFF: true, isSOTA: false}, + expectedOutput3, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {