2022-06-12 07:38:08 -07:00
//
// P o s i t i o n C o n f i g . s w i f t
// M e s h t a s t i c A p p l e
//
// C o p y r i g h t ( c ) G a r t h V a n d e r H o u w e n 6 / 1 1 / 2 2 .
//
import SwiftUI
2024-06-07 22:09:20 -05:00
import MeshtasticProtobufs
2024-06-03 02:17:55 -07:00
import OSLog
2022-06-12 07:38:08 -07:00
2023-03-06 10:33:18 -08:00
struct PositionFlags : OptionSet {
2022-09-01 11:54:39 -07:00
let rawValue : Int
2022-09-23 21:41:07 -07:00
static let Altitude = PositionFlags ( rawValue : 1 )
static let AltitudeMsl = PositionFlags ( rawValue : 2 )
2022-09-30 17:10:03 -07:00
static let GeoidalSeparation = PositionFlags ( rawValue : 4 )
2022-09-23 21:41:07 -07:00
static let Dop = PositionFlags ( rawValue : 8 )
static let Hvdop = PositionFlags ( rawValue : 16 )
static let Satsinview = PositionFlags ( rawValue : 32 )
2022-10-04 18:10:40 -07:00
static let SeqNo = PositionFlags ( rawValue : 64 )
2022-09-23 21:41:07 -07:00
static let Timestamp = PositionFlags ( rawValue : 128 )
static let Speed = PositionFlags ( rawValue : 256 )
static let Heading = PositionFlags ( rawValue : 512 )
2022-09-01 11:54:39 -07:00
}
2022-06-12 07:38:08 -07:00
struct PositionConfig : View {
2025-10-05 17:51:18 -07:00
2022-06-12 07:38:08 -07:00
@ Environment ( \ . managedObjectContext ) var context
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
@ EnvironmentObject var accessoryManager : AccessoryManager
2022-12-09 18:19:00 -08:00
@ Environment ( \ . dismiss ) private var goBack
2022-07-07 00:29:52 -07:00
var node : NodeInfoEntity ?
2022-06-21 10:15:47 -07:00
@ State var hasChanges = false
2022-10-04 18:10:40 -07:00
@ State var hasFlagChanges = false
2022-06-12 10:28:26 -07:00
@ State var smartPositionEnabled = true
@ State var deviceGpsEnabled = true
2024-02-05 21:46:16 -08:00
@ State var gpsMode = 0
2023-03-27 10:43:01 -07:00
@ State var rxGpio = 0
@ State var txGpio = 0
2023-12-21 11:31:40 -08:00
@ State var gpsEnGpio = 0
2022-06-12 10:28:26 -07:00
@ State var fixedPosition = false
2024-02-05 21:46:16 -08:00
@ State var gpsUpdateInterval = 0
2025-10-05 17:51:18 -07:00
@ State private var positionBroadcastSeconds : UpdateInterval = UpdateInterval ( from : 0 )
2023-03-27 10:43:01 -07:00
@ State var broadcastSmartMinimumDistance = 0
2025-10-05 17:51:18 -07:00
@ State private var broadcastSmartMinimumIntervalSecs : UpdateInterval = UpdateInterval ( from : 0 )
2024-02-05 21:46:16 -08:00
@ State var positionFlags = 811
2025-10-05 17:51:18 -07:00
2022-07-13 08:32:34 -07:00
// / P o s i t i o n F l a g s
// / A l t i t u d e v a l u e - 1
2022-09-23 21:41:07 -07:00
@ State var includeAltitude = false
2022-07-13 08:32:34 -07:00
// / A l t i t u d e v a l u e i s M S L - 2
2022-09-23 21:41:07 -07:00
@ State var includeAltitudeMsl = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e g e o i d a l s e p a r a t i o n - 4
2022-09-30 17:10:03 -07:00
@ State var includeGeoidalSeparation = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e t h e D O P v a l u e ; P D O P u s e d b y d e f a u l t , s e e b e l o w - 8
2022-09-23 21:41:07 -07:00
@ State var includeDop = false
2022-07-13 08:32:34 -07:00
// / I f P O S _ D O P s e t , s e n d s e p a r a t e H D O P / V D O P v a l u e s i n s t e a d o f P D O P - 1 6
2022-09-23 21:41:07 -07:00
@ State var includeHvdop = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e n u m b e r o f " s a t e l l i t e s i n v i e w " - 3 2
2022-09-23 21:41:07 -07:00
@ State var includeSatsinview = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e a s e q u e n c e n u m b e r i n c r e m e n t e d p e r p a c k e t - 6 4
2022-09-30 17:10:03 -07:00
@ State var includeSeqNo = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e p o s i t i o n a l t i m e s t a m p ( f r o m G P S s o l u t i o n ) - 1 2 8
2022-09-23 21:41:07 -07:00
@ State var includeTimestamp = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e p o s i t i o n a l h e a d i n g - 2 5 6
// / I n t e n d e d f o r u s e w i t h v e h i c l e n o t w a l k i n g s p e e d s
// / w a l k i n g s p e e d s a r e l i k e l y t o b e e r r o r p r o n e l i k e t h e c o m p a s s
2022-09-23 21:41:07 -07:00
@ State var includeSpeed = false
2022-07-13 08:32:34 -07:00
// / I n c l u d e p o s i t i o n a l s p e e d - 5 1 2
// / I n t e n d e d f o r u s e w i t h v e h i c l e n o t w a l k i n g s p e e d s
// / w a l k i n g s p e e d s a r e l i k e l y t o b e e r r o r p r o n e l i k e t h e c o m p a s s
2022-09-23 21:41:07 -07:00
@ State var includeHeading = false
2024-03-25 15:21:38 -07:00
// / M i n i m u m V e r s i o n f o r f i x e d p o s t i o n a d m i n m e s s a g e s
2024-03-27 16:06:24 -07:00
@ State var minimumVersion = " 2.3.3 "
2024-03-25 15:21:38 -07:00
@ State private var supportedVersion = true
2024-03-26 23:36:11 -07:00
@ State private var showingSetFixedAlert = false
2024-05-29 16:40:07 -05:00
// @ S t a t e p r i v a t e v a r s h o w i n g R e m o v e F i x e d A l e r t = f a l s e
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
@ ViewBuilder
var positionPacketSection : some View {
Section ( header : Text ( " Position Packet " ) ) {
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
VStack ( alignment : . leading ) {
2025-10-05 17:51:18 -07:00
UpdateIntervalPicker (
config : . broadcastMedium ,
pickerLabel : " Broadcast Interval " ,
selectedInterval : $ positionBroadcastSeconds
)
2024-06-23 14:40:28 -07:00
Text ( " The maximum interval that can elapse without a node broadcasting a position " )
. foregroundColor ( . gray )
. font ( . callout )
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ smartPositionEnabled ) {
Label ( " Smart Position " , systemImage : " brain " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
if smartPositionEnabled {
VStack ( alignment : . leading ) {
2025-10-05 17:51:18 -07:00
UpdateIntervalPicker (
config : . smartBroadcastMinimum ,
pickerLabel : " Minimum Interval " ,
selectedInterval : $ broadcastSmartMinimumIntervalSecs
)
2024-06-23 14:40:28 -07:00
Text ( " The fastest that position updates will be sent if the minimum distance has been satisfied " )
2024-05-04 16:03:38 -07:00
. foregroundColor ( . gray )
. font ( . callout )
2024-06-23 14:40:28 -07:00
}
VStack ( alignment : . leading ) {
Picker ( " Minimum Distance " , selection : $ broadcastSmartMinimumDistance ) {
ForEach ( 10. . < 151 ) {
if $0 = = 0 {
2025-04-27 16:19:10 -07:00
Text ( " Unset " )
2024-06-23 14:40:28 -07:00
} else {
if $0 . isMultiple ( of : 5 ) {
Text ( " \( $0 ) " )
. tag ( $0 )
2024-02-21 20:41:27 -08:00
}
2024-02-05 21:46:16 -08:00
}
}
2024-03-27 16:06:24 -07:00
}
2024-06-23 14:40:28 -07:00
. pickerStyle ( DefaultPickerStyle ( ) )
Text ( " The minimum distance change in meters to be considered for a smart position broadcast. " )
. foregroundColor ( . gray )
. font ( . callout )
}
}
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
@ ViewBuilder
var deviceGPSSection : some View {
Section ( header : Text ( " Device GPS " ) ) {
Picker ( " " , selection : $ gpsMode ) {
ForEach ( GpsMode . allCases , id : \ . self ) { at in
Text ( at . description )
. tag ( at . id )
}
}
. pickerStyle ( SegmentedPickerStyle ( ) )
. padding ( . top , 5 )
. padding ( . bottom , 5 )
. disabled ( fixedPosition && ! ( gpsMode = = 1 ) )
if gpsMode = = 1 {
Text ( " Positions will be provided by your device GPS, if you select disabled or not present you can set a fixed position. " )
. foregroundColor ( . gray )
. font ( . callout )
VStack ( alignment : . leading ) {
Picker ( " Update Interval " , selection : $ gpsUpdateInterval ) {
ForEach ( GpsUpdateIntervals . allCases ) { ui in
Text ( ui . description )
2024-03-26 23:36:11 -07:00
}
2024-02-05 21:46:16 -08:00
}
2024-06-23 14:40:28 -07:00
Text ( " How often should we try to get a GPS position. " )
2024-02-21 20:41:27 -08:00
. foregroundColor ( . gray )
2024-02-21 23:35:28 -08:00
. font ( . callout )
2024-06-23 14:40:28 -07:00
}
}
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if ( gpsMode != 1 && node ? . num ? ? 0 = = accessoryManager . activeDeviceNum ? ? - 1 ) || fixedPosition {
2024-06-23 14:40:28 -07:00
VStack ( alignment : . leading ) {
Toggle ( isOn : $ fixedPosition ) {
Label ( " Fixed Position " , systemImage : " location.square.fill " )
if ! ( node ? . positionConfig ? . fixedPosition ? ? false ) {
Text ( " Your current location will be set as the fixed position and broadcast over the mesh on the position interval. " )
} else {
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
}
2022-06-20 12:51:55 -07:00
}
2022-06-21 01:12:08 -07:00
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-06-23 14:40:28 -07:00
}
}
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
@ ViewBuilder
var positionFlagsSection : some View {
Section ( header : Text ( " Position Flags " ) ) {
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Text ( " Optional fields to include when assembling position messages. the more fields are included, the larger the message will be - leading to longer airtime and a higher risk of packet loss " )
. foregroundColor ( . gray )
. font ( . callout )
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeAltitude ) {
Label ( " Altitude " , systemImage : " arrow.up " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeAltitude ) { _ , newIncludeAltitude in
if newIncludeAltitude != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Altitude ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeSatsinview ) {
Label ( " Number of satellites " , systemImage : " skew " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeSatsinview ) { _ , newIncludeSatsinview in
if newIncludeSatsinview != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Satsinview ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeSeqNo ) { // 6 4
Label ( " Sequence number " , systemImage : " number " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeSeqNo ) { _ , newIncludeSeqNo in
if newIncludeSeqNo != PositionFlags ( rawValue : self . positionFlags ) . contains ( . SeqNo ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeTimestamp ) { // 1 2 8
2025-04-27 09:57:49 -07:00
Label ( " Timestamp " , systemImage : " clock " )
2024-06-23 14:40:28 -07:00
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeTimestamp ) { _ , newIncludeTimestamp in
if newIncludeTimestamp != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Timestamp ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeHeading ) { // 1 2 8
Label ( " Vehicle heading " , systemImage : " location.circle " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeHeading ) { _ , newIncludeHeading in
if newIncludeHeading != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Heading ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeSpeed ) { // 1 2 8
Label ( " Vehicle speed " , systemImage : " speedometer " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeSpeed ) { _ , newIncludeSpeed in
if newIncludeSpeed != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Speed ) { hasChanges = true }
}
2024-06-23 14:40:28 -07:00
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
@ ViewBuilder
var advancedPositionFlagsSection : some View {
Section ( header : Text ( " Advanced Position Flags " ) ) {
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
if includeAltitude {
Toggle ( isOn : $ includeAltitudeMsl ) {
Label ( " Altitude is Mean Sea Level " , systemImage : " arrow.up.to.line.compact " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeAltitudeMsl ) { _ , newIncludeAltitudeMsl in
if newIncludeAltitudeMsl != PositionFlags ( rawValue : self . positionFlags ) . contains ( . AltitudeMsl ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeGeoidalSeparation ) {
Label ( " Altitude Geoidal Separation " , systemImage : " globe.americas " )
2022-07-13 08:32:34 -07:00
}
2024-06-23 14:40:28 -07:00
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeGeoidalSeparation ) { _ , newIncludeGeoidalSeparation in
if newIncludeGeoidalSeparation != PositionFlags ( rawValue : self . positionFlags ) . contains ( . GeoidalSeparation ) { hasChanges = true }
}
2024-06-23 14:40:28 -07:00
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
Toggle ( isOn : $ includeDop ) {
Text ( " Dilution of precision (DOP) PDOP used by default " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeDop ) { _ , newIncludeDop in
if newIncludeDop != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Dop ) { hasChanges = true }
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
if includeDop {
Toggle ( isOn : $ includeHvdop ) {
Text ( " If DOP is set, use HDOP / VDOP values instead of PDOP " )
}
. toggleStyle ( SwitchToggleStyle ( tint : . accentColor ) )
2024-10-13 17:20:56 -05:00
. onChange ( of : includeHvdop ) { _ , newIncludeHvdop in
if newIncludeHvdop != PositionFlags ( rawValue : self . positionFlags ) . contains ( . Hvdop ) { hasChanges = true }
}
2024-06-23 14:40:28 -07:00
}
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
@ ViewBuilder
var advancedDeviceGPSSection : some View {
Section ( header : Text ( " Advanced Device GPS " ) ) {
Picker ( " GPS Receive GPIO " , selection : $ rxGpio ) {
ForEach ( 0. . < 49 ) {
if $0 = = 0 {
2025-04-27 16:19:10 -07:00
Text ( " Unset " )
2024-06-23 14:40:28 -07:00
} else {
Text ( " Pin \( $0 ) " )
}
}
}
. pickerStyle ( DefaultPickerStyle ( ) )
Picker ( " GPS Transmit GPIO " , selection : $ txGpio ) {
ForEach ( 0. . < 49 ) {
if $0 = = 0 {
2025-04-27 16:19:10 -07:00
Text ( " Unset " )
2024-06-23 14:40:28 -07:00
} else {
Text ( " Pin \( $0 ) " )
2022-07-13 08:32:34 -07:00
}
2022-06-12 07:38:08 -07:00
}
2024-06-23 14:40:28 -07:00
}
. pickerStyle ( DefaultPickerStyle ( ) )
Picker ( " GPS EN GPIO " , selection : $ gpsEnGpio ) {
ForEach ( 0. . < 49 ) {
if $0 = = 0 {
2025-04-27 16:19:10 -07:00
Text ( " Unset " )
2024-06-23 14:40:28 -07:00
} else {
Text ( " Pin \( $0 ) " )
}
}
}
. pickerStyle ( DefaultPickerStyle ( ) )
Text ( " (Re)define PIN_GPS_EN for your board. " )
. font ( . caption )
}
}
var saveButton : some View {
SaveConfigButton ( node : node , hasChanges : $ hasChanges ) {
if fixedPosition && ! supportedVersion {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
try await accessoryManager . sendPosition ( channel : 0 , destNum : node ? . num ? ? 0 , wantResponse : true )
}
2024-06-23 14:40:28 -07:00
}
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if let deviceNum = accessoryManager . activeDeviceNum , let connectedNode = getNodeInfo ( id : deviceNum , context : context ) {
2024-06-23 14:40:28 -07:00
var pc = Config . PositionConfig ( )
pc . positionBroadcastSmartEnabled = smartPositionEnabled
pc . gpsEnabled = gpsMode = = 1
pc . gpsMode = Config . PositionConfig . GpsMode ( rawValue : gpsMode ) ? ? Config . PositionConfig . GpsMode . notPresent
pc . fixedPosition = fixedPosition
pc . gpsUpdateInterval = UInt32 ( gpsUpdateInterval )
2025-10-05 17:51:18 -07:00
pc . positionBroadcastSecs = UInt32 ( positionBroadcastSeconds . intValue )
pc . broadcastSmartMinimumIntervalSecs = UInt32 ( broadcastSmartMinimumIntervalSecs . intValue )
2024-06-23 14:40:28 -07:00
pc . broadcastSmartMinimumDistance = UInt32 ( broadcastSmartMinimumDistance )
pc . rxGpio = UInt32 ( rxGpio )
pc . txGpio = UInt32 ( txGpio )
pc . gpsEnGpio = UInt32 ( gpsEnGpio )
var pf : PositionFlags = [ ]
if includeAltitude { pf . insert ( . Altitude ) }
if includeAltitudeMsl { pf . insert ( . AltitudeMsl ) }
if includeGeoidalSeparation { pf . insert ( . GeoidalSeparation ) }
if includeDop { pf . insert ( . Dop ) }
if includeHvdop { pf . insert ( . Hvdop ) }
if includeSatsinview { pf . insert ( . Satsinview ) }
if includeSeqNo { pf . insert ( . SeqNo ) }
if includeTimestamp { pf . insert ( . Timestamp ) }
if includeSpeed { pf . insert ( . Speed ) }
if includeHeading { pf . insert ( . Heading ) }
pc . positionFlags = UInt32 ( pf . rawValue )
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
_ = try await accessoryManager . savePositionConfig ( config : pc , fromUser : connectedNode . user ! , toUser : node ! . user ! )
Task { @ MainActor in
// D i s a b l e t h e b u t t o n a f t e r a s u c c e s s f u l s a v e
hasChanges = false
goBack ( )
}
2024-06-23 14:40:28 -07:00
}
}
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
var setFixedAlertTitle : String {
if node ? . positionConfig ? . fixedPosition = = true {
return " Remove Fixed Position "
} else {
return " Set Fixed Position "
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
var body : some View {
2025-10-05 17:51:18 -07:00
Form {
ConfigHeader ( title : " Position " , config : \ . positionConfig , node : node , onAppear : setPositionValues )
positionPacketSection
deviceGPSSection
positionFlagsSection
advancedPositionFlagsSection
if gpsMode = = 1 {
advancedDeviceGPSSection
2022-06-12 07:38:08 -07:00
}
2025-10-05 17:51:18 -07:00
}
. disabled ( ! accessoryManager . isConnected || node ? . positionConfig = = nil )
. alert ( setFixedAlertTitle , isPresented : $ showingSetFixedAlert ) {
Button ( " Cancel " , role : . cancel ) {
fixedPosition = ! fixedPosition
}
if node ? . positionConfig ? . fixedPosition ? ? false {
Button ( " Remove " , role : . destructive ) {
removeFixedPosition ( )
2024-03-27 16:06:24 -07:00
}
2025-10-05 17:51:18 -07:00
} else {
Button ( " Set " ) {
setFixedPosition ( )
2024-03-27 16:06:24 -07:00
}
}
2025-10-05 17:51:18 -07:00
} message : {
Text ( node ? . positionConfig ? . fixedPosition ? ? false ? " This will disable fixed position and remove the currently set position. " : " This will send a current position from your phone and enable fixed position. " )
}
. safeAreaInset ( edge : . bottom , alignment : . center ) {
HStack ( spacing : 0 ) {
saveButton
}
2022-06-12 07:38:08 -07:00
}
2025-05-08 22:50:44 -07:00
. navigationTitle ( " Position Config " )
2024-06-23 14:40:28 -07:00
. navigationBarItems (
trailing : ZStack {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
ConnectedDevice ( deviceConnected : accessoryManager . isConnected , name : accessoryManager . activeConnection ? . device . shortName ? ? " ? " )
2024-06-23 14:40:28 -07:00
}
)
2024-09-04 10:27:06 -07:00
. onFirstAppear {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
supportedVersion = accessoryManager . checkIsVersionSupported ( forVersion : minimumVersion )
2024-09-04 10:27:06 -07:00
// N e e d t o r e q u e s t a N e t w o r k C o n f i g f r o m t h e r e m o t e n o d e b e f o r e a l l o w i n g c h a n g e s
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if let deviceNum = accessoryManager . activeDeviceNum , let node {
let connectedNode = getNodeInfo ( id : deviceNum , context : context )
2024-09-04 10:27:06 -07:00
if let connectedNode {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
if node . num != deviceNum {
2024-09-05 19:31:29 -07:00
if UserDefaults . enableAdministration {
// / 2 . 5 A d m i n i s t r a t i o n w i t h s e s s i o n p a s s k e y
let expiration = node . sessionExpiration ? ? Date ( )
if expiration < Date ( ) || node . positionConfig = = nil {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
do {
Logger . mesh . info ( " ⚙️ Empty or expired position config requesting via PKI admin " )
try await accessoryManager . requestPositionConfig ( fromUser : connectedNode . user ! , toUser : node . user ! )
} catch {
Logger . mesh . info ( " 🚨 Position config request failed " )
}
}
2024-09-05 19:31:29 -07:00
}
} else {
// / L e g a c y A d m i n i s t r a t i o n
2025-05-13 06:19:27 -07:00
Logger . mesh . info ( " ☠️ Using insecure legacy admin that is no longer supported, please upgrade your firmware. " )
2024-09-04 10:27:06 -07:00
}
}
2023-01-31 22:08:03 -08:00
}
}
2022-06-21 13:10:30 -07:00
}
2024-10-05 15:50:57 -07:00
. onChange ( of : fixedPosition ) { _ , newFixed in
2024-03-27 16:06:24 -07:00
if supportedVersion {
2024-06-23 14:40:28 -07:00
if let positionConfig = node ? . positionConfig {
2024-03-27 16:06:24 -07:00
// / F i x e d P o s i t i o n i s o f f t o s t a r t
2024-06-23 14:40:28 -07:00
if ! positionConfig . fixedPosition && newFixed {
2024-03-27 16:06:24 -07:00
showingSetFixedAlert = true
2024-06-23 14:40:28 -07:00
} else if positionConfig . fixedPosition && ! newFixed {
2024-03-27 16:06:24 -07:00
// / F i x e d P o s i t i o n i s o n t o s t a r t
showingSetFixedAlert = true
}
}
}
}
2024-10-06 08:50:12 -07:00
. onChange ( of : gpsMode ) { _ , newGpsMode in
2024-08-11 17:31:27 -07:00
if newGpsMode != node ? . positionConfig ? . gpsMode ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : rxGpio ) { _ , newRxGpio in
2024-08-11 17:31:27 -07:00
if newRxGpio != node ? . positionConfig ? . rxGpio ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : txGpio ) { _ , newTxGpio in
2024-08-11 17:31:27 -07:00
if newTxGpio != node ? . positionConfig ? . txGpio ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : gpsEnGpio ) { _ , newGpsEnGpio in
2024-08-11 17:31:27 -07:00
if newGpsEnGpio != node ? . positionConfig ? . gpsEnGpio ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : smartPositionEnabled ) { _ , newSmartPositionEnabled in
2024-08-11 17:31:27 -07:00
if newSmartPositionEnabled != node ? . positionConfig ? . smartPositionEnabled { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2025-10-05 17:51:18 -07:00
. onChange ( of : positionBroadcastSeconds . intValue ) { _ , newPositionBroadcastSeconds in
2024-08-11 17:31:27 -07:00
if newPositionBroadcastSeconds != node ? . positionConfig ? . positionBroadcastSeconds ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2025-10-05 17:51:18 -07:00
. onChange ( of : broadcastSmartMinimumIntervalSecs . intValue ) { _ , newBroadcastSmartMinimumIntervalSecs in
2024-08-11 17:31:27 -07:00
if newBroadcastSmartMinimumIntervalSecs != node ? . positionConfig ? . broadcastSmartMinimumIntervalSecs ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : broadcastSmartMinimumDistance ) { _ , newBroadcastSmartMinimumDistance in
2024-08-11 17:31:27 -07:00
if newBroadcastSmartMinimumDistance != node ? . positionConfig ? . broadcastSmartMinimumDistance ? ? 0 { hasChanges = true }
2022-10-04 18:10:40 -07:00
}
2024-10-06 08:50:12 -07:00
. onChange ( of : gpsUpdateInterval ) { _ , newGpsUpdateInterval in
2024-08-11 17:31:27 -07:00
if newGpsUpdateInterval != node ? . positionConfig ? . gpsUpdateInterval ? ? 0 { hasChanges = true }
2022-09-01 18:37:41 -07:00
}
2022-06-12 07:38:08 -07:00
}
2025-10-05 17:51:18 -07:00
2024-08-11 17:31:27 -07:00
func handlePositionFlagtChanges ( ) {
2024-10-06 08:50:12 -07:00
guard ( node ? . positionConfig ) != nil else { return }
2024-06-23 14:40:28 -07:00
let pf = PositionFlags ( rawValue : self . positionFlags )
2024-08-11 17:31:27 -07:00
hasChanges =
2024-06-23 14:40:28 -07:00
pf . contains ( . Altitude ) ||
pf . contains ( . AltitudeMsl ) ||
pf . contains ( . Satsinview ) ||
pf . contains ( . SeqNo ) ||
pf . contains ( . Timestamp ) ||
pf . contains ( . Speed ) ||
pf . contains ( . Heading ) ||
pf . contains ( . GeoidalSeparation ) ||
pf . contains ( . Dop ) ||
pf . contains ( . Hvdop )
}
2025-10-05 17:51:18 -07:00
2023-03-19 18:37:23 -07:00
func setPositionValues ( ) {
self . smartPositionEnabled = node ? . positionConfig ? . smartPositionEnabled ? ? true
2024-02-05 21:46:16 -08:00
self . deviceGpsEnabled = node ? . positionConfig ? . deviceGpsEnabled ? ? false
self . gpsMode = Int ( node ? . positionConfig ? . gpsMode ? ? 0 )
if node ? . positionConfig ? . deviceGpsEnabled ? ? false && gpsMode != 1 {
self . gpsMode = 1
}
2023-03-27 10:43:01 -07:00
self . rxGpio = Int ( node ? . positionConfig ? . rxGpio ? ? 0 )
self . txGpio = Int ( node ? . positionConfig ? . txGpio ? ? 0 )
2023-12-21 11:31:40 -08:00
self . gpsEnGpio = Int ( node ? . positionConfig ? . gpsEnGpio ? ? 0 )
2023-03-19 18:37:23 -07:00
self . fixedPosition = node ? . positionConfig ? . fixedPosition ? ? false
2024-02-05 21:46:16 -08:00
self . gpsUpdateInterval = Int ( node ? . positionConfig ? . gpsUpdateInterval ? ? 30 )
2025-10-05 17:51:18 -07:00
self . positionBroadcastSeconds = UpdateInterval ( from : Int ( node ? . positionConfig ? . positionBroadcastSeconds ? ? 3600 ) )
self . broadcastSmartMinimumIntervalSecs = UpdateInterval ( from : Int ( node ? . positionConfig ? . broadcastSmartMinimumIntervalSecs ? ? 30 ) )
2023-03-27 17:04:24 -07:00
self . broadcastSmartMinimumDistance = Int ( node ? . positionConfig ? . broadcastSmartMinimumDistance ? ? 50 )
2023-03-19 18:37:23 -07:00
self . positionFlags = Int ( node ? . positionConfig ? . positionFlags ? ? 3 )
let pf = PositionFlags ( rawValue : self . positionFlags )
2024-06-23 14:40:28 -07:00
self . includeAltitude = pf . contains ( . Altitude )
self . includeAltitudeMsl = pf . contains ( . AltitudeMsl )
self . includeGeoidalSeparation = pf . contains ( . GeoidalSeparation )
self . includeDop = pf . contains ( . Dop )
self . includeHvdop = pf . contains ( . Hvdop )
self . includeSatsinview = pf . contains ( . Satsinview )
self . includeSeqNo = pf . contains ( . SeqNo )
self . includeTimestamp = pf . contains ( . Timestamp )
self . includeSpeed = pf . contains ( . Speed )
self . includeHeading = pf . contains ( . Heading )
2023-03-19 18:37:23 -07:00
self . hasChanges = false
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
private func setFixedPosition ( ) {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
guard let nodeNum = accessoryManager . activeDeviceNum ,
2024-06-23 14:40:28 -07:00
nodeNum > 0 else { return }
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
do {
try await accessoryManager . setFixedPosition ( fromUser : node ! . user ! , channel : 0 )
} catch {
Logger . mesh . error ( " Set Position Failed " )
}
2024-06-23 14:40:28 -07:00
}
node ? . positionConfig ? . fixedPosition = true
do {
try context . save ( )
Logger . data . info ( " 💾 Updated Position Config with Fixed Position = true " )
} catch {
context . rollback ( )
let nsError = error as NSError
2025-03-31 22:06:00 -07:00
Logger . data . error ( " Error Saving Position Config Entity \( nsError , privacy : . public ) " )
2024-06-23 14:40:28 -07:00
}
}
2025-10-05 17:51:18 -07:00
2024-06-23 14:40:28 -07:00
private func removeFixedPosition ( ) {
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
guard let nodeNum = accessoryManager . activeDeviceNum ,
2024-06-23 14:40:28 -07:00
nodeNum > 0 else { return }
Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341)
* Initial implementation of transports
* Initial LogRadio implementation
* Fixes for Settings view (caused by debug commenting)
* Refinement of the object and actor model
* Connect view text and tab updates
* Fix mac catalyst and tests
* Warning and logging clean-up
* In progress commit
* Serial Transport and Reconnect draft work
* Serial transport and reconnection draft work
* Quick fix for BLE - still more work to do
* interim commit
* More in progress changes
* Minor improvements
* Pretty good initial implementation
* Bump version beyond the app store
* Fix for disconnection swipeAction
* Tweaks to TCPConnection implementation
* Retry for NONCE_ONLY_DB
* Revert json string change
* Simplified some of the API + "Anti-discovery"
* Tweaks for devices leaving the discovery process
* Bump version
* iOS26 Tweaks
* Tweaks and bug fixes
* Add link with slash sf symbol
* update symbol image on connect view
* BLE disconnect handling
* Log privacy attributes
* Onboarding and minor fixes.
* change database to nodes, add emoji to tcp logs
* Error handling improvements
* More logging emojis
* Suppressed unnecessary errors on disconnect
* Heartbeat emoji
* Add bluetooth symbol
* add privacy attributes to [TCP] logs, add custom bluetooth logo
* Improve routing logs
* Emoji for connect logs
* Heartbeat emoji
* Add CBCentralManagerScanOptionAllowDuplicatesKey options to central for bluetooth
* fix nav errors by switching from observableobject to state
* Update connection indicator icon
* fix for BLE disconnects
* Connection process fixes
* More fixes/tweaks to connection process
* Strict concurrency
* Fix some warnings, remove wifi warning
* delete stale keys
* interim commit
* Update privacy for log, fix wrong space
* fix a couple of linting items
* Switch to targeted
* interim commit
* BLE Signal strenth on connect view
* Remove BLE RSSI from long press menu
* Modem lights
* minor spacing tweak
* Additional BLE logging and a scanning fix.
* Discovery and BLE RSSI improvements
* Background suspension
* Update isConnected to enable UI during db load
* update protobufs
* Replace config if statements with switches, Fix unknown module config logging, make dark mode modem circle stroke color white so they are visible
* Additional logging cleanup
* hast
* Set unmessagable to true if the longname has the unmessagable emoji
* Connect error handling improvements
* Admin popup list icon and activity lights updates
* Revert use of .toolbar back to .navigationBarItems
* More public logging
* Better BLE error handling
* Node DB progress meter
* minor tweak to activity light interaction timing
* Fix comment linting, remove stale keys
* Remove stale keys
* Easy linting fixes
* Two more simple linting fixes
* clean up meshtasticapp
* More public logging
* Replay config
* Logging
* Fix for unselected node on Settings
* Tweak to progress meter based on device idiom
* Update protos
* Session replay redaction of messages
* Serial fix for old devices, and a let statement
* Mask text too
* Fix typo
* BLE poweredOff is now an auto-reconnectable error
* Update logging
* Fix for peerRemovedPairingInformation
* Logging for BLE peripheral:didUpdateValueFor errors.
* Fix for inconsistent swipe disconnect behavior
* periperal:didUpdateValueFor error handling
* Fix for BLEConnection continuation guarding
* BLEConnection actor deadlock on disconnect
* Heartbeat nonce
* Fix for swipe disconnect and task cancellation
* Fix for swipe actions not honoring .disabled()
* Tell BLETransport when BLEConnection is cancelled
* Update navigation logging
* Logging updates
* Bump version to 2.7.0
* Organize into folders and heartbeat stuff
* Minor improvements to manual TCP connection
* Auto-connect toggle
* Possible BLE bug, still waiting to see in logs
* Concurrency tweaks
* Concurrency improvements
* requestDeviceMetadata fix. fixes remote admin
* Minor typo fixes
* "All" button for log filters: category and level
* More robust continuation handling for BLE
* @FetchRequest based ChannelMessageList
* Update info.plist and device hardware file
* Move auto connect toggle to app settings and debug mode, tint properly with the accent color
* Add label to auto connect toggle
* Update log for node info received from ourselves over the mesh
* Remove unused scrollViewProxy
* Update Meshtastic/Views/Onboarding/DeviceOnboarding.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update target for connect view
* Properly Set datadog environment
* Comment out ble manager
* Adjust cyclomatic complexity thresholds in .swiftlint.yml
* Linting fixes, delete ble manager
* Make session replay debug only
---------
Co-authored-by: jake-b <jake-b@users.noreply.github.com>
Co-authored-by: jake <jake@jakes-Mac-mini.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-27 08:09:02 -07:00
Task {
do {
try await accessoryManager . removeFixedPosition ( fromUser : node ! . user ! , channel : 0 )
} catch {
Logger . mesh . error ( " Remove Fixed Position Failed " )
}
2024-06-23 14:40:28 -07:00
}
let mutablePositions = node ? . positions ? . mutableCopy ( ) as ? NSMutableOrderedSet
mutablePositions ? . removeAllObjects ( )
node ? . positions = mutablePositions
node ? . positionConfig ? . fixedPosition = false
do {
try context . save ( )
Logger . data . info ( " 💾 Updated Position Config with Fixed Position = false " )
} catch {
context . rollback ( )
let nsError = error as NSError
2025-03-31 22:06:00 -07:00
Logger . data . error ( " Error Saving Position Config Entity \( nsError , privacy : . public ) " )
2024-06-23 14:40:28 -07:00
}
}
2022-06-12 07:38:08 -07:00
}