From 67f532f17023658302c1f5f9036b386efdfefde6 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 21 Mar 2023 20:21:48 -0700 Subject: [PATCH] Fix rebroadcast type enum --- Meshtastic/Enums/DeviceEnums.swift | 2 +- Meshtastic/Protobufs/meshtastic/config.pb.swift | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Enums/DeviceEnums.swift b/Meshtastic/Enums/DeviceEnums.swift index a53a9893..186502ab 100644 --- a/Meshtastic/Enums/DeviceEnums.swift +++ b/Meshtastic/Enums/DeviceEnums.swift @@ -101,7 +101,7 @@ enum RebroadcastModes: Int, CaseIterable, Identifiable { case .allSkipDecoding: return "Same as behavior as ALL but skips packet decoding and simply rebroadcasts them. Only available in Repeater role. Setting this on any other roles will result in ALL behavior." case .localOnly: - return "Inverted top bar for 2 Color display" + return "Ignores observed messages from foreign meshes that are open or those which it cannot decrypt. Only rebroadcasts message on the nodes local primary / secondary channels." } } func protoEnumValue() -> Config.DeviceConfig.RebroadcastMode { diff --git a/Meshtastic/Protobufs/meshtastic/config.pb.swift b/Meshtastic/Protobufs/meshtastic/config.pb.swift index 04f17cdb..7be86a36 100644 --- a/Meshtastic/Protobufs/meshtastic/config.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/config.pb.swift @@ -681,6 +681,10 @@ struct Config { /// Print first line in pseudo-bold? FALSE is original style, TRUE is bold var headingBold: Bool = false + /// + /// Should we wake the screen up on accelerometer detected motion or tap + var wakeOnTapOrMotion: Bool = false + var unknownFields = SwiftProtobuf.UnknownStorage() /// @@ -1970,6 +1974,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp 7: .same(proto: "oled"), 8: .same(proto: "displaymode"), 9: .standard(proto: "heading_bold"), + 10: .standard(proto: "wake_on_tap_or_motion"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1987,6 +1992,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp case 7: try { try decoder.decodeSingularEnumField(value: &self.oled) }() case 8: try { try decoder.decodeSingularEnumField(value: &self.displaymode) }() case 9: try { try decoder.decodeSingularBoolField(value: &self.headingBold) }() + case 10: try { try decoder.decodeSingularBoolField(value: &self.wakeOnTapOrMotion) }() default: break } } @@ -2020,6 +2026,9 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if self.headingBold != false { try visitor.visitSingularBoolField(value: self.headingBold, fieldNumber: 9) } + if self.wakeOnTapOrMotion != false { + try visitor.visitSingularBoolField(value: self.wakeOnTapOrMotion, fieldNumber: 10) + } try unknownFields.traverse(visitor: &visitor) } @@ -2033,6 +2042,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if lhs.oled != rhs.oled {return false} if lhs.displaymode != rhs.displaymode {return false} if lhs.headingBold != rhs.headingBold {return false} + if lhs.wakeOnTapOrMotion != rhs.wakeOnTapOrMotion {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true }