diff --git a/Meshtastic/Enums/DeviceEnums.swift b/Meshtastic/Enums/DeviceEnums.swift index a859fc20..8bfd33ed 100644 --- a/Meshtastic/Enums/DeviceEnums.swift +++ b/Meshtastic/Enums/DeviceEnums.swift @@ -19,9 +19,9 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { case sensor = 6 case tak = 7 case takTracker = 10 - case repeater = 4 case router = 2 case routerLate = 11 + case clientBase = 12 var id: Int { self.rawValue } var name: String { @@ -32,8 +32,6 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return "Client Mute".localized case .router: return "Router".localized - case .repeater: - return "Repeater".localized case .tracker: return "Tracker".localized case .sensor: @@ -48,6 +46,8 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return "Lost and Found".localized case .routerLate: return "Router Late".localized + case .clientBase: + return "Client Base".localized } } @@ -59,8 +59,6 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return "Device that does not forward packets from other devices.".localized case .router: return "Infrastructure node on a tower or mountain top only. Not to be used for roofs or mobile nodes. Needs exceptional coverage. Visible in Nodes list.".localized - case .repeater: - return "Infrastructure node on a tower or mountain top only. Not to be used for roofs or mobile nodes. Relays messages with minimal overhead. Not visible in Nodes list.".localized case .tracker: return "Broadcasts GPS position packets as priority.".localized case .sensor: @@ -74,7 +72,9 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { case .lostAndFound: return "Broadcasts location as message to default channel regularly for to assist with device recovery.".localized case .routerLate: - return "Infrastructure node that always rebroadcasts packets once but only after all other modes, ensuring additional coverage for local clusters. Visible in Nodes list.".localized + return "Infrastructure node that always rebroadcasts packets once but only after all other modes. Visible in Nodes list. Not a good cheoice for rooftop nodes.".localized + case .clientBase: + return "Used for rooftop nodes to distribute messages more widely from multiple nearby client mute nodes.".localized } } @@ -86,8 +86,6 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return "speaker.slash" case .router, .routerLate: return "wifi.router" - case .repeater: - return "repeat" case .tracker: return "mappin.and.ellipse.circle" case .sensor: @@ -100,6 +98,8 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return "eye.slash" case .lostAndFound: return "map" + case .clientBase: + return "house" } } func protoEnumValue() -> Config.DeviceConfig.Role { @@ -111,8 +111,6 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return Config.DeviceConfig.Role.clientMute case .router: return Config.DeviceConfig.Role.router - case .repeater: - return Config.DeviceConfig.Role.repeater case .tracker: return Config.DeviceConfig.Role.tracker case .sensor: @@ -127,6 +125,8 @@ enum DeviceRoles: Int, CaseIterable, Identifiable { return Config.DeviceConfig.Role.lostAndFound case .routerLate: return Config.DeviceConfig.Role.routerLate + case .clientBase: + return Config.DeviceConfig.Role.clientBase } } } diff --git a/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift index 90c78531..b4a5ac85 100644 --- a/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/config.pb.swift @@ -319,6 +319,13 @@ public struct Config { /// but should not be given priority over other routers in order to avoid unnecessaraily /// consuming hops. case routerLate // = 11 + + /// + /// Description: Treats packets from or to favorited nodes as ROUTER, and all other packets as CLIENT. + /// Technical Details: Used for stronger attic/roof nodes to distribute messages more widely + /// from weaker, indoor, or less-well-positioned nodes. Recommended for users with multiple nodes + /// where one CLIENT_BASE acts as a more powerful base station, such as an attic/roof node. + case clientBase // = 12 case UNRECOGNIZED(Int) public init() { @@ -339,6 +346,7 @@ public struct Config { case 9: self = .lostAndFound case 10: self = .takTracker case 11: self = .routerLate + case 12: self = .clientBase default: self = .UNRECOGNIZED(rawValue) } } @@ -357,6 +365,7 @@ public struct Config { case .lostAndFound: return 9 case .takTracker: return 10 case .routerLate: return 11 + case .clientBase: return 12 case .UNRECOGNIZED(let i): return i } } @@ -935,7 +944,7 @@ public struct Config { /// /// Deprecated in 2.7.4: Unused /// How the GPS coordinates are formatted on the OLED screen. - public var gpsFormat: Config.DisplayConfig.GpsCoordinateFormat = .dec + public var gpsFormat: Config.DisplayConfig.DeprecatedGpsCoordinateFormat = .unused /// /// Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. @@ -980,69 +989,34 @@ public struct Config { /// If true, the device will display the time in 12-hour format on screen. public var use12HClock: Bool = false + /// + /// If false (default), the device will use short names for various display screens. + /// If true, node names will show in long format + public var useLongNodeName: Bool = false + public var unknownFields = SwiftProtobuf.UnknownStorage() /// - /// How the GPS coordinates are displayed on the OLED screen. - public enum GpsCoordinateFormat: SwiftProtobuf.Enum { + /// Deprecated in 2.7.4: Unused + public enum DeprecatedGpsCoordinateFormat: SwiftProtobuf.Enum { public typealias RawValue = Int - - /// - /// GPS coordinates are displayed in the normal decimal degrees format: - /// DD.DDDDDD DDD.DDDDDD - case dec // = 0 - - /// - /// GPS coordinates are displayed in the degrees minutes seconds format: - /// DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant - case dms // = 1 - - /// - /// Universal Transverse Mercator format: - /// ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing - case utm // = 2 - - /// - /// Military Grid Reference System format: - /// ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, - /// E is easting, N is northing - case mgrs // = 3 - - /// - /// Open Location Code (aka Plus Codes). - case olc // = 4 - - /// - /// Ordnance Survey Grid Reference (the National Grid System of the UK). - /// Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, - /// E is the easting, N is the northing - case osgr // = 5 + case unused // = 0 case UNRECOGNIZED(Int) public init() { - self = .dec + self = .unused } public init?(rawValue: Int) { switch rawValue { - case 0: self = .dec - case 1: self = .dms - case 2: self = .utm - case 3: self = .mgrs - case 4: self = .olc - case 5: self = .osgr + case 0: self = .unused default: self = .UNRECOGNIZED(rawValue) } } public var rawValue: Int { switch self { - case .dec: return 0 - case .dms: return 1 - case .utm: return 2 - case .mgrs: return 3 - case .olc: return 4 - case .osgr: return 5 + case .unused: return 0 case .UNRECOGNIZED(let i): return i } } @@ -1103,12 +1077,12 @@ public struct Config { case oledSh1106 // = 2 /// - /// Can not be auto detected but set by proto. Used for 128x128 screens + /// Can not be auto detected but set by proto. Used for 128x64 screens case oledSh1107 // = 3 /// - /// Can not be auto detected but set by proto. Used for 128x64 screens - case oledSh110712864 // = 4 + /// Can not be auto detected but set by proto. Used for 128x128 screens + case oledSh1107128128 // = 4 case UNRECOGNIZED(Int) public init() { @@ -1121,7 +1095,7 @@ public struct Config { case 1: self = .oledSsd1306 case 2: self = .oledSh1106 case 3: self = .oledSh1107 - case 4: self = .oledSh110712864 + case 4: self = .oledSh1107128128 default: self = .UNRECOGNIZED(rawValue) } } @@ -1132,7 +1106,7 @@ public struct Config { case .oledSsd1306: return 1 case .oledSh1106: return 2 case .oledSh1107: return 3 - case .oledSh110712864: return 4 + case .oledSh1107128128: return 4 case .UNRECOGNIZED(let i): return i } } @@ -1831,6 +1805,7 @@ extension Config.DeviceConfig.Role: CaseIterable { .lostAndFound, .takTracker, .routerLate, + .clientBase, ] } @@ -1899,15 +1874,10 @@ extension Config.NetworkConfig.ProtocolFlags: CaseIterable { ] } -extension Config.DisplayConfig.GpsCoordinateFormat: CaseIterable { +extension Config.DisplayConfig.DeprecatedGpsCoordinateFormat: CaseIterable { // The compiler won't synthesize support with the UNRECOGNIZED case. - public static let allCases: [Config.DisplayConfig.GpsCoordinateFormat] = [ - .dec, - .dms, - .utm, - .mgrs, - .olc, - .osgr, + public static let allCases: [Config.DisplayConfig.DeprecatedGpsCoordinateFormat] = [ + .unused, ] } @@ -1926,7 +1896,7 @@ extension Config.DisplayConfig.OledType: CaseIterable { .oledSsd1306, .oledSh1106, .oledSh1107, - .oledSh110712864, + .oledSh1107128128, ] } @@ -2029,7 +1999,7 @@ extension Config.NetworkConfig.AddressMode: @unchecked Sendable {} extension Config.NetworkConfig.ProtocolFlags: @unchecked Sendable {} extension Config.NetworkConfig.IpV4Config: @unchecked Sendable {} extension Config.DisplayConfig: @unchecked Sendable {} -extension Config.DisplayConfig.GpsCoordinateFormat: @unchecked Sendable {} +extension Config.DisplayConfig.DeprecatedGpsCoordinateFormat: @unchecked Sendable {} extension Config.DisplayConfig.DisplayUnits: @unchecked Sendable {} extension Config.DisplayConfig.OledType: @unchecked Sendable {} extension Config.DisplayConfig.DisplayMode: @unchecked Sendable {} @@ -2373,6 +2343,7 @@ extension Config.DeviceConfig.Role: SwiftProtobuf._ProtoNameProviding { 9: .same(proto: "LOST_AND_FOUND"), 10: .same(proto: "TAK_TRACKER"), 11: .same(proto: "ROUTER_LATE"), + 12: .same(proto: "CLIENT_BASE"), ] } @@ -2774,6 +2745,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp 10: .standard(proto: "wake_on_tap_or_motion"), 11: .standard(proto: "compass_orientation"), 12: .standard(proto: "use_12h_clock"), + 13: .standard(proto: "use_long_node_name"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -2794,6 +2766,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp case 10: try { try decoder.decodeSingularBoolField(value: &self.wakeOnTapOrMotion) }() case 11: try { try decoder.decodeSingularEnumField(value: &self.compassOrientation) }() case 12: try { try decoder.decodeSingularBoolField(value: &self.use12HClock) }() + case 13: try { try decoder.decodeSingularBoolField(value: &self.useLongNodeName) }() default: break } } @@ -2803,7 +2776,7 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if self.screenOnSecs != 0 { try visitor.visitSingularUInt32Field(value: self.screenOnSecs, fieldNumber: 1) } - if self.gpsFormat != .dec { + if self.gpsFormat != .unused { try visitor.visitSingularEnumField(value: self.gpsFormat, fieldNumber: 2) } if self.autoScreenCarouselSecs != 0 { @@ -2836,6 +2809,9 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if self.use12HClock != false { try visitor.visitSingularBoolField(value: self.use12HClock, fieldNumber: 12) } + if self.useLongNodeName != false { + try visitor.visitSingularBoolField(value: self.useLongNodeName, fieldNumber: 13) + } try unknownFields.traverse(visitor: &visitor) } @@ -2852,19 +2828,15 @@ extension Config.DisplayConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if lhs.wakeOnTapOrMotion != rhs.wakeOnTapOrMotion {return false} if lhs.compassOrientation != rhs.compassOrientation {return false} if lhs.use12HClock != rhs.use12HClock {return false} + if lhs.useLongNodeName != rhs.useLongNodeName {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } } -extension Config.DisplayConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding { +extension Config.DisplayConfig.DeprecatedGpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding { public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 0: .same(proto: "DEC"), - 1: .same(proto: "DMS"), - 2: .same(proto: "UTM"), - 3: .same(proto: "MGRS"), - 4: .same(proto: "OLC"), - 5: .same(proto: "OSGR"), + 0: .same(proto: "UNUSED"), ] } @@ -2881,7 +2853,7 @@ extension Config.DisplayConfig.OledType: SwiftProtobuf._ProtoNameProviding { 1: .same(proto: "OLED_SSD1306"), 2: .same(proto: "OLED_SH1106"), 3: .same(proto: "OLED_SH1107"), - 4: .same(proto: "OLED_SH1107_128_64"), + 4: .same(proto: "OLED_SH1107_128_128"), ] } diff --git a/MeshtasticProtobufs/Sources/meshtastic/device_ui.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/device_ui.pb.swift index 49aa3700..f565a9cd 100644 --- a/MeshtasticProtobufs/Sources/meshtastic/device_ui.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/device_ui.pb.swift @@ -203,6 +203,10 @@ public enum Language: SwiftProtobuf.Enum { /// Bulgarian case bulgarian // = 17 + /// + /// Czech + case czech // = 18 + /// /// Simplified Chinese (experimental) case simplifiedChinese // = 30 @@ -236,6 +240,7 @@ public enum Language: SwiftProtobuf.Enum { case 15: self = .slovenian case 16: self = .ukrainian case 17: self = .bulgarian + case 18: self = .czech case 30: self = .simplifiedChinese case 31: self = .traditionalChinese default: self = .UNRECOGNIZED(rawValue) @@ -262,6 +267,7 @@ public enum Language: SwiftProtobuf.Enum { case .slovenian: return 15 case .ukrainian: return 16 case .bulgarian: return 17 + case .czech: return 18 case .simplifiedChinese: return 30 case .traditionalChinese: return 31 case .UNRECOGNIZED(let i): return i @@ -293,6 +299,7 @@ extension Language: CaseIterable { .slovenian, .ukrainian, .bulgarian, + .czech, .simplifiedChinese, .traditionalChinese, ] @@ -437,13 +444,111 @@ public struct DeviceUIConfig { set {_uniqueStorage()._isClockfaceAnalog = newValue} } + /// + /// How the GPS coordinates are formatted on the OLED screen. + public var gpsFormat: DeviceUIConfig.GpsCoordinateFormat { + get {return _storage._gpsFormat} + set {_uniqueStorage()._gpsFormat = newValue} + } + public var unknownFields = SwiftProtobuf.UnknownStorage() + /// + /// How the GPS coordinates are displayed on the OLED screen. + public enum GpsCoordinateFormat: SwiftProtobuf.Enum { + public typealias RawValue = Int + + /// + /// GPS coordinates are displayed in the normal decimal degrees format: + /// DD.DDDDDD DDD.DDDDDD + case dec // = 0 + + /// + /// GPS coordinates are displayed in the degrees minutes seconds format: + /// DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant + case dms // = 1 + + /// + /// Universal Transverse Mercator format: + /// ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing + case utm // = 2 + + /// + /// Military Grid Reference System format: + /// ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, + /// E is easting, N is northing + case mgrs // = 3 + + /// + /// Open Location Code (aka Plus Codes). + case olc // = 4 + + /// + /// Ordnance Survey Grid Reference (the National Grid System of the UK). + /// Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, + /// E is the easting, N is the northing + case osgr // = 5 + + /// + /// Maidenhead Locator System + /// Described here: https://en.wikipedia.org/wiki/Maidenhead_Locator_System + case mls // = 6 + case UNRECOGNIZED(Int) + + public init() { + self = .dec + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .dec + case 1: self = .dms + case 2: self = .utm + case 3: self = .mgrs + case 4: self = .olc + case 5: self = .osgr + case 6: self = .mls + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .dec: return 0 + case .dms: return 1 + case .utm: return 2 + case .mgrs: return 3 + case .olc: return 4 + case .osgr: return 5 + case .mls: return 6 + case .UNRECOGNIZED(let i): return i + } + } + + } + public init() {} fileprivate var _storage = _StorageClass.defaultInstance } +#if swift(>=4.2) + +extension DeviceUIConfig.GpsCoordinateFormat: CaseIterable { + // The compiler won't synthesize support with the UNRECOGNIZED case. + public static let allCases: [DeviceUIConfig.GpsCoordinateFormat] = [ + .dec, + .dms, + .utm, + .mgrs, + .olc, + .osgr, + .mls, + ] +} + +#endif // swift(>=4.2) + public struct NodeFilter { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -570,6 +675,7 @@ extension CompassMode: @unchecked Sendable {} extension Theme: @unchecked Sendable {} extension Language: @unchecked Sendable {} extension DeviceUIConfig: @unchecked Sendable {} +extension DeviceUIConfig.GpsCoordinateFormat: @unchecked Sendable {} extension NodeFilter: @unchecked Sendable {} extension NodeHighlight: @unchecked Sendable {} extension GeoPoint: @unchecked Sendable {} @@ -616,6 +722,7 @@ extension Language: SwiftProtobuf._ProtoNameProviding { 15: .same(proto: "SLOVENIAN"), 16: .same(proto: "UKRAINIAN"), 17: .same(proto: "BULGARIAN"), + 18: .same(proto: "CZECH"), 30: .same(proto: "SIMPLIFIED_CHINESE"), 31: .same(proto: "TRADITIONAL_CHINESE"), ] @@ -642,6 +749,7 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement 16: .standard(proto: "compass_mode"), 17: .standard(proto: "screen_rgb_color"), 18: .standard(proto: "is_clockface_analog"), + 19: .standard(proto: "gps_format"), ] fileprivate class _StorageClass { @@ -663,6 +771,7 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement var _compassMode: CompassMode = .dynamic var _screenRgbColor: UInt32 = 0 var _isClockfaceAnalog: Bool = false + var _gpsFormat: DeviceUIConfig.GpsCoordinateFormat = .dec #if swift(>=5.10) // This property is used as the initial default value for new instances of the type. @@ -695,6 +804,7 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement _compassMode = source._compassMode _screenRgbColor = source._screenRgbColor _isClockfaceAnalog = source._isClockfaceAnalog + _gpsFormat = source._gpsFormat } } @@ -731,6 +841,7 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement case 16: try { try decoder.decodeSingularEnumField(value: &_storage._compassMode) }() case 17: try { try decoder.decodeSingularUInt32Field(value: &_storage._screenRgbColor) }() case 18: try { try decoder.decodeSingularBoolField(value: &_storage._isClockfaceAnalog) }() + case 19: try { try decoder.decodeSingularEnumField(value: &_storage._gpsFormat) }() default: break } } @@ -797,6 +908,9 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if _storage._isClockfaceAnalog != false { try visitor.visitSingularBoolField(value: _storage._isClockfaceAnalog, fieldNumber: 18) } + if _storage._gpsFormat != .dec { + try visitor.visitSingularEnumField(value: _storage._gpsFormat, fieldNumber: 19) + } } try unknownFields.traverse(visitor: &visitor) } @@ -824,6 +938,7 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement if _storage._compassMode != rhs_storage._compassMode {return false} if _storage._screenRgbColor != rhs_storage._screenRgbColor {return false} if _storage._isClockfaceAnalog != rhs_storage._isClockfaceAnalog {return false} + if _storage._gpsFormat != rhs_storage._gpsFormat {return false} return true } if !storagesAreEqual {return false} @@ -833,6 +948,18 @@ extension DeviceUIConfig: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement } } +extension DeviceUIConfig.GpsCoordinateFormat: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "DEC"), + 1: .same(proto: "DMS"), + 2: .same(proto: "UTM"), + 3: .same(proto: "MGRS"), + 4: .same(proto: "OLC"), + 5: .same(proto: "OSGR"), + 6: .same(proto: "MLS"), + ] +} + extension NodeFilter: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { public static let protoMessageName: String = _protobuf_package + ".NodeFilter" public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ diff --git a/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift index 8db99cc7..0882e77a 100644 --- a/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/mesh.pb.swift @@ -466,8 +466,8 @@ public enum HardwareModel: SwiftProtobuf.Enum { case tLoraPager // = 103 /// - /// GAT562 Mesh Trial Tracker - case gat562MeshTrialTracker // = 104 + /// M5Stack Reserved + case m5StackReserved // = 104 /// /// RAKwireless WisMesh Tag @@ -486,6 +486,22 @@ public enum HardwareModel: SwiftProtobuf.Enum { /// https://heltec.org/project/meshsolar/ case heltecMeshSolar // = 108 + /// + /// Lilygo T-Echo Lite + case tEchoLite // = 109 + + /// + /// New Heltec LoRA32 with ESP32-S3 CPU + case heltecV4 // = 110 + + /// + /// M5Stack C6L + case m5StackC6L // = 111 + + /// + /// M5Stack Cardputer Adv + case m5StackCardputerAdv // = 112 + /// /// ------------------------------------------------------------------------------------------------------------------------------------------ /// Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. @@ -603,11 +619,15 @@ public enum HardwareModel: SwiftProtobuf.Enum { case 101: self = .qwantzTinyArms case 102: self = .tDeckPro case 103: self = .tLoraPager - case 104: self = .gat562MeshTrialTracker + case 104: self = .m5StackReserved case 105: self = .wismeshTag case 106: self = .rak3312 case 107: self = .thinknodeM5 case 108: self = .heltecMeshSolar + case 109: self = .tEchoLite + case 110: self = .heltecV4 + case 111: self = .m5StackC6L + case 112: self = .m5StackCardputerAdv case 255: self = .privateHw default: self = .UNRECOGNIZED(rawValue) } @@ -719,11 +739,15 @@ public enum HardwareModel: SwiftProtobuf.Enum { case .qwantzTinyArms: return 101 case .tDeckPro: return 102 case .tLoraPager: return 103 - case .gat562MeshTrialTracker: return 104 + case .m5StackReserved: return 104 case .wismeshTag: return 105 case .rak3312: return 106 case .thinknodeM5: return 107 case .heltecMeshSolar: return 108 + case .tEchoLite: return 109 + case .heltecV4: return 110 + case .m5StackC6L: return 111 + case .m5StackCardputerAdv: return 112 case .privateHw: return 255 case .UNRECOGNIZED(let i): return i } @@ -840,11 +864,15 @@ extension HardwareModel: CaseIterable { .qwantzTinyArms, .tDeckPro, .tLoraPager, - .gat562MeshTrialTracker, + .m5StackReserved, .wismeshTag, .rak3312, .thinknodeM5, .heltecMeshSolar, + .tEchoLite, + .heltecV4, + .m5StackC6L, + .m5StackCardputerAdv, .privateHw, ] } @@ -4184,11 +4212,15 @@ extension HardwareModel: SwiftProtobuf._ProtoNameProviding { 101: .same(proto: "QWANTZ_TINY_ARMS"), 102: .same(proto: "T_DECK_PRO"), 103: .same(proto: "T_LORA_PAGER"), - 104: .same(proto: "GAT562_MESH_TRIAL_TRACKER"), + 104: .same(proto: "M5STACK_RESERVED"), 105: .same(proto: "WISMESH_TAG"), 106: .same(proto: "RAK3312"), 107: .same(proto: "THINKNODE_M5"), 108: .same(proto: "HELTEC_MESH_SOLAR"), + 109: .same(proto: "T_ECHO_LITE"), + 110: .same(proto: "HELTEC_V4"), + 111: .same(proto: "M5STACK_C6L"), + 112: .same(proto: "M5STACK_CARDPUTER_ADV"), 255: .same(proto: "PRIVATE_HW"), ] } diff --git a/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift index ef376888..5bf37457 100644 --- a/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/module_config.pb.swift @@ -1013,6 +1013,11 @@ public struct ModuleConfig { /// ESP32 Only public var save: Bool = false + /// + /// Bool indicating that the node should cleanup / destroy it's RangeTest.csv file. + /// ESP32 Only + public var clearOnReboot_p: Bool = false + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -1082,6 +1087,11 @@ public struct ModuleConfig { /// Enable/Disable the health telemetry module on-device display public var healthScreenEnabled: Bool = false + /// + /// Enable/Disable the device telemetry module to send metrics to the mesh + /// Note: We will still send telemtry to the connected phone / client every minute over the API + public var deviceTelemetryEnabled: Bool = false + public var unknownFields = SwiftProtobuf.UnknownStorage() public init() {} @@ -2403,6 +2413,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me 1: .same(proto: "enabled"), 2: .same(proto: "sender"), 3: .same(proto: "save"), + 4: .standard(proto: "clear_on_reboot"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -2414,6 +2425,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me case 1: try { try decoder.decodeSingularBoolField(value: &self.enabled) }() case 2: try { try decoder.decodeSingularUInt32Field(value: &self.sender) }() case 3: try { try decoder.decodeSingularBoolField(value: &self.save) }() + case 4: try { try decoder.decodeSingularBoolField(value: &self.clearOnReboot_p) }() default: break } } @@ -2429,6 +2441,9 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me if self.save != false { try visitor.visitSingularBoolField(value: self.save, fieldNumber: 3) } + if self.clearOnReboot_p != false { + try visitor.visitSingularBoolField(value: self.clearOnReboot_p, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } @@ -2436,6 +2451,7 @@ extension ModuleConfig.RangeTestConfig: SwiftProtobuf.Message, SwiftProtobuf._Me if lhs.enabled != rhs.enabled {return false} if lhs.sender != rhs.sender {return false} if lhs.save != rhs.save {return false} + if lhs.clearOnReboot_p != rhs.clearOnReboot_p {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -2457,6 +2473,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me 11: .standard(proto: "health_measurement_enabled"), 12: .standard(proto: "health_update_interval"), 13: .standard(proto: "health_screen_enabled"), + 14: .standard(proto: "device_telemetry_enabled"), ] public mutating func decodeMessage(decoder: inout D) throws { @@ -2478,6 +2495,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me case 11: try { try decoder.decodeSingularBoolField(value: &self.healthMeasurementEnabled) }() case 12: try { try decoder.decodeSingularUInt32Field(value: &self.healthUpdateInterval) }() case 13: try { try decoder.decodeSingularBoolField(value: &self.healthScreenEnabled) }() + case 14: try { try decoder.decodeSingularBoolField(value: &self.deviceTelemetryEnabled) }() default: break } } @@ -2523,6 +2541,9 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me if self.healthScreenEnabled != false { try visitor.visitSingularBoolField(value: self.healthScreenEnabled, fieldNumber: 13) } + if self.deviceTelemetryEnabled != false { + try visitor.visitSingularBoolField(value: self.deviceTelemetryEnabled, fieldNumber: 14) + } try unknownFields.traverse(visitor: &visitor) } @@ -2540,6 +2561,7 @@ extension ModuleConfig.TelemetryConfig: SwiftProtobuf.Message, SwiftProtobuf._Me if lhs.healthMeasurementEnabled != rhs.healthMeasurementEnabled {return false} if lhs.healthUpdateInterval != rhs.healthUpdateInterval {return false} if lhs.healthScreenEnabled != rhs.healthScreenEnabled {return false} + if lhs.deviceTelemetryEnabled != rhs.deviceTelemetryEnabled {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift b/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift index 1f82d357..1173189c 100644 --- a/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift +++ b/MeshtasticProtobufs/Sources/meshtastic/telemetry.pb.swift @@ -200,6 +200,10 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum { /// /// SEN5X PM SENSORS case sen5X // = 43 + + /// + /// TSL2561 light sensor + case tsl2561 // = 44 case UNRECOGNIZED(Int) public init() { @@ -252,6 +256,7 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum { case 41: self = .ads1X15Alt case 42: self = .sfa30 case 43: self = .sen5X + case 44: self = .tsl2561 default: self = .UNRECOGNIZED(rawValue) } } @@ -302,6 +307,7 @@ public enum TelemetrySensorType: SwiftProtobuf.Enum { case .ads1X15Alt: return 41 case .sfa30: return 42 case .sen5X: return 43 + case .tsl2561: return 44 case .UNRECOGNIZED(let i): return i } } @@ -357,6 +363,7 @@ extension TelemetrySensorType: CaseIterable { .ads1X15Alt, .sfa30, .sen5X, + .tsl2561, ] } @@ -1619,6 +1626,7 @@ extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding { 41: .same(proto: "ADS1X15_ALT"), 42: .same(proto: "SFA30"), 43: .same(proto: "SEN5X"), + 44: .same(proto: "TSL2561"), ] } diff --git a/protobufs b/protobufs index e2c0831a..46b81e82 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit e2c0831aa3d34a58a36c2b9fdcb828e58961cbc5 +Subproject commit 46b81e822af1b8e408f437092337f129dee693e6