From b4c749a978ce1599bcf9486e3b0926a299739e75 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sat, 1 Nov 2025 08:29:47 -0700 Subject: [PATCH] Clean up channel qr code functionality. --- Localizable.xcstrings | 5 + .../AccessoryManager+ToRadio.swift | 50 +++++----- Meshtastic/Extensions/Url.swift | 12 +++ Meshtastic/MeshtasticApp.swift | 91 ++++++++++--------- .../Views/Settings/SaveChannelQRCode.swift | 6 +- 5 files changed, 94 insertions(+), 70 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 132dbb01..0c8fab99 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -36770,7 +36770,12 @@ } } }, + "These settings will %@" : { + "comment" : "A paragraph below the title that explains what the user is about to do.", + "isCommentAutoGenerated" : true + }, "These settings will %@ channels. The current LoRa Config will be replaced, if there are substantial changes to the LoRa config the device will reboot" : { + "extractionState" : "stale", "localizations" : { "it" : { "stringUnit" : { diff --git a/Meshtastic/Accessory/Accessory Manager/AccessoryManager+ToRadio.swift b/Meshtastic/Accessory/Accessory Manager/AccessoryManager+ToRadio.swift index e0478902..57c2f701 100644 --- a/Meshtastic/Accessory/Accessory Manager/AccessoryManager+ToRadio.swift +++ b/Meshtastic/Accessory/Accessory Manager/AccessoryManager+ToRadio.swift @@ -509,32 +509,32 @@ extension AccessoryManager { let logString = String.localizedStringWithFormat("Sent a Channel for: %@ Channel Index %d".localized, String(deviceNum), chan.index) try await send(toRadio, debugDescription: logString) } - - // Save the LoRa Config and the device will reboot - var adminPacket = AdminMessage() - adminPacket.setConfig.lora = channelSet.loraConfig - adminPacket.setConfig.lora.configOkToMqtt = okToMQTT // Preserve users okToMQTT choice - var meshPacket: MeshPacket = MeshPacket() - meshPacket.to = UInt32(deviceNum) - meshPacket.from = UInt32(deviceNum) - meshPacket.id = UInt32.random(in: UInt32(UInt8.max)..