Merge pull request #631 from meshtastic/2.3.8_Working_Changes
2.3.8 working changes
|
|
@ -1583,7 +1583,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.7;
|
||||
MARKETING_VERSION = 2.3.8;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
|
@ -1617,7 +1617,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.7;
|
||||
MARKETING_VERSION = 2.3.8;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
|
|
@ -1690,7 +1690,7 @@
|
|||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.7;
|
||||
MARKETING_VERSION = 2.3.8;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
@ -1723,7 +1723,7 @@
|
|||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 2.3.7;
|
||||
MARKETING_VERSION = 2.3.8;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
|
|||
23
Meshtastic/Assets.xcassets/CANARY1.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
23
Meshtastic/Assets.xcassets/CDEBYTEEORAS3.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
23
Meshtastic/Assets.xcassets/CHATTER2.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/CHATTER2.imageset/play_store_icon_114px-2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/CHATTER2.imageset/play_store_icon_114px-3.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/CHATTER2.imageset/play_store_icon_114px-4.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
23
Meshtastic/Assets.xcassets/ESP32S3PICO.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/ESP32S3PICO.imageset/play_store_icon_114px-2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/ESP32S3PICO.imageset/play_store_icon_114px-3.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/ESP32S3PICO.imageset/play_store_icon_114px-4.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"filename" : "Paper-Meshtastic-2 copy.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"filename" : "Paper-Meshtastic-2 copy 1.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"filename" : "Paper-Meshtastic-2 copy 2.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
|
|
|||
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPER.imageset/Paper-Meshtastic-2 copy 1.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPER.imageset/Paper-Meshtastic-2 copy 2.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPER.imageset/Paper-Meshtastic-2 copy.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
23
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPERV10.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Paper-Meshtastic-2 copy.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Paper-Meshtastic-2 copy 1.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Paper-Meshtastic-2 copy 2.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPERV10.imageset/Paper-Meshtastic-2 copy 1.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPERV10.imageset/Paper-Meshtastic-2 copy 2.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSPAPERV10.imageset/Paper-Meshtastic-2 copy.jpg
vendored
Normal file
|
After Width: | Height: | Size: 66 KiB |
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"filename" : "images.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"filename" : "images 1.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"filename" : "images 2.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
|
|
|||
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKER.imageset/images 1.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKER.imageset/images 2.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKER.imageset/images.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
23
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKERV10.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "images.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "images 1.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "images 2.jpeg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKERV10.imageset/images 1.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKERV10.imageset/images 2.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
Meshtastic/Assets.xcassets/HELTECWIRELESSTRACKERV10.imageset/images.jpeg
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
23
Meshtastic/Assets.xcassets/TDLORAC.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2 2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/TDLORAC.imageset/play_store_icon_114px-2 1.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/TDLORAC.imageset/play_store_icon_114px-2 2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/TDLORAC.imageset/play_store_icon_114px-2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
23
Meshtastic/Assets.xcassets/TWCMESHV4.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/TWCMESHV4.imageset/play_store_icon_114px-2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/TWCMESHV4.imageset/play_store_icon_114px-3.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/TWCMESHV4.imageset/play_store_icon_114px-4.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
23
Meshtastic/Assets.xcassets/UNPHONE.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "UNPHONE.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "UNPHONE@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "UNPHONE@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/UNPHONE.imageset/UNPHONE.png
vendored
Normal file
|
After Width: | Height: | Size: 756 KiB |
BIN
Meshtastic/Assets.xcassets/UNPHONE.imageset/UNPHONE@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 756 KiB |
BIN
Meshtastic/Assets.xcassets/UNPHONE.imageset/UNPHONE@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 756 KiB |
23
Meshtastic/Assets.xcassets/WIPHONE.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "play_store_icon_114px-2.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-3.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "play_store_icon_114px-4.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-2.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-3.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Meshtastic/Assets.xcassets/WIPHONE.imageset/play_store_icon_114px-4.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -100,8 +100,8 @@ enum GpsUpdateIntervals: Int, CaseIterable, Identifiable {
|
|||
}
|
||||
|
||||
enum GpsMode: Int, CaseIterable, Equatable {
|
||||
case disabled = 0
|
||||
case enabled = 1
|
||||
case disabled = 0
|
||||
case notPresent = 2
|
||||
|
||||
var id: Int { self.rawValue }
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
}
|
||||
}
|
||||
var context: NSManagedObjectContext?
|
||||
|
||||
static let shared = BLEManager()
|
||||
//var userSettings: UserSettings?
|
||||
private var centralManager: CBCentralManager!
|
||||
@Published var peripherals: [Peripheral] = []
|
||||
|
|
@ -545,10 +547,13 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
// Handle Any local only packets we get over BLE
|
||||
case .unknownApp:
|
||||
var nowKnown = false
|
||||
guard let ctx = context else {
|
||||
return
|
||||
}
|
||||
|
||||
// MyInfo from initial connection
|
||||
if context != nil && decodedInfo.myInfo.isInitialized && decodedInfo.myInfo.myNodeNum > 0 {
|
||||
let myInfo = myInfoPacket(myInfo: decodedInfo.myInfo, peripheralId: self.connectedPeripheral.id, context: context!)
|
||||
if decodedInfo.myInfo.isInitialized && decodedInfo.myInfo.myNodeNum > 0 {
|
||||
let myInfo = myInfoPacket(myInfo: decodedInfo.myInfo, peripheralId: self.connectedPeripheral.id, context: ctx)
|
||||
|
||||
if myInfo != nil {
|
||||
UserDefaults.preferredPeripheralNum = Int(myInfo?.myNodeNum ?? 0)
|
||||
|
|
@ -559,33 +564,31 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
tryClearExistingChannels()
|
||||
}
|
||||
// NodeInfo
|
||||
if context != nil && decodedInfo.nodeInfo.num > 0 {// && !invalidVersion {
|
||||
if decodedInfo.nodeInfo.num > 0 {
|
||||
nowKnown = true
|
||||
let nodeInfo = nodeInfoPacket(nodeInfo: decodedInfo.nodeInfo, channel: decodedInfo.packet.channel, context: context!)
|
||||
|
||||
if nodeInfo != nil {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo?.num ?? -1 {
|
||||
if nodeInfo!.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo?.user?.shortName ?? "?"
|
||||
connectedPeripheral.longName = nodeInfo?.user?.longName ?? "unknown".localized
|
||||
if let nodeInfo = nodeInfoPacket(nodeInfo: decodedInfo.nodeInfo, channel: decodedInfo.packet.channel, context: ctx) {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo.num {
|
||||
if nodeInfo.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo.user?.shortName ?? "?"
|
||||
connectedPeripheral.longName = nodeInfo.user?.longName ?? "unknown".localized
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Channels
|
||||
if context != nil && decodedInfo.channel.isInitialized && connectedPeripheral != nil {
|
||||
if decodedInfo.channel.isInitialized && connectedPeripheral != nil {
|
||||
nowKnown = true
|
||||
channelPacket(channel: decodedInfo.channel, fromNum: Int64(truncatingIfNeeded: connectedPeripheral.num), context: context!)
|
||||
channelPacket(channel: decodedInfo.channel, fromNum: Int64(truncatingIfNeeded: connectedPeripheral.num), context: ctx)
|
||||
}
|
||||
// Config
|
||||
if context != nil && decodedInfo.config.isInitialized && !invalidVersion && connectedPeripheral != nil {
|
||||
if decodedInfo.config.isInitialized && !invalidVersion && connectedPeripheral != nil {
|
||||
nowKnown = true
|
||||
localConfig(config: decodedInfo.config, context: context!, nodeNum: Int64(truncatingIfNeeded: self.connectedPeripheral.num), nodeLongName: self.connectedPeripheral.longName)
|
||||
localConfig(config: decodedInfo.config, context: ctx, nodeNum: Int64(truncatingIfNeeded: self.connectedPeripheral.num), nodeLongName: self.connectedPeripheral.longName)
|
||||
}
|
||||
// Module Config
|
||||
if context != nil && decodedInfo.moduleConfig.isInitialized && !invalidVersion && self.connectedPeripheral?.num != 0{
|
||||
if decodedInfo.moduleConfig.isInitialized && !invalidVersion && self.connectedPeripheral?.num != 0{
|
||||
nowKnown = true
|
||||
moduleConfig(config: decodedInfo.moduleConfig, context: context!, nodeNum: Int64(truncatingIfNeeded: self.connectedPeripheral?.num ?? 0), nodeLongName: self.connectedPeripheral.longName)
|
||||
moduleConfig(config: decodedInfo.moduleConfig, context: ctx, nodeNum: Int64(truncatingIfNeeded: self.connectedPeripheral?.num ?? 0), nodeLongName: self.connectedPeripheral.longName)
|
||||
if decodedInfo.moduleConfig.payloadVariant == ModuleConfig.OneOf_PayloadVariant.cannedMessage(decodedInfo.moduleConfig.cannedMessage) {
|
||||
if decodedInfo.moduleConfig.cannedMessage.enabled {
|
||||
_ = self.getCannedMessageModuleMessages(destNum: self.connectedPeripheral.num, wantResponse: true)
|
||||
|
|
@ -593,9 +596,9 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
}
|
||||
}
|
||||
// Device Metadata
|
||||
if context != nil && decodedInfo.metadata.firmwareVersion.count > 0 && !invalidVersion {
|
||||
if decodedInfo.metadata.firmwareVersion.count > 0 && !invalidVersion {
|
||||
nowKnown = true
|
||||
deviceMetadataPacket(metadata: decodedInfo.metadata, fromNum: connectedPeripheral.num, context: context!)
|
||||
deviceMetadataPacket(metadata: decodedInfo.metadata, fromNum: connectedPeripheral.num, context: ctx)
|
||||
connectedPeripheral.firmwareVersion = decodedInfo.metadata.firmwareVersion
|
||||
let lastDotIndex = decodedInfo.metadata.firmwareVersion.lastIndex(of: ".")
|
||||
if lastDotIndex == nil {
|
||||
|
|
@ -2623,6 +2626,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
do {
|
||||
connectedPeripheral.peripheral.writeValue(binaryData, for: TORADIO_characteristic, type: .withResponse)
|
||||
try context!.save()
|
||||
print(adminDescription)
|
||||
return true
|
||||
} catch {
|
||||
context!.rollback()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ struct MeshtasticAppleApp: App {
|
|||
|
||||
@UIApplicationDelegateAdaptor(MeshtasticAppDelegate.self) var appDelegate
|
||||
let persistenceController = PersistenceController.shared
|
||||
@ObservedObject private var bleManager: BLEManager = BLEManager()
|
||||
@ObservedObject private var bleManager: BLEManager = BLEManager.shared
|
||||
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ func upsertPositionPacket (packet: MeshPacket, context: NSManagedObjectContext)
|
|||
if mostRecent.coordinate.distance(from: position.coordinate) < 15.0 {
|
||||
mutablePositions.remove(mostRecent)
|
||||
}
|
||||
} else if mutablePositions.count > 0 && 11...16 ~= position.precisionBits {
|
||||
} else if mutablePositions.count > 0 {
|
||||
/// Don't store any history for reduced accuracy positions, we will just show a circle
|
||||
mutablePositions.removeAllObjects()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,10 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
/// LoRAType device: https://loratype.org/
|
||||
case loraType // = 19
|
||||
|
||||
///
|
||||
/// wiphone https://www.wiphone.io/
|
||||
case wiphone // = 20
|
||||
|
||||
///
|
||||
/// B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station
|
||||
case stationG1 // = 25
|
||||
|
|
@ -307,6 +311,7 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
case 17: self = .nanoG1Explorer
|
||||
case 18: self = .nanoG2Ultra
|
||||
case 19: self = .loraType
|
||||
case 20: self = .wiphone
|
||||
case 25: self = .stationG1
|
||||
case 26: self = .rak11310
|
||||
case 27: self = .senseloraRp2040
|
||||
|
|
@ -372,6 +377,7 @@ enum HardwareModel: SwiftProtobuf.Enum {
|
|||
case .nanoG1Explorer: return 17
|
||||
case .nanoG2Ultra: return 18
|
||||
case .loraType: return 19
|
||||
case .wiphone: return 20
|
||||
case .stationG1: return 25
|
||||
case .rak11310: return 26
|
||||
case .senseloraRp2040: return 27
|
||||
|
|
@ -442,6 +448,7 @@ extension HardwareModel: CaseIterable {
|
|||
.nanoG1Explorer,
|
||||
.nanoG2Ultra,
|
||||
.loraType,
|
||||
.wiphone,
|
||||
.stationG1,
|
||||
.rak11310,
|
||||
.senseloraRp2040,
|
||||
|
|
@ -2741,6 +2748,7 @@ extension HardwareModel: SwiftProtobuf._ProtoNameProviding {
|
|||
17: .same(proto: "NANO_G1_EXPLORER"),
|
||||
18: .same(proto: "NANO_G2_ULTRA"),
|
||||
19: .same(proto: "LORA_TYPE"),
|
||||
20: .same(proto: "WIPHONE"),
|
||||
25: .same(proto: "STATION_G1"),
|
||||
26: .same(proto: "RAK11310"),
|
||||
27: .same(proto: "SENSELORA_RP2040"),
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ struct NodeInfoItem: View {
|
|||
.frame(width: 75, height: 75)
|
||||
.cornerRadius(5)
|
||||
Text(String(node.user!.hwModel ?? "unset".localized))
|
||||
.font(.caption2).fixedSize()
|
||||
.font(.caption2)
|
||||
.frame(maxWidth: 125)
|
||||
}
|
||||
}
|
||||
if node.snr != 0 && !node.viaMqtt {
|
||||
|
|
|
|||
|
|
@ -308,18 +308,52 @@ func firstMissingChannelIndex(_ indexes: [Int]) -> Int {
|
|||
|
||||
enum PositionPrecision: Int, CaseIterable, Identifiable {
|
||||
|
||||
case two = 2
|
||||
case three = 3
|
||||
case four = 4
|
||||
case five = 5
|
||||
case six = 6
|
||||
case seven = 7
|
||||
case eight = 8
|
||||
case nine = 9
|
||||
case ten = 10
|
||||
case eleven = 11
|
||||
case twelve = 12
|
||||
case thirteen = 13
|
||||
case fourteen = 14
|
||||
case fifteen = 15
|
||||
case sixteen = 16
|
||||
case seventeen = 17
|
||||
case eightteen = 18
|
||||
case nineteen = 19
|
||||
case twenty = 20
|
||||
case twentyone = 21
|
||||
case twentytwo = 22
|
||||
case twentythree = 23
|
||||
case twentyfour = 24
|
||||
|
||||
var id: Int { self.rawValue }
|
||||
|
||||
var precisionMeters: Double {
|
||||
switch self {
|
||||
|
||||
case .two:
|
||||
return 5976446.981252
|
||||
case .three:
|
||||
return 2988223.4850600003
|
||||
case .four:
|
||||
return 1494111.7369640006
|
||||
case .five:
|
||||
return 747055.8629159998
|
||||
case .six:
|
||||
return 373527.9258920002
|
||||
case .seven:
|
||||
return 186763.95738000044
|
||||
case .eight:
|
||||
return 93381.97312400135
|
||||
case .nine:
|
||||
return 46690.98099600022
|
||||
case .ten:
|
||||
return 23345.48493200123
|
||||
case .eleven:
|
||||
return 11672.736900000944
|
||||
case .twelve:
|
||||
|
|
@ -332,25 +366,27 @@ enum PositionPrecision: Int, CaseIterable, Identifiable {
|
|||
return 729.5356200010741
|
||||
case .sixteen:
|
||||
return 364.7622440000765
|
||||
case .seventeen:
|
||||
return 182.37555600115968
|
||||
case .eightteen:
|
||||
return 91.1822120001193
|
||||
case .nineteen:
|
||||
return 45.58554000039009
|
||||
case .twenty:
|
||||
return 22.787204001316468
|
||||
case .twentyone:
|
||||
return 11.388036000988677
|
||||
case .twentytwo:
|
||||
return 5.688452000824781
|
||||
case .twentythree:
|
||||
return 2.8386600007428338
|
||||
case .twentyfour:
|
||||
return 1.413763999910884
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
let distanceFormatter = MKDistanceFormatter()
|
||||
switch self {
|
||||
|
||||
case .eleven:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
case .twelve:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
case .thirteen:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
case .fourteen:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
case .fifteen:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
case .sixteen:
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
}
|
||||
return String.localizedStringWithFormat("position.precision %@".localized, String(distanceFormatter.string(fromDistance: precisionMeters)))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ struct ChannelForm: View {
|
|||
if !preciseLocation {
|
||||
VStack(alignment: .leading) {
|
||||
Label("Approximate Location", systemImage: "location.slash.circle.fill")
|
||||
Slider(value: $positionPrecision, in: 11...16, step: 1) {
|
||||
Slider(value: $positionPrecision, in: 11...18, step: 1) {
|
||||
} minimumValueLabel: {
|
||||
Image(systemName: "minus")
|
||||
} maximumValueLabel: {
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ struct DeviceConfig: View {
|
|||
self.doubleTapAsButtonPress = node?.deviceConfig?.doubleTapAsButtonPress ?? false
|
||||
self.ledHeartbeatEnabled = node?.deviceConfig?.ledHeartbeatEnabled ?? true
|
||||
self.isManaged = node?.deviceConfig?.isManaged ?? false
|
||||
self.tzdef = node?.deviceConfig?.tzdef ?? ""
|
||||
if self.tzdef.isEmpty {
|
||||
self.tzdef = TimeZone.current.posixDescription
|
||||
self.hasChanges = true
|
||||
|
|
|
|||
|
|
@ -146,8 +146,12 @@ struct PositionConfig: View {
|
|||
.pickerStyle(SegmentedPickerStyle())
|
||||
.padding(.top, 5)
|
||||
.padding(.bottom, 5)
|
||||
|
||||
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
|
||||
|
|
@ -163,7 +167,11 @@ struct PositionConfig: View {
|
|||
VStack(alignment: .leading) {
|
||||
Toggle(isOn: $fixedPosition) {
|
||||
Label("Fixed Position", systemImage: "location.square.fill")
|
||||
Text("If enabled your current phone location and time will be sent to the device and will broadcast over the mesh on the position interval.")
|
||||
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 {
|
||||
|
||||
}
|
||||
}
|
||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||
}
|
||||
|
|
@ -280,6 +288,9 @@ struct PositionConfig: View {
|
|||
print("Set Position Failed")
|
||||
}
|
||||
print("Remove a fixed position here")
|
||||
let mutablePositions = node?.positions?.mutableCopy() as? NSMutableOrderedSet
|
||||
mutablePositions?.removeAllObjects()
|
||||
node?.positions = mutablePositions
|
||||
node?.positionConfig?.fixedPosition = false
|
||||
do {
|
||||
try context.save()
|
||||
|
|
@ -295,7 +306,6 @@ struct PositionConfig: View {
|
|||
if !bleManager.setFixedPosition(fromUser: node!.user!, channel: 0) {
|
||||
print("Set Position Failed")
|
||||
}
|
||||
print("Set a fixed position")
|
||||
node?.positionConfig?.fixedPosition = true
|
||||
do {
|
||||
try context.save()
|
||||
|
|
@ -374,14 +384,10 @@ struct PositionConfig: View {
|
|||
}
|
||||
}
|
||||
.onChange(of: fixedPosition) { newFixed in
|
||||
print("Changing Fixed Position Value")
|
||||
if supportedVersion {
|
||||
if node != nil && node!.positionConfig != nil {
|
||||
print("We have a node and position config")
|
||||
print("We have turned on fixed position \(!node!.positionConfig!.fixedPosition && newFixed)")
|
||||
/// Fixed Position is off to start
|
||||
if !node!.positionConfig!.fixedPosition && newFixed {
|
||||
print("fire alert")
|
||||
showingSetFixedAlert = true
|
||||
} else if node!.positionConfig!.fixedPosition && !newFixed {
|
||||
/// Fixed Position is on to start
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ struct Firmware: View {
|
|||
@Environment(\.managedObjectContext) var context
|
||||
@EnvironmentObject var bleManager: BLEManager
|
||||
var node: NodeInfoEntity?
|
||||
@State var minimumVersion = "2.3.7"
|
||||
@State var minimumVersion = "2.3.8"
|
||||
@State var version = ""
|
||||
@State private var currentDevice: DeviceHardware?
|
||||
@State private var latestStable: FirmwareRelease?
|
||||
|
|
@ -20,7 +20,7 @@ struct Firmware: View {
|
|||
|
||||
var body: some View {
|
||||
|
||||
let supportedVersion = bleManager.connectedVersion == "0.0.0" || self.minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedAscending || minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedSame
|
||||
let supportedVersion = self.minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedAscending || minimumVersion.compare(bleManager.connectedVersion, options: .numeric) == .orderedSame
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
let deviceString = currentDevice?.hwModelSlug.replacingOccurrences(of: "_", with: "")
|
||||
|
|
@ -57,12 +57,12 @@ struct Firmware: View {
|
|||
.font(.title3)
|
||||
.padding(.bottom)
|
||||
} else {
|
||||
Text("Your Firmware is out of date")
|
||||
Text("Newer firmware is available")
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.foregroundStyle(.red)
|
||||
.font(.title2)
|
||||
.padding(.bottom)
|
||||
Text("Current Firmware Version: \(bleManager.connectedVersion), Minimium Firmware Version: \(minimumVersion)")
|
||||
Text("Current Firmware Version: \(bleManager.connectedVersion), Latest Firmware Version: \(minimumVersion)")
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.font(.title3)
|
||||
.padding(.bottom)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ struct UserConfig: View {
|
|||
.onChange(of: longName, perform: { _ in
|
||||
let totalBytes = longName.utf8.count
|
||||
// Only mess with the value if it is too big
|
||||
if totalBytes > (isLicensed ? 6 : 36) {
|
||||
if totalBytes > (isLicensed ? 8 : 36) {
|
||||
longName = String(longName.dropLast())
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e21899aa6b2b49863cfa2758e5e3b6faacf04bba
|
||||
Subproject commit dd7d64cc038a6365c119ec7508762cc45f405948
|
||||