From eb27e7d999fabb71fe47d19ade3df1cb86eaeb04 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Wed, 1 May 2024 19:58:57 -0700 Subject: [PATCH] Update channel proto --- .../xcshareddata/swiftpm/Package.resolved | 51 +++++++++++++++++++ .../Protobufs/meshtastic/channel.pb.swift | 11 ++++ protobufs | 2 +- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..a62998be --- /dev/null +++ b/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,51 @@ +{ + "originHash" : "e9855e3a299c14a10f11ee0b8f29e4170b09548533939361223a0f50e7caac8c", + "pins" : [ + { + "identity" : "cocoamqtt", + "kind" : "remoteSourceControl", + "location" : "https://github.com/emqx/CocoaMQTT", + "state" : { + "revision" : "85387a2478551ad84f39be8a3c8587d34dd2bcf5", + "version" : "2.1.5" + } + }, + { + "identity" : "mqttcocoaasyncsocket", + "kind" : "remoteSourceControl", + "location" : "https://github.com/leeway1208/MqttCocoaAsyncSocket", + "state" : { + "revision" : "ce3e18607fd01079495f86ff6195d8a3ca469f73", + "version" : "1.0.8" + } + }, + { + "identity" : "sqlite.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/stephencelis/SQLite.swift.git", + "state" : { + "revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb", + "version" : "0.14.1" + } + }, + { + "identity" : "starscream", + "kind" : "remoteSourceControl", + "location" : "https://github.com/daltoniam/Starscream.git", + "state" : { + "revision" : "a063fda2b8145a231953c20e7a646be254365396", + "version" : "3.1.2" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "ce20dc083ee485524b802669890291c0d8090170", + "version" : "1.22.1" + } + } + ], + "version" : 3 +} diff --git a/Meshtastic/Protobufs/meshtastic/channel.pb.swift b/Meshtastic/Protobufs/meshtastic/channel.pb.swift index b2c55540..f2f4da72 100644 --- a/Meshtastic/Protobufs/meshtastic/channel.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/channel.pb.swift @@ -120,6 +120,11 @@ struct ModuleSettings { /// Bits of precision for the location sent in position packets. var positionPrecision: UInt32 = 0 + /// + /// Controls whether or not the phone / clients should mute the current channel + /// Useful for noisy public channels you don't necessarily want to disable + var isClientMuted: Bool = false + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -311,6 +316,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement static let protoMessageName: String = _protobuf_package + ".ModuleSettings" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .standard(proto: "position_precision"), + 2: .standard(proto: "is_client_muted"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -320,6 +326,7 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { try decoder.decodeSingularUInt32Field(value: &self.positionPrecision) }() + case 2: try { try decoder.decodeSingularBoolField(value: &self.isClientMuted) }() default: break } } @@ -329,11 +336,15 @@ extension ModuleSettings: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if self.positionPrecision != 0 { try visitor.visitSingularUInt32Field(value: self.positionPrecision, fieldNumber: 1) } + if self.isClientMuted != false { + try visitor.visitSingularBoolField(value: self.isClientMuted, fieldNumber: 2) + } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: ModuleSettings, rhs: ModuleSettings) -> Bool { if lhs.positionPrecision != rhs.positionPrecision {return false} + if lhs.isClientMuted != rhs.isClientMuted {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/protobufs b/protobufs index 86640f20..e21899aa 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 86640f20db7b9b5be42949d18e8d96ad10d47a68 +Subproject commit e21899aa6b2b49863cfa2758e5e3b6faacf04bba