From 3e3bec380d0d4655a10a017cb40b6b6a37f7929b Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 21 Jun 2022 10:15:47 -0700 Subject: [PATCH] Start with position --- MeshtasticApple/Helpers/BLEManager.swift | 35 +++++++++++++++++++ .../Views/Settings/PositionConfig.swift | 7 ++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/MeshtasticApple/Helpers/BLEManager.swift b/MeshtasticApple/Helpers/BLEManager.swift index f0abf250..9af895ae 100644 --- a/MeshtasticApple/Helpers/BLEManager.swift +++ b/MeshtasticApple/Helpers/BLEManager.swift @@ -955,4 +955,39 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph return false } + + public func savePositionConfig(config: Config.PositionConfig, destNum: Int64, wantResponse: Bool) -> Bool { + + var adminPacket = AdminMessage() + adminPacket.setConfig.position = config + + var meshPacket: MeshPacket = MeshPacket() + meshPacket.to = UInt32(connectedPeripheral.num) + meshPacket.from = 0 //UInt32(connectedPeripheral.num) + meshPacket.id = UInt32.random(in: UInt32(UInt8.max)..