From 187acc7466ddfb6bb0d9a6ada6fad0b7af482b6d Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sat, 1 Jun 2024 23:02:06 -0700 Subject: [PATCH] Update protobufs, tag for map circle --- Meshtastic/Protobufs/meshtastic/atak.pb.swift | 18 ++++++++++++++++++ .../Protobufs/meshtastic/telemetry.pb.swift | 8 ++++++++ .../Map/MapContent/MeshMapContent.swift | 1 + protobufs | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Protobufs/meshtastic/atak.pb.swift b/Meshtastic/Protobufs/meshtastic/atak.pb.swift index 77c35e7c..49229221 100644 --- a/Meshtastic/Protobufs/meshtastic/atak.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/atak.pb.swift @@ -383,11 +383,23 @@ struct GeoChat { /// Clears the value of `to`. Subsequent reads from it will return its default value. mutating func clearTo() {self._to = nil} + /// + /// Callsign of the recipient for the message + var toCallsign: String { + get {return _toCallsign ?? String()} + set {_toCallsign = newValue} + } + /// Returns true if `toCallsign` has been explicitly set. + var hasToCallsign: Bool {return self._toCallsign != nil} + /// Clears the value of `toCallsign`. Subsequent reads from it will return its default value. + mutating func clearToCallsign() {self._toCallsign = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} fileprivate var _to: String? = nil + fileprivate var _toCallsign: String? = nil } /// @@ -633,6 +645,7 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "message"), 2: .same(proto: "to"), + 3: .standard(proto: "to_callsign"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -643,6 +656,7 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa switch fieldNumber { case 1: try { try decoder.decodeSingularStringField(value: &self.message) }() case 2: try { try decoder.decodeSingularStringField(value: &self._to) }() + case 3: try { try decoder.decodeSingularStringField(value: &self._toCallsign) }() default: break } } @@ -659,12 +673,16 @@ extension GeoChat: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBa try { if let v = self._to { try visitor.visitSingularStringField(value: v, fieldNumber: 2) } }() + try { if let v = self._toCallsign { + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + } }() try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: GeoChat, rhs: GeoChat) -> Bool { if lhs.message != rhs.message {return false} if lhs._to != rhs._to {return false} + if lhs._toCallsign != rhs._toCallsign {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift b/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift index c778bf49..7ddb75dc 100644 --- a/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift @@ -116,6 +116,10 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { /// /// AMS TSL25911FN RGB Light Sensor case tsl25911Fn // = 22 + + /// + /// AHT10 Integrated temperature and humidity sensor + case aht10 // = 23 case UNRECOGNIZED(Int) init() { @@ -147,6 +151,7 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { case 20: self = .opt3001 case 21: self = .ltr390Uv case 22: self = .tsl25911Fn + case 23: self = .aht10 default: self = .UNRECOGNIZED(rawValue) } } @@ -176,6 +181,7 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { case .opt3001: return 20 case .ltr390Uv: return 21 case .tsl25911Fn: return 22 + case .aht10: return 23 case .UNRECOGNIZED(let i): return i } } @@ -210,6 +216,7 @@ extension TelemetrySensorType: CaseIterable { .opt3001, .ltr390Uv, .tsl25911Fn, + .aht10, ] } @@ -535,6 +542,7 @@ extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding { 20: .same(proto: "OPT3001"), 21: .same(proto: "LTR390UV"), 22: .same(proto: "TSL25911FN"), + 23: .same(proto: "AHT10"), ] } diff --git a/Meshtastic/Views/Nodes/Helpers/Map/MapContent/MeshMapContent.swift b/Meshtastic/Views/Nodes/Helpers/Map/MapContent/MeshMapContent.swift index 7c7d3356..d991aff2 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/MapContent/MeshMapContent.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/MapContent/MeshMapContent.swift @@ -137,6 +137,7 @@ struct MeshMapContent: MapContent { MapCircle(center: position.coordinate, radius: radius) .foregroundStyle(Color(nodeColor).opacity(0.25)) .stroke(.white, lineWidth: 2) + .tag(position.nodePosition?.num ?? 0) } } } diff --git a/protobufs b/protobufs index dd7d64cc..a45a6154 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit dd7d64cc038a6365c119ec7508762cc45f405948 +Subproject commit a45a6154d0721027bf63f85cfc5abd9f6fab2422