summaryrefslogtreecommitdiff
path: root/ADSBStats
diff options
context:
space:
mode:
authorArturs Artamonovs <arturs.artamonovs@protonmail.com>2025-11-17 00:32:31 +0000
committerArturs Artamonovs <arturs.artamonovs@protonmail.com>2025-11-17 00:32:31 +0000
commit2b599499dc26f0f93537d1bea4733eae68333a1c (patch)
treedc3b177aa2c5cfcf88cf4d5012bb0555c9f7fb5e /ADSBStats
parent9070c9e6b7c7ce5671f4fad85e4aefa8c27aad28 (diff)
downloadADSBDecoder-2b599499dc26f0f93537d1bea4733eae68333a1c.tar.gz
ADSBDecoder-2b599499dc26f0f93537d1bea4733eae68333a1c.zip
Save old work that I have no clue what I where doing
Diffstat (limited to 'ADSBStats')
-rw-r--r--ADSBStats/main.swift8
1 files changed, 5 insertions, 3 deletions
diff --git a/ADSBStats/main.swift b/ADSBStats/main.swift
index d431e1f..d340e16 100644
--- a/ADSBStats/main.swift
+++ b/ADSBStats/main.swift
@@ -11,7 +11,7 @@ import RegexBuilder
import SQLite3
import SwiftData
-decoder_debug_mode = false
+//decoder_debug_mode = false
struct CommandLineArgs: ParsableCommand {
@Option(name: .shortAndLong) var inputfile: String
@@ -56,7 +56,8 @@ var count_messages=0
for line in adsb_source.components(separatedBy: .newlines) {
var found=false
count_messages += 1
- if let tokenMatch = try matchADSBLong.prefixMatch(in: line) {
+ let matchADSBLong = MatchADSBLong()
+ if let tokenMatch = matchADSBLong.prefixMatch(line) {
found = true
let str = String(tokenMatch.output)
let startIndex = str.index(str.startIndex, offsetBy: 1)
@@ -92,7 +93,8 @@ for line in adsb_source.components(separatedBy: .newlines) {
q_df.addDF(decoder.DataFormat)
};
- if let tokenMatch = try matchADSBShort.prefixMatch(in: line) {
+ let matchADSBShort = MatchADSBShort()
+ if let tokenMatch = matchADSBShort.prefixMatch(line) {
//print("\(tokenMatch.output)")
found = true