From 473dd3a4243cebae4bb680cee328a1441f188fd2 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 26 May 2024 12:25:45 -0700 Subject: [PATCH] Update protobufs --- Meshtastic/Protobufs/meshtastic/mesh.pb.swift | 18 +++++ .../meshtastic/module_config.pb.swift | 20 ++++++ .../Protobufs/meshtastic/telemetry.pb.swift | 68 +++++++++++++++++++ protobufs | 2 +- 4 files changed, 107 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Protobufs/meshtastic/mesh.pb.swift b/Meshtastic/Protobufs/meshtastic/mesh.pb.swift index a3dc0f6d..7d33c743 100644 --- a/Meshtastic/Protobufs/meshtastic/mesh.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/mesh.pb.swift @@ -278,6 +278,16 @@ enum HardwareModel: SwiftProtobuf.Enum { /// Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS case twcMeshV4 // = 62 + /// + /// NRF52_PROMICRO_DIY + /// Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS + case nrf52PromicroDiy // = 63 + + /// + /// RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module + /// ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS + case radiomaster900BanditNano // = 64 + /// /// ------------------------------------------------------------------------------------------------------------------------------------------ /// 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. @@ -350,6 +360,8 @@ enum HardwareModel: SwiftProtobuf.Enum { case 60: self = .tdLorac case 61: self = .cdebyteEoraS3 case 62: self = .twcMeshV4 + case 63: self = .nrf52PromicroDiy + case 64: self = .radiomaster900BanditNano case 255: self = .privateHw default: self = .UNRECOGNIZED(rawValue) } @@ -416,6 +428,8 @@ enum HardwareModel: SwiftProtobuf.Enum { case .tdLorac: return 60 case .cdebyteEoraS3: return 61 case .twcMeshV4: return 62 + case .nrf52PromicroDiy: return 63 + case .radiomaster900BanditNano: return 64 case .privateHw: return 255 case .UNRECOGNIZED(let i): return i } @@ -487,6 +501,8 @@ extension HardwareModel: CaseIterable { .tdLorac, .cdebyteEoraS3, .twcMeshV4, + .nrf52PromicroDiy, + .radiomaster900BanditNano, .privateHw, ] } @@ -2787,6 +2803,8 @@ extension HardwareModel: SwiftProtobuf._ProtoNameProviding { 60: .same(proto: "TD_LORAC"), 61: .same(proto: "CDEBYTE_EORA_S3"), 62: .same(proto: "TWC_MESH_V4"), + 63: .same(proto: "NRF52_PROMICRO_DIY"), + 64: .same(proto: "RADIOMASTER_900_BANDIT_NANO"), 255: .same(proto: "PRIVATE_HW"), ] } diff --git a/Meshtastic/Protobufs/meshtastic/module_config.pb.swift b/Meshtastic/Protobufs/meshtastic/module_config.pb.swift index f6c28745..465e4e1f 100644 --- a/Meshtastic/Protobufs/meshtastic/module_config.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/module_config.pb.swift @@ -618,6 +618,14 @@ struct ModuleConfig { var paxcounterUpdateInterval: UInt32 = 0 + /// + /// WiFi RSSI threshold. Defaults to -80 + var wifiThreshold: Int32 = 0 + + /// + /// BLE RSSI threshold. Defaults to -80 + var bleThreshold: Int32 = 0 + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -1921,6 +1929,8 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "enabled"), 2: .standard(proto: "paxcounter_update_interval"), + 3: .standard(proto: "wifi_threshold"), + 4: .standard(proto: "ble_threshold"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1931,6 +1941,8 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M switch fieldNumber { case 1: try { try decoder.decodeSingularBoolField(value: &self.enabled) }() case 2: try { try decoder.decodeSingularUInt32Field(value: &self.paxcounterUpdateInterval) }() + case 3: try { try decoder.decodeSingularInt32Field(value: &self.wifiThreshold) }() + case 4: try { try decoder.decodeSingularInt32Field(value: &self.bleThreshold) }() default: break } } @@ -1943,12 +1955,20 @@ extension ModuleConfig.PaxcounterConfig: SwiftProtobuf.Message, SwiftProtobuf._M if self.paxcounterUpdateInterval != 0 { try visitor.visitSingularUInt32Field(value: self.paxcounterUpdateInterval, fieldNumber: 2) } + if self.wifiThreshold != 0 { + try visitor.visitSingularInt32Field(value: self.wifiThreshold, fieldNumber: 3) + } + if self.bleThreshold != 0 { + try visitor.visitSingularInt32Field(value: self.bleThreshold, fieldNumber: 4) + } try unknownFields.traverse(visitor: &visitor) } static func ==(lhs: ModuleConfig.PaxcounterConfig, rhs: ModuleConfig.PaxcounterConfig) -> Bool { if lhs.enabled != rhs.enabled {return false} if lhs.paxcounterUpdateInterval != rhs.paxcounterUpdateInterval {return false} + if lhs.wifiThreshold != rhs.wifiThreshold {return false} + if lhs.bleThreshold != rhs.bleThreshold {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 7f9d3396..c778bf49 100644 --- a/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift +++ b/Meshtastic/Protobufs/meshtastic/telemetry.pb.swift @@ -92,6 +92,30 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { /// /// RCWL-9620 Doppler Radar Distance Sensor, used for water level detection case rcwl9620 // = 16 + + /// + /// Sensirion High accuracy temperature and humidity + case sht4X // = 17 + + /// + /// VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + case veml7700 // = 18 + + /// + /// MLX90632 non-contact IR temperature sensor. + case mlx90632 // = 19 + + /// + /// TI OPT3001 Ambient Light Sensor + case opt3001 // = 20 + + /// + /// Lite On LTR-390UV-01 UV Light Sensor + case ltr390Uv // = 21 + + /// + /// AMS TSL25911FN RGB Light Sensor + case tsl25911Fn // = 22 case UNRECOGNIZED(Int) init() { @@ -117,6 +141,12 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { case 14: self = .ina3221 case 15: self = .bmp085 case 16: self = .rcwl9620 + case 17: self = .sht4X + case 18: self = .veml7700 + case 19: self = .mlx90632 + case 20: self = .opt3001 + case 21: self = .ltr390Uv + case 22: self = .tsl25911Fn default: self = .UNRECOGNIZED(rawValue) } } @@ -140,6 +170,12 @@ enum TelemetrySensorType: SwiftProtobuf.Enum { case .ina3221: return 14 case .bmp085: return 15 case .rcwl9620: return 16 + case .sht4X: return 17 + case .veml7700: return 18 + case .mlx90632: return 19 + case .opt3001: return 20 + case .ltr390Uv: return 21 + case .tsl25911Fn: return 22 case .UNRECOGNIZED(let i): return i } } @@ -168,6 +204,12 @@ extension TelemetrySensorType: CaseIterable { .ina3221, .bmp085, .rcwl9620, + .sht4X, + .veml7700, + .mlx90632, + .opt3001, + .ltr390Uv, + .tsl25911Fn, ] } @@ -245,6 +287,14 @@ struct EnvironmentMetrics { /// RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. var distance: Float = 0 + /// + /// VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + var lux: Float = 0 + + /// + /// VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. + var whiteLux: Float = 0 + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} @@ -479,6 +529,12 @@ extension TelemetrySensorType: SwiftProtobuf._ProtoNameProviding { 14: .same(proto: "INA3221"), 15: .same(proto: "BMP085"), 16: .same(proto: "RCWL9620"), + 17: .same(proto: "SHT4X"), + 18: .same(proto: "VEML7700"), + 19: .same(proto: "MLX90632"), + 20: .same(proto: "OPT3001"), + 21: .same(proto: "LTR390UV"), + 22: .same(proto: "TSL25911FN"), ] } @@ -549,6 +605,8 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple 6: .same(proto: "current"), 7: .same(proto: "iaq"), 8: .same(proto: "distance"), + 9: .same(proto: "lux"), + 10: .standard(proto: "white_lux"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -565,6 +623,8 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple case 6: try { try decoder.decodeSingularFloatField(value: &self.current) }() case 7: try { try decoder.decodeSingularUInt32Field(value: &self.iaq) }() case 8: try { try decoder.decodeSingularFloatField(value: &self.distance) }() + case 9: try { try decoder.decodeSingularFloatField(value: &self.lux) }() + case 10: try { try decoder.decodeSingularFloatField(value: &self.whiteLux) }() default: break } } @@ -595,6 +655,12 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple if self.distance != 0 { try visitor.visitSingularFloatField(value: self.distance, fieldNumber: 8) } + if self.lux != 0 { + try visitor.visitSingularFloatField(value: self.lux, fieldNumber: 9) + } + if self.whiteLux != 0 { + try visitor.visitSingularFloatField(value: self.whiteLux, fieldNumber: 10) + } try unknownFields.traverse(visitor: &visitor) } @@ -607,6 +673,8 @@ extension EnvironmentMetrics: SwiftProtobuf.Message, SwiftProtobuf._MessageImple if lhs.current != rhs.current {return false} if lhs.iaq != rhs.iaq {return false} if lhs.distance != rhs.distance {return false} + if lhs.lux != rhs.lux {return false} + if lhs.whiteLux != rhs.whiteLux {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } diff --git a/protobufs b/protobufs index f92900c5..5f78a06c 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit f92900c5f884b04388fb7abf61d4df66783015e4 +Subproject commit 5f78a06c0fe5d0bd99c2fe206165212bdce89da0