feat: Merge SaltyTag BLE — GPS/IMU streaming to UWB tag, anchor display, UWB position authority #5
@ -132,6 +132,11 @@ final class SensorManager: NSObject, ObservableObject {
|
|||||||
// MARK: - Init
|
// MARK: - Init
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
|
// Migrate: if the stored URL is the old Tailscale IP, replace with the new WSS endpoint.
|
||||||
|
if let saved = UserDefaults.standard.string(forKey: Self.orinURLKey),
|
||||||
|
saved.contains("100.64.0.2") {
|
||||||
|
UserDefaults.standard.removeObject(forKey: Self.orinURLKey)
|
||||||
|
}
|
||||||
let urlStr = UserDefaults.standard.string(forKey: Self.orinURLKey) ?? Self.defaultOrinURL
|
let urlStr = UserDefaults.standard.string(forKey: Self.orinURLKey) ?? Self.defaultOrinURL
|
||||||
self.ws = WebSocketClient(url: URL(string: urlStr) ?? URL(string: Self.defaultOrinURL)!)
|
self.ws = WebSocketClient(url: URL(string: urlStr) ?? URL(string: Self.defaultOrinURL)!)
|
||||||
super.init()
|
super.init()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user