Skip to content

Commit

Permalink
Merge pull request #1028 from meshtastic/2.5.13
Browse files Browse the repository at this point in the history
2.5.13
  • Loading branch information
garthvh authored Dec 20, 2024
2 parents 7cbc9cf + 628e3d1 commit 561d576
Show file tree
Hide file tree
Showing 29 changed files with 7,945 additions and 2,172 deletions.
7,798 changes: 7,241 additions & 557 deletions Localizable.xcstrings

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions Meshtastic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,7 @@
"zh-Hant-TW",
se,
"pt-PT",
sr,
);
mainGroup = DDC2E14B26CE248E0042C5E4;
packageReferences = (
Expand Down Expand Up @@ -1709,7 +1710,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.5.12;
MARKETING_VERSION = 2.5.13;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand Down Expand Up @@ -1743,7 +1744,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.5.12;
MARKETING_VERSION = 2.5.13;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTS_MACCATALYST = YES;
Expand Down Expand Up @@ -1775,7 +1776,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.5.12;
MARKETING_VERSION = 2.5.13;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1808,7 +1809,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.5.12;
MARKETING_VERSION = 2.5.13;
PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient.Widgets;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
14 changes: 7 additions & 7 deletions Meshtastic/Extensions/CoreData/UserEntityExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ extension UserEntity {
return "TLORAV2118"
/// Seeed Studio
case "SENSECAPINDICATOR":
return "UNSET"
return "SENSECAPINDICATOR"
case "TRACKERT1000E":
return "UNSET"
return "TRACKERT1000E"
case "SEEEDXIAOS3":
return "UNSET"
return "SEEEDXIAOS3"
case "WIOWM1110":
return "UNSET"
return "WIOWM1110"
/// RAK Wireless
case "RAK4631":
return "UNSET"
return "RAK4631"
case "RAK11310":
return "UNSET"
return "RAK11310"
case "WISMESHTAP":
return "UNSET"
return "WISMESHTAP"
/// B&Q Consulting
case "NANOG1", "NANOG1EXPLORER":
return "NANOG1"
Expand Down
14 changes: 8 additions & 6 deletions Meshtastic/Helpers/BLEManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -663,15 +663,15 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
}

switch decodedInfo.packet.decoded.portnum {

// Handle Any local only packets we get over BLE
case .unknownApp:
var nowKnown = false

// MyInfo from initial connection
if decodedInfo.myInfo.isInitialized && decodedInfo.myInfo.myNodeNum > 0 {
let myInfo = myInfoPacket(myInfo: decodedInfo.myInfo, peripheralId: self.connectedPeripheral.id, context: context)

if myInfo != nil {
UserDefaults.preferredPeripheralNum = Int(myInfo?.myNodeNum ?? 0)
connectedPeripheral.num = myInfo?.myNodeNum ?? 0
Expand Down Expand Up @@ -890,7 +890,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
}
}
hopNodes.append(traceRouteHop)

let hopName = hopNode?.user?.longName ?? (node == 4294967295 ? "Repeater" : String(hopNode?.num.toHex() ?? "unknown".localized))
let mqttLabel = hopNode?.viaMqtt ?? false ? "MQTT " : ""
let snrLabel = (traceRouteHop.snr != -32) ? String(traceRouteHop.snr) : "unknown ".localized
Expand All @@ -912,7 +912,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
/// Add the destination node to the end of the route towards string and the beginning of the route back string
routeString += "\(traceRoute?.node?.user?.longName ?? "unknown".localized) \((traceRoute?.node?.num ?? 0).toHex()) (\(destinationHop.snr != -32 ? String(destinationHop.snr) : "unknown ".localized)dB)"
traceRoute?.routeText = routeString

traceRoute?.hopsBack = Int32(routingMessage.routeBack.count)
// Only if hopStart is set and there is an SNR entry
if decodedInfo.packet.hopStart > 0 && routingMessage.snrBack.count > 0 {
Expand Down Expand Up @@ -946,7 +946,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
}
}
hopNodes.append(traceRouteHop)

let hopName = hopNode?.user?.longName ?? (node == 4294967295 ? "Repeater" : String(hopNode?.num.toHex() ?? "unknown".localized))
let mqttLabel = hopNode?.viaMqtt ?? false ? "MQTT " : ""
let snrLabel = (traceRouteHop.snr != -32) ? String(traceRouteHop.snr) : "unknown ".localized
Expand Down Expand Up @@ -988,6 +988,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
MeshLogger.log("🕸️ MESH PACKET received for ATAK Plugin App UNHANDLED \((try? decodedInfo.packet.jsonString()) ?? "JSON Decode Failure")")
case .powerstressApp:
MeshLogger.log("🕸️ MESH PACKET received for Power Stress App UNHANDLED \((try? decodedInfo.packet.jsonString()) ?? "JSON Decode Failure")")
case .alertApp:
MeshLogger.log("🕸️ MESH PACKET received for Alert App UNHANDLED \((try? decodedInfo.packet.jsonString()) ?? "JSON Decode Failure")")
}

if decodedInfo.configCompleteID != 0 && decodedInfo.configCompleteID == configNonce {
Expand Down
2 changes: 1 addition & 1 deletion Meshtastic/Helpers/MeshPackets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ func textMessageAppPacket(
}
} else {
/// Make a new from user if they are unknown
newMessage.fromUser = createUser(num: Int64(truncatingIfNeeded: packet.to), context: context)
newMessage.fromUser = createUser(num: Int64(truncatingIfNeeded: packet.from), context: context)
}
if packet.rxTime > 0 {
newMessage.fromUser?.userNode?.lastHeard = Date(timeIntervalSince1970: TimeInterval(Int64(packet.rxTime)))
Expand Down
17 changes: 9 additions & 8 deletions Meshtastic/Views/Nodes/TraceRouteLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,21 @@ struct TraceRouteLog: View {
VStack {
List(node.traceRoutes?.reversed() as? [TraceRouteEntity] ?? [], id: \.self, selection: $selectedRoute) { route in
Label {
if route.response && route.hopsTowards == 0 {
Text("\(route.time?.formatted() ?? "unknown".localized) - Direct")
.font(.caption)
} else if route.response && route.hopsTowards == 1 {
Text("\(route.time?.formatted() ?? "unknown".localized) - 1 Hop")
let routeTime = route.time?.formatted() ?? "unknown".localized
if route.response && route.hopsTowards == route.hopsBack {
let hopString = String(localized: "\(route.hopsTowards) Hops")
Text("\(routeTime) - \(hopString)")
.font(.caption)
} else if route.response {
Text("\(route.time?.formatted() ?? "unknown".localized) - \(route.hopsTowards) Hops Towards \(route.hopsBack) Hops Back")
let hopTowardsString = String(localized: "\(route.hopsTowards) Hops")
let hopBackString = String(localized: "\(route.hopsBack) Hops")
Text("\(routeTime) - \(hopTowardsString) Towards \(hopBackString) Back")
.font(.caption)
} else if route.sent {
Text("\(route.time?.formatted() ?? "unknown".localized) - No Response")
Text("\(routeTime) - No Response")
.font(.caption)
} else {
Text("\(route.time?.formatted() ?? "unknown".localized) - Not Sent")
Text("\(routeTime) - Not Sent")
.font(.caption)
}
} icon: {
Expand Down
Loading

0 comments on commit 561d576

Please sign in to comment.