summaryrefslogtreecommitdiff
path: root/LearnMapKit/FlighState.swift
diff options
context:
space:
mode:
Diffstat (limited to 'LearnMapKit/FlighState.swift')
-rw-r--r--LearnMapKit/FlighState.swift45
1 files changed, 45 insertions, 0 deletions
diff --git a/LearnMapKit/FlighState.swift b/LearnMapKit/FlighState.swift
new file mode 100644
index 0000000..f3895cb
--- /dev/null
+++ b/LearnMapKit/FlighState.swift
@@ -0,0 +1,45 @@
+//
+// FlighState.swift
+// LearnMapKit
+//
+// Created by Jacky Jack on 30/06/2024.
+//
+
+import Foundation
+import Collections
+
+class FlightState: ObservableObject {
+ @Published var name = "Some Name"
+ @Published var isEnabled = false
+ var timer: Timer?
+ var update_postions: Deque<ADSBLocation> = []
+ var fromFile: Bool = false
+ init() {
+ var count = 0
+
+ let ADSBtask = ADSBFileRunner(filename: "")
+ timer = Timer.scheduledTimer(
+ withTimeInterval: 1,
+ repeats: true
+ ) { _ in
+
+ //queue.append(MapADSBData(lat: 0.0, long: 0.0, alt: 1))
+
+ //let timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { timer in
+ print("Evil object \(count)")
+ //ADSBtask.runFromFile()
+ self.update_postions.append(ADSBLocation(address: 0, lat: 0.0, long: 0.0))
+ // print(update_postions.count)
+ count += 1
+ //}
+ }
+ }
+ init(filename: String) {
+
+ }
+
+ func loadFromFile() {
+
+ }
+}
+