From 2b599499dc26f0f93537d1bea4733eae68333a1c Mon Sep 17 00:00:00 2001 From: Arturs Artamonovs Date: Mon, 17 Nov 2025 00:32:31 +0000 Subject: Save old work that I have no clue what I where doing --- ADSBDecoder/main.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'ADSBDecoder/main.swift') diff --git a/ADSBDecoder/main.swift b/ADSBDecoder/main.swift index f75cdfb..91ba97b 100644 --- a/ADSBDecoder/main.swift +++ b/ADSBDecoder/main.swift @@ -55,8 +55,10 @@ for line in adsb_source.components(separatedBy: .newlines) { var found=false //print("\(cnt) \(line)") count_messages += 1 - if let tokenMatch = try matchADSBLong.prefixMatch(in: line) { - //print("\(String(tokenMatch.output))") + let matchADSBLong = MatchADSBLong() + //if let tokenMatch = try matchADSBLong.prefixMatch(in: line) { + if let tokenMatch = matchADSBLong.prefixMatch(line) { + print("ADSB Long match \(String(tokenMatch.output))") found = true let str = String(tokenMatch.output) let startIndex = str.index(str.startIndex, offsetBy: 1) @@ -93,12 +95,20 @@ for line in adsb_source.components(separatedBy: .newlines) { q_df.addDF(decoder.DataFormat) }; + /* if let tokenMatch = try matchADSBShort.prefixMatch(in: line) { print("\(tokenMatch.output)") found = true q_decoded.addUndecoded() - }; + };*/ + let matchADSBShort = MatchADSBShort() + if let tokenMatch = matchADSBShort.prefixMatch(line) { + print("ADSBShort Match\(tokenMatch.output)") + found = true + + q_decoded.addUndecoded() + } if (found == false) { print("Unknown adsb data line \(line)") -- cgit v1.2.3