UWBModels.swift (new):
- FollowMode enum: .gps / .uwb — publishes {"mode":"gps|uwb"} to saltybot/follow/mode
- FollowPreset enum: .close(1.5m) / .medium(3m) / .far(5m) — publishes
{"range_m":N,"preset":"..."} to saltybot/follow/range
- UWBPosition struct: x/y/z + timestamp
- UWBRange struct: anchorID + rangeMetres + timestamp
SensorManager:
- Subscribes to saltybot/uwb/range + saltybot/uwb/position on startStreaming
- handleUWBRange: updates uwbRanges[anchorID] (keyed dict)
- handleUWBPosition: updates uwbPosition + sets uwbActive=true
- UWB staleness watchdog (1Hz timer): clears uwbActive and prunes stale ranges >3s
- setFollowMode(_:) / setFollowPreset(_:): update state + publish to MQTT immediately
- Publishes current follow mode+range on connect
MapContentView:
- UWB status badge (top-left): green/gray dot, "UWB Active|Out of Range",
per-anchor range readouts (e.g. A1 2.34m)
- Follow mode segmented control: GPS | UWB
- Follow range segmented control: Close | Medium | Far (shows metres)
- MapCircle follow-range ring around robot: green inside, orange outside range
- Stats bar: distance turns green + checkmark when user is inside follow range;
UWB (x,y) coord shown when UWB mode active and position known
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
saltylab-ios
SaltyBot iOS Companion App (Sul-Tee) — Swift/SwiftUI, sensor streaming for follow-me mode
Description
SaltyBot iOS Companion App (Sul-Tee) — Swift/SwiftUI, sensor streaming for follow-me mode