mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Update Meshtastic/AppIntents/SendWaypointIntent.swift
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
7e0c0b8347
commit
e7055a2768
1 changed files with 5 additions and 1 deletions
|
|
@ -89,7 +89,11 @@ struct SendWaypointIntent: AppIntent {
|
|||
}
|
||||
|
||||
if isLocked {
|
||||
newWaypoint.lockedTo = UInt32(BLEManager.shared.connectedPeripheral!.num)
|
||||
if let connectedPeripheral = BLEManager.shared.connectedPeripheral {
|
||||
newWaypoint.lockedTo = UInt32(connectedPeripheral.num)
|
||||
} else {
|
||||
throw AppIntentErrors.AppIntentError.notConnected
|
||||
}
|
||||
}
|
||||
|
||||
if !BLEManager.shared.sendWaypoint(waypoint: newWaypoint) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue