mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #1087 from Oliver0804/main
Updated Traditional Chinese resources to the latest version
This commit is contained in:
commit
0cc5ab968b
7 changed files with 4714 additions and 88 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -145,6 +145,5 @@ import OSLog
|
|||
}
|
||||
return sats
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -682,7 +682,6 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
|
|||
let logString = String.localizedStringWithFormat("mesh.log.telemetry.received %@".localized, String(packet.from))
|
||||
MeshLogger.log("📈 \(logString)")
|
||||
|
||||
|
||||
if telemetryMessage.variant != Telemetry.OneOf_Variant.deviceMetrics(telemetryMessage.deviceMetrics) && telemetryMessage.variant != Telemetry.OneOf_Variant.environmentMetrics(telemetryMessage.environmentMetrics) && telemetryMessage.variant != Telemetry.OneOf_Variant.localStats(telemetryMessage.localStats) && telemetryMessage.variant != Telemetry.OneOf_Variant.powerMetrics(telemetryMessage.powerMetrics) {
|
||||
/// Other unhandled telemetry packets
|
||||
return
|
||||
|
|
@ -739,7 +738,7 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
|
|||
Logger.statistics.info("📈 [Mesh Statistics] Channel Utilization: \(telemetryMessage.localStats.channelUtilization, privacy: .public) Airtime: \(telemetryMessage.localStats.airUtilTx, privacy: .public) Packets Sent: \(telemetryMessage.localStats.numPacketsTx, privacy: .public) Packets Received: \(telemetryMessage.localStats.numPacketsRx, privacy: .public) Bad Packets Received: \(telemetryMessage.localStats.numPacketsRxBad, privacy: .public) Nodes Online: \(telemetryMessage.localStats.numOnlineNodes, privacy: .public) of \(telemetryMessage.localStats.numTotalNodes, privacy: .public) nodes for Node: \(packet.from.toHex(), privacy: .public)")
|
||||
} else if telemetryMessage.variant == Telemetry.OneOf_Variant.powerMetrics(telemetryMessage.powerMetrics) {
|
||||
Logger.data.info("📈 [Power Metrics] Received for Node: \(packet.from.toHex(), privacy: .public)")
|
||||
|
||||
|
||||
if telemetryMessage.powerMetrics.hasCh1Voltage {
|
||||
telemetry.powerCh1Voltage = telemetryMessage.powerMetrics.ch1Voltage
|
||||
telemetry.metricsType = 2
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class MqttClientProxyManager {
|
|||
defaultServerPort = Int(fullHost.components(separatedBy: ":")[1]) ?? (useSsl ? 8883 : 1883)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if let host = host {
|
||||
let port = defaultServerPort
|
||||
var username = node.mqttConfig?.username
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@ struct PowerMetrics: View {
|
|||
|
||||
LazyVGrid(columns: gridItemLayout) {
|
||||
|
||||
|
||||
if(metric.powerCh1Voltage != nil) {
|
||||
if metric.powerCh1Voltage != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .voltage,
|
||||
value: metric.powerCh1Voltage,
|
||||
|
|
@ -26,7 +25,7 @@ struct PowerMetrics: View {
|
|||
)
|
||||
}
|
||||
|
||||
if(metric.powerCh1Current != nil) {
|
||||
if metric.powerCh1Current != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .current,
|
||||
value: metric.powerCh1Current,
|
||||
|
|
@ -34,7 +33,7 @@ struct PowerMetrics: View {
|
|||
)
|
||||
}
|
||||
|
||||
if(metric.powerCh2Voltage != nil) {
|
||||
if metric.powerCh2Voltage != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .voltage,
|
||||
value: metric.powerCh2Voltage,
|
||||
|
|
@ -42,7 +41,7 @@ struct PowerMetrics: View {
|
|||
)
|
||||
}
|
||||
|
||||
if(metric.powerCh2Current != nil) {
|
||||
if metric.powerCh2Current != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .current,
|
||||
value: metric.powerCh2Current,
|
||||
|
|
@ -50,7 +49,7 @@ struct PowerMetrics: View {
|
|||
)
|
||||
}
|
||||
|
||||
if(metric.powerCh3Voltage != nil) {
|
||||
if metric.powerCh3Voltage != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .voltage,
|
||||
value: metric.powerCh3Voltage,
|
||||
|
|
@ -58,7 +57,7 @@ struct PowerMetrics: View {
|
|||
)
|
||||
}
|
||||
|
||||
if(metric.powerCh3Current != nil) {
|
||||
if metric.powerCh3Current != nil {
|
||||
PowerMetricCompactWidget(
|
||||
type: .current,
|
||||
value: metric.powerCh3Current,
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ struct NodeDetail: View {
|
|||
}
|
||||
.disabled(!node.hasDeviceMetrics)
|
||||
|
||||
NavigationLink{
|
||||
NavigationLink {
|
||||
PowerMetricsLog(node: node)
|
||||
} label: {
|
||||
Label {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ struct NodeList: View {
|
|||
)
|
||||
/// Don't show message, trace route, position exchange or delete context menu items for the connected node
|
||||
if connectedNode.num != node.num {
|
||||
if (!node.viaMqtt || node.viaMqtt && node.hopsAway == 0) {
|
||||
if !node.viaMqtt || node.viaMqtt && node.hopsAway == 0 {
|
||||
Button(action: {
|
||||
if let url = URL(string: "meshtastic:///messages?userNum=\(node.num)") {
|
||||
UIApplication.shared.open(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue