From 0ba8b1437db6af4c2a42e1cf4fda5e91aa6fa394 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 18 Aug 2023 09:42:34 -0500 Subject: [PATCH 1/6] Add more nrf targets --- Meshtastic.Cli/Mappings/HardwareModelMappings.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Meshtastic.Cli/Mappings/HardwareModelMappings.cs b/Meshtastic.Cli/Mappings/HardwareModelMappings.cs index 7643e04..ef43999 100644 --- a/Meshtastic.Cli/Mappings/HardwareModelMappings.cs +++ b/Meshtastic.Cli/Mappings/HardwareModelMappings.cs @@ -6,7 +6,10 @@ internal static class HardwareModelMappings { public static readonly IEnumerable NrfHardwareModels = new[] { - HardwareModel.TEcho, HardwareModel.Rak4631 + HardwareModel.TEcho, + HardwareModel.Rak4631, + HardwareModel.NanoG2Ultra, + HardwareModel.Nrf52Unknown }; public static readonly Dictionary FileNameMappings = new() From 17af839ae95e854eaea8f9f18ee280816afe024a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 5 Sep 2023 07:15:47 -0500 Subject: [PATCH 2/6] Capture command --- .../CommandHandlers/CaptureCommandHandler.cs | 70 +++++++++++++++++++ Meshtastic.Cli/Commands/CaptureCommand.cs | 21 ++++++ Meshtastic.Cli/Program.cs | 1 + Meshtastic/Data/DeviceStateContainer.cs | 1 - Meshtastic/Extensions/ToRadioExtensions.cs | 6 +- Meshtastic/Generated/Config.cs | 5 +- Meshtastic/Generated/Mesh.cs | 28 +++++--- protobufs | 2 +- 8 files changed, 115 insertions(+), 19 deletions(-) create mode 100644 Meshtastic.Cli/CommandHandlers/CaptureCommandHandler.cs create mode 100644 Meshtastic.Cli/Commands/CaptureCommand.cs diff --git a/Meshtastic.Cli/CommandHandlers/CaptureCommandHandler.cs b/Meshtastic.Cli/CommandHandlers/CaptureCommandHandler.cs new file mode 100644 index 0000000..7137aa8 --- /dev/null +++ b/Meshtastic.Cli/CommandHandlers/CaptureCommandHandler.cs @@ -0,0 +1,70 @@ +using Meshtastic.Data; +using Meshtastic.Data.MessageFactories; +using Meshtastic.Display; +using Meshtastic.Protobufs; +using Meshtastic.Extensions; + +namespace Meshtastic.Cli.CommandHandlers; + +public class CaptureCommandHandler : DeviceCommandHandler +{ + public CaptureCommandHandler(DeviceConnectionContext context, CommandContext commandContext) : base(context, commandContext) { } + + public async Task Handle() + { + var wantConfig = new ToRadioMessageFactory().CreateWantConfigMessage(); + var container = await Connection.WriteToRadio(wantConfig, CompleteOnConfigReceived); + Connection.Disconnect(); + return container; + } + + public override async Task OnCompleted(FromRadio packet, DeviceStateContainer container) + { + await Connection.ReadFromRadio((fromRadio, container) => + { + if (fromRadio!.PayloadVariantCase == FromRadio.PayloadVariantOneofCase.Packet) { + var fromRadioDecoded = new FromRadioDecoded(fromRadio) + { + PortNum = fromRadio.Packet?.Decoded?.Portnum, + PayloadSize = fromRadio.Packet?.Decoded?.Payload.Length ?? 0, + ReceivedAt = DateTime.Now, + }; + if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + else if (fromRadio.GetPayload() != null) + fromRadioDecoded.DecodedPayload = fromRadio.GetPayload(); + } + + return Task.FromResult(false); + }); + } +} + +public class FromRadioDecoded +{ + public FromRadioDecoded(FromRadio fromRadio) + { + Packet = fromRadio; + } + + public FromRadio Packet { get; set; } + public object? DecodedPayload { get; set; } + public PortNum? PortNum { get; set; } + public int PayloadSize { get; set; } + public int TotalSize { get; set; } + public DateTime ReceivedAt { get; set; } +} \ No newline at end of file diff --git a/Meshtastic.Cli/Commands/CaptureCommand.cs b/Meshtastic.Cli/Commands/CaptureCommand.cs new file mode 100644 index 0000000..ebf212a --- /dev/null +++ b/Meshtastic.Cli/Commands/CaptureCommand.cs @@ -0,0 +1,21 @@ +using Meshtastic.Cli.Binders; +using Meshtastic.Cli.CommandHandlers; +using Meshtastic.Cli.Enums; +using Microsoft.Extensions.Logging; + +namespace Meshtastic.Cli.Commands; + +public class CaptureCommand : Command +{ + public CaptureCommand(string name, string description, Option port, Option host, + Option output, Option log) : base(name, description) + { + this.SetHandler(async (context, commandContext) => + { + var handler = new CaptureCommandHandler(context, commandContext); + await handler.Handle(); + }, + new DeviceConnectionBinder(port, host), + new CommandContextBinder(log, output, new Option("dest") { }, new Option("select-dest") { })); + } +} diff --git a/Meshtastic.Cli/Program.cs b/Meshtastic.Cli/Program.cs index db7157f..a713d61 100644 --- a/Meshtastic.Cli/Program.cs +++ b/Meshtastic.Cli/Program.cs @@ -62,6 +62,7 @@ root.AddCommand(new ImportCommand("import", "Import the profile export from a yaml file and set the connected device", port, host, output, log)); root.AddCommand(new MqttProxyCommand("mqtt-proxy", "Proxy to the MQTT server referenced in the MQTT module config of the connected device", port, host, output, log)); root.AddCommand(new RequestTelemetryCommand("request-telemetry", "Request a telemetry packet from a repeater by nodenum", port, host, output, log, dest, selectDest)); +root.AddCommand(new CaptureCommand("capture", "Capture all of the FromRadio messages for the device and store in MongoDB instance", port, host, output, log)); var parser = new CommandLineBuilder(root) .UseExceptionHandler((ex, context) => diff --git a/Meshtastic/Data/DeviceStateContainer.cs b/Meshtastic/Data/DeviceStateContainer.cs index 67170aa..cfc7d5a 100644 --- a/Meshtastic/Data/DeviceStateContainer.cs +++ b/Meshtastic/Data/DeviceStateContainer.cs @@ -1,6 +1,5 @@ using Google.Protobuf; using Meshtastic.Protobufs; -using System.Linq; namespace Meshtastic.Data; diff --git a/Meshtastic/Extensions/ToRadioExtensions.cs b/Meshtastic/Extensions/ToRadioExtensions.cs index 911bb1b..4e96485 100644 --- a/Meshtastic/Extensions/ToRadioExtensions.cs +++ b/Meshtastic/Extensions/ToRadioExtensions.cs @@ -40,10 +40,8 @@ private static bool IsValidMeshPacket(ToRadio toRadio) else if (typeof(TResult) == typeof(Waypoint) && toRadio.Packet?.Decoded?.Portnum == PortNum.WaypointApp) return NodeInfo.Parser.ParseFrom(toRadio.Packet?.Decoded?.Payload) as TResult; - else if (typeof(TResult) == typeof(string) && toRadio.Packet?.Decoded?.Portnum == PortNum.TextMessageApp) - return toRadio.Packet?.Decoded?.Payload.ToStringUtf8() as TResult; - - else if (typeof(TResult) == typeof(string) && toRadio.Packet?.Decoded?.Portnum == PortNum.SerialApp) + else if (typeof(TResult) == typeof(string) && + (toRadio.Packet?.Decoded?.Portnum == PortNum.TextMessageApp || toRadio.Packet?.Decoded?.Portnum == PortNum.DetectionSensorApp || toRadio.Packet?.Decoded?.Portnum == PortNum.RangeTestApp)) return toRadio.Packet?.Decoded?.Payload.ToStringUtf8() as TResult; return null; diff --git a/Meshtastic/Generated/Config.cs b/Meshtastic/Generated/Config.cs index e9ae474..695469c 100644 --- a/Meshtastic/Generated/Config.cs +++ b/Meshtastic/Generated/Config.cs @@ -1914,8 +1914,9 @@ public static partial class Types { /// /// /// Bit field of boolean configuration options, indicating which optional - /// fields to include when assembling POSITION messages - /// Longitude and latitude are always included (also time if GPS-synced) + /// fields to include when assembling POSITION messages. + /// Longitude, latitude, altitude, speed, heading, and DOP + /// are always included (also time if GPS-synced) /// NOTE: the more fields are included, the larger the message will be - /// leading to longer airtime and a higher risk of packet loss /// diff --git a/Meshtastic/Generated/Mesh.cs b/Meshtastic/Generated/Mesh.cs index 6b8ae71..75e3b3f 100644 --- a/Meshtastic/Generated/Mesh.cs +++ b/Meshtastic/Generated/Mesh.cs @@ -122,7 +122,7 @@ static MeshReflection() { "GAcgASgOMiQubWVzaHRhc3RpYy5Db25maWcuRGV2aWNlQ29uZmlnLlJvbGUS", "FgoOcG9zaXRpb25fZmxhZ3MYCCABKA0SKwoIaHdfbW9kZWwYCSABKA4yGS5t", "ZXNodGFzdGljLkhhcmR3YXJlTW9kZWwSGQoRaGFzUmVtb3RlSGFyZHdhcmUY", - "CiABKAgq8wUKDUhhcmR3YXJlTW9kZWwSCQoFVU5TRVQQABIMCghUTE9SQV9W", + "CiABKAgqhAYKDUhhcmR3YXJlTW9kZWwSCQoFVU5TRVQQABIMCghUTE9SQV9W", "MhABEgwKCFRMT1JBX1YxEAISEgoOVExPUkFfVjJfMV8xUDYQAxIJCgVUQkVB", "TRAEEg8KC0hFTFRFQ19WMl8wEAUSDgoKVEJFQU1fVjBQNxAGEgoKBlRfRUNI", "TxAHEhAKDFRMT1JBX1YxXzFQMxAIEgsKB1JBSzQ2MzEQCRIPCgtIRUxURUNf", @@ -138,16 +138,17 @@ static MeshReflection() { "Cg9CRVRBRlBWXzI0MDBfVFgQLRIXChNCRVRBRlBWXzkwMF9OQU5PX1RYEC4S", "DAoIUlBJX1BJQ08QLxIbChdIRUxURUNfV0lSRUxFU1NfVFJBQ0tFUhAwEhkK", "FUhFTFRFQ19XSVJFTEVTU19QQVBFUhAxEgoKBlRfREVDSxAyEg4KClRfV0FU", - "Q0hfUzMQMxIRCg1QSUNPTVBVVEVSX1MzEDQSDwoKUFJJVkFURV9IVxD/ASos", - "CglDb25zdGFudHMSCAoEWkVSTxAAEhUKEERBVEFfUEFZTE9BRF9MRU4Q7QEq", - "7gEKEUNyaXRpY2FsRXJyb3JDb2RlEggKBE5PTkUQABIPCgtUWF9XQVRDSERP", - "RxABEhQKEFNMRUVQX0VOVEVSX1dBSVQQAhIMCghOT19SQURJTxADEg8KC1VO", - "U1BFQ0lGSUVEEAQSFQoRVUJMT1hfVU5JVF9GQUlMRUQQBRINCglOT19BWFAx", - "OTIQBhIZChVJTlZBTElEX1JBRElPX1NFVFRJTkcQBxITCg9UUkFOU01JVF9G", - "QUlMRUQQCBIMCghCUk9XTk9VVBAJEhIKDlNYMTI2Ml9GQUlMVVJFEAoSEQoN", - "UkFESU9fU1BJX0JVRxALQl8KE2NvbS5nZWVrc3ZpbGxlLm1lc2hCCk1lc2hQ", - "cm90b3NaImdpdGh1Yi5jb20vbWVzaHRhc3RpYy9nby9nZW5lcmF0ZWSqAhRN", - "ZXNodGFzdGljLlByb3RvYnVmc7oCAGIGcHJvdG8z")); + "Q0hfUzMQMxIRCg1QSUNPTVBVVEVSX1MzEDQSDwoLSEVMVEVDX0hUNjIQNRIP", + "CgpQUklWQVRFX0hXEP8BKiwKCUNvbnN0YW50cxIICgRaRVJPEAASFQoQREFU", + "QV9QQVlMT0FEX0xFThDtASruAQoRQ3JpdGljYWxFcnJvckNvZGUSCAoETk9O", + "RRAAEg8KC1RYX1dBVENIRE9HEAESFAoQU0xFRVBfRU5URVJfV0FJVBACEgwK", + "CE5PX1JBRElPEAMSDwoLVU5TUEVDSUZJRUQQBBIVChFVQkxPWF9VTklUX0ZB", + "SUxFRBAFEg0KCU5PX0FYUDE5MhAGEhkKFUlOVkFMSURfUkFESU9fU0VUVElO", + "RxAHEhMKD1RSQU5TTUlUX0ZBSUxFRBAIEgwKCEJST1dOT1VUEAkSEgoOU1gx", + "MjYyX0ZBSUxVUkUQChIRCg1SQURJT19TUElfQlVHEAtCXwoTY29tLmdlZWtz", + "dmlsbGUubWVzaEIKTWVzaFByb3Rvc1oiZ2l0aHViLmNvbS9tZXNodGFzdGlj", + "L2dvL2dlbmVyYXRlZKoCFE1lc2h0YXN0aWMuUHJvdG9idWZzugIAYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Meshtastic.Protobufs.ChannelReflection.Descriptor, global::Meshtastic.Protobufs.ConfigReflection.Descriptor, global::Meshtastic.Protobufs.ModuleConfigReflection.Descriptor, global::Meshtastic.Protobufs.PortnumsReflection.Descriptor, global::Meshtastic.Protobufs.TelemetryReflection.Descriptor, global::Meshtastic.Protobufs.XmodemReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Meshtastic.Protobufs.HardwareModel), typeof(global::Meshtastic.Protobufs.Constants), typeof(global::Meshtastic.Protobufs.CriticalErrorCode), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -404,6 +405,11 @@ public enum HardwareModel { [pbr::OriginalName("PICOMPUTER_S3")] PicomputerS3 = 52, /// /// + /// Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa + /// + [pbr::OriginalName("HELTEC_HT62")] HeltecHt62 = 53, + /// + /// /// ------------------------------------------------------------------------------------------------------------------------------------------ /// 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. /// ------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/protobufs b/protobufs index d3dd7cf..826dfb7 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit d3dd7cfbe3bb7c0e406c055df58e6eccf94f1275 +Subproject commit 826dfb760450a4225384da6316582e93138102ba From defceed979094344b6bef2c55f1657e241320c6b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 19 Nov 2023 06:39:28 -0600 Subject: [PATCH 3/6] Protos --- Meshtastic/Generated/Admin.cs | 95 +++- Meshtastic/Generated/Config.cs | 243 +++++++--- Meshtastic/Generated/Mesh.cs | 34 +- Meshtastic/Generated/ModuleConfig.cs | 262 ++++++++-- Meshtastic/Generated/Portnums.cs | 2 + Meshtastic/Generated/Telemetry.cs | 700 ++++++++++++++++++++++----- protobufs | 2 +- 7 files changed, 1064 insertions(+), 274 deletions(-) diff --git a/Meshtastic/Generated/Admin.cs b/Meshtastic/Generated/Admin.cs index abb245b..72ac4ee 100644 --- a/Meshtastic/Generated/Admin.cs +++ b/Meshtastic/Generated/Admin.cs @@ -28,7 +28,7 @@ static AdminReflection() { "dGljL2NoYW5uZWwucHJvdG8aF21lc2h0YXN0aWMvY29uZmlnLnByb3RvGiJt", "ZXNodGFzdGljL2Nvbm5lY3Rpb25fc3RhdHVzLnByb3RvGhttZXNodGFzdGlj", "L2RldmljZW9ubHkucHJvdG8aFW1lc2h0YXN0aWMvbWVzaC5wcm90bxoebWVz", - "aHRhc3RpYy9tb2R1bGVfY29uZmlnLnByb3RvIscPCgxBZG1pbk1lc3NhZ2US", + "aHRhc3RpYy9tb2R1bGVfY29uZmlnLnByb3RvIuQPCgxBZG1pbk1lc3NhZ2US", "HQoTZ2V0X2NoYW5uZWxfcmVxdWVzdBgBIAEoDUgAEjMKFGdldF9jaGFubmVs", "X3Jlc3BvbnNlGAIgASgLMhMubWVzaHRhc3RpYy5DaGFubmVsSAASGwoRZ2V0", "X293bmVyX3JlcXVlc3QYAyABKAhIABIuChJnZXRfb3duZXJfcmVzcG9uc2UY", @@ -57,33 +57,34 @@ static AdminReflection() { "aWcYIiABKAsyEi5tZXNodGFzdGljLkNvbmZpZ0gAEjUKEXNldF9tb2R1bGVf", "Y29uZmlnGCMgASgLMhgubWVzaHRhc3RpYy5Nb2R1bGVDb25maWdIABIsCiJz", "ZXRfY2FubmVkX21lc3NhZ2VfbW9kdWxlX21lc3NhZ2VzGCQgASgJSAASHgoU", - "c2V0X3Jpbmd0b25lX21lc3NhZ2UYJSABKAlIABIdChNiZWdpbl9lZGl0X3Nl", - "dHRpbmdzGEAgASgISAASHgoUY29tbWl0X2VkaXRfc2V0dGluZ3MYQSABKAhI", - "ABIcChJyZWJvb3Rfb3RhX3NlY29uZHMYXyABKAVIABIYCg5leGl0X3NpbXVs", - "YXRvchhgIAEoCEgAEhgKDnJlYm9vdF9zZWNvbmRzGGEgASgFSAASGgoQc2h1", - "dGRvd25fc2Vjb25kcxhiIAEoBUgAEhcKDWZhY3RvcnlfcmVzZXQYYyABKAVI", - "ABIWCgxub2RlZGJfcmVzZXQYZCABKAVIACKVAQoKQ29uZmlnVHlwZRIRCg1E", - "RVZJQ0VfQ09ORklHEAASEwoPUE9TSVRJT05fQ09ORklHEAESEAoMUE9XRVJf", - "Q09ORklHEAISEgoOTkVUV09SS19DT05GSUcQAxISCg5ESVNQTEFZX0NPTkZJ", - "RxAEEg8KC0xPUkFfQ09ORklHEAUSFAoQQkxVRVRPT1RIX0NPTkZJRxAGIqQC", - "ChBNb2R1bGVDb25maWdUeXBlEg8KC01RVFRfQ09ORklHEAASEQoNU0VSSUFM", - "X0NPTkZJRxABEhMKD0VYVE5PVElGX0NPTkZJRxACEhcKE1NUT1JFRk9SV0FS", - "RF9DT05GSUcQAxIUChBSQU5HRVRFU1RfQ09ORklHEAQSFAoQVEVMRU1FVFJZ", - "X0NPTkZJRxAFEhQKEENBTk5FRE1TR19DT05GSUcQBhIQCgxBVURJT19DT05G", - "SUcQBxIZChVSRU1PVEVIQVJEV0FSRV9DT05GSUcQCBIXChNORUlHSEJPUklO", - "Rk9fQ09ORklHEAkSGgoWQU1CSUVOVExJR0hUSU5HX0NPTkZJRxAKEhoKFkRF", - "VEVDVElPTlNFTlNPUl9DT05GSUcQC0IRCg9wYXlsb2FkX3ZhcmlhbnQiWwoN", - "SGFtUGFyYW1ldGVycxIRCgljYWxsX3NpZ24YASABKAkSEAoIdHhfcG93ZXIY", - "AiABKAUSEQoJZnJlcXVlbmN5GAMgASgCEhIKCnNob3J0X25hbWUYBCABKAki", - "ZgoeTm9kZVJlbW90ZUhhcmR3YXJlUGluc1Jlc3BvbnNlEkQKGW5vZGVfcmVt", - "b3RlX2hhcmR3YXJlX3BpbnMYASADKAsyIS5tZXNodGFzdGljLk5vZGVSZW1v", - "dGVIYXJkd2FyZVBpbkJgChNjb20uZ2Vla3N2aWxsZS5tZXNoQgtBZG1pblBy", - "b3Rvc1oiZ2l0aHViLmNvbS9tZXNodGFzdGljL2dvL2dlbmVyYXRlZKoCFE1l", - "c2h0YXN0aWMuUHJvdG9idWZzugIAYgZwcm90bzM=")); + "c2V0X3Jpbmd0b25lX21lc3NhZ2UYJSABKAlIABIbChFyZW1vdmVfYnlfbm9k", + "ZW51bRgmIAEoDUgAEh0KE2JlZ2luX2VkaXRfc2V0dGluZ3MYQCABKAhIABIe", + "ChRjb21taXRfZWRpdF9zZXR0aW5ncxhBIAEoCEgAEhwKEnJlYm9vdF9vdGFf", + "c2Vjb25kcxhfIAEoBUgAEhgKDmV4aXRfc2ltdWxhdG9yGGAgASgISAASGAoO", + "cmVib290X3NlY29uZHMYYSABKAVIABIaChBzaHV0ZG93bl9zZWNvbmRzGGIg", + "ASgFSAASFwoNZmFjdG9yeV9yZXNldBhjIAEoBUgAEhYKDG5vZGVkYl9yZXNl", + "dBhkIAEoBUgAIpUBCgpDb25maWdUeXBlEhEKDURFVklDRV9DT05GSUcQABIT", + "Cg9QT1NJVElPTl9DT05GSUcQARIQCgxQT1dFUl9DT05GSUcQAhISCg5ORVRX", + "T1JLX0NPTkZJRxADEhIKDkRJU1BMQVlfQ09ORklHEAQSDwoLTE9SQV9DT05G", + "SUcQBRIUChBCTFVFVE9PVEhfQ09ORklHEAYipAIKEE1vZHVsZUNvbmZpZ1R5", + "cGUSDwoLTVFUVF9DT05GSUcQABIRCg1TRVJJQUxfQ09ORklHEAESEwoPRVhU", + "Tk9USUZfQ09ORklHEAISFwoTU1RPUkVGT1JXQVJEX0NPTkZJRxADEhQKEFJB", + "TkdFVEVTVF9DT05GSUcQBBIUChBURUxFTUVUUllfQ09ORklHEAUSFAoQQ0FO", + "TkVETVNHX0NPTkZJRxAGEhAKDEFVRElPX0NPTkZJRxAHEhkKFVJFTU9URUhB", + "UkRXQVJFX0NPTkZJRxAIEhcKE05FSUdIQk9SSU5GT19DT05GSUcQCRIaChZB", + "TUJJRU5UTElHSFRJTkdfQ09ORklHEAoSGgoWREVURUNUSU9OU0VOU09SX0NP", + "TkZJRxALQhEKD3BheWxvYWRfdmFyaWFudCJbCg1IYW1QYXJhbWV0ZXJzEhEK", + "CWNhbGxfc2lnbhgBIAEoCRIQCgh0eF9wb3dlchgCIAEoBRIRCglmcmVxdWVu", + "Y3kYAyABKAISEgoKc2hvcnRfbmFtZRgEIAEoCSJmCh5Ob2RlUmVtb3RlSGFy", + "ZHdhcmVQaW5zUmVzcG9uc2USRAoZbm9kZV9yZW1vdGVfaGFyZHdhcmVfcGlu", + "cxgBIAMoCzIhLm1lc2h0YXN0aWMuTm9kZVJlbW90ZUhhcmR3YXJlUGluQmAK", + "E2NvbS5nZWVrc3ZpbGxlLm1lc2hCC0FkbWluUHJvdG9zWiJnaXRodWIuY29t", + "L21lc2h0YXN0aWMvZ28vZ2VuZXJhdGVkqgIUTWVzaHRhc3RpYy5Qcm90b2J1", + "ZnO6AgBiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Meshtastic.Protobufs.ChannelReflection.Descriptor, global::Meshtastic.Protobufs.ConfigReflection.Descriptor, global::Meshtastic.Protobufs.ConnectionStatusReflection.Descriptor, global::Meshtastic.Protobufs.DeviceonlyReflection.Descriptor, global::Meshtastic.Protobufs.MeshReflection.Descriptor, global::Meshtastic.Protobufs.ModuleConfigReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.AdminMessage), global::Meshtastic.Protobufs.AdminMessage.Parser, new[]{ "GetChannelRequest", "GetChannelResponse", "GetOwnerRequest", "GetOwnerResponse", "GetConfigRequest", "GetConfigResponse", "GetModuleConfigRequest", "GetModuleConfigResponse", "GetCannedMessageModuleMessagesRequest", "GetCannedMessageModuleMessagesResponse", "GetDeviceMetadataRequest", "GetDeviceMetadataResponse", "GetRingtoneRequest", "GetRingtoneResponse", "GetDeviceConnectionStatusRequest", "GetDeviceConnectionStatusResponse", "SetHamMode", "GetNodeRemoteHardwarePinsRequest", "GetNodeRemoteHardwarePinsResponse", "SetOwner", "SetChannel", "SetConfig", "SetModuleConfig", "SetCannedMessageModuleMessages", "SetRingtoneMessage", "BeginEditSettings", "CommitEditSettings", "RebootOtaSeconds", "ExitSimulator", "RebootSeconds", "ShutdownSeconds", "FactoryReset", "NodedbReset" }, new[]{ "PayloadVariant" }, new[]{ typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ConfigType), typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ModuleConfigType) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.AdminMessage), global::Meshtastic.Protobufs.AdminMessage.Parser, new[]{ "GetChannelRequest", "GetChannelResponse", "GetOwnerRequest", "GetOwnerResponse", "GetConfigRequest", "GetConfigResponse", "GetModuleConfigRequest", "GetModuleConfigResponse", "GetCannedMessageModuleMessagesRequest", "GetCannedMessageModuleMessagesResponse", "GetDeviceMetadataRequest", "GetDeviceMetadataResponse", "GetRingtoneRequest", "GetRingtoneResponse", "GetDeviceConnectionStatusRequest", "GetDeviceConnectionStatusResponse", "SetHamMode", "GetNodeRemoteHardwarePinsRequest", "GetNodeRemoteHardwarePinsResponse", "SetOwner", "SetChannel", "SetConfig", "SetModuleConfig", "SetCannedMessageModuleMessages", "SetRingtoneMessage", "RemoveByNodenum", "BeginEditSettings", "CommitEditSettings", "RebootOtaSeconds", "ExitSimulator", "RebootSeconds", "ShutdownSeconds", "FactoryReset", "NodedbReset" }, new[]{ "PayloadVariant" }, new[]{ typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ConfigType), typeof(global::Meshtastic.Protobufs.AdminMessage.Types.ModuleConfigType) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.HamParameters), global::Meshtastic.Protobufs.HamParameters.Parser, new[]{ "CallSign", "TxPower", "Frequency", "ShortName" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.NodeRemoteHardwarePinsResponse), global::Meshtastic.Protobufs.NodeRemoteHardwarePinsResponse.Parser, new[]{ "NodeRemoteHardwarePins" }, null, null, null, null) })); @@ -208,6 +209,9 @@ public AdminMessage(AdminMessage other) : this() { case PayloadVariantOneofCase.SetRingtoneMessage: SetRingtoneMessage = other.SetRingtoneMessage; break; + case PayloadVariantOneofCase.RemoveByNodenum: + RemoveByNodenum = other.RemoveByNodenum; + break; case PayloadVariantOneofCase.BeginEditSettings: BeginEditSettings = other.BeginEditSettings; break; @@ -648,6 +652,22 @@ public string SetRingtoneMessage { } } + /// Field number for the "remove_by_nodenum" field. + public const int RemoveByNodenumFieldNumber = 38; + /// + /// + /// Remove the node by the specified node-num from the NodeDB on the device + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint RemoveByNodenum { + get { return payloadVariantCase_ == PayloadVariantOneofCase.RemoveByNodenum ? (uint) payloadVariant_ : 0; } + set { + payloadVariant_ = value; + payloadVariantCase_ = PayloadVariantOneofCase.RemoveByNodenum; + } + } + /// Field number for the "begin_edit_settings" field. public const int BeginEditSettingsFieldNumber = 64; /// @@ -808,6 +828,7 @@ public enum PayloadVariantOneofCase { SetModuleConfig = 35, SetCannedMessageModuleMessages = 36, SetRingtoneMessage = 37, + RemoveByNodenum = 38, BeginEditSettings = 64, CommitEditSettings = 65, RebootOtaSeconds = 95, @@ -871,6 +892,7 @@ public bool Equals(AdminMessage other) { if (!object.Equals(SetModuleConfig, other.SetModuleConfig)) return false; if (SetCannedMessageModuleMessages != other.SetCannedMessageModuleMessages) return false; if (SetRingtoneMessage != other.SetRingtoneMessage) return false; + if (RemoveByNodenum != other.RemoveByNodenum) return false; if (BeginEditSettings != other.BeginEditSettings) return false; if (CommitEditSettings != other.CommitEditSettings) return false; if (RebootOtaSeconds != other.RebootOtaSeconds) return false; @@ -912,6 +934,7 @@ public override int GetHashCode() { if (payloadVariantCase_ == PayloadVariantOneofCase.SetModuleConfig) hash ^= SetModuleConfig.GetHashCode(); if (payloadVariantCase_ == PayloadVariantOneofCase.SetCannedMessageModuleMessages) hash ^= SetCannedMessageModuleMessages.GetHashCode(); if (payloadVariantCase_ == PayloadVariantOneofCase.SetRingtoneMessage) hash ^= SetRingtoneMessage.GetHashCode(); + if (payloadVariantCase_ == PayloadVariantOneofCase.RemoveByNodenum) hash ^= RemoveByNodenum.GetHashCode(); if (payloadVariantCase_ == PayloadVariantOneofCase.BeginEditSettings) hash ^= BeginEditSettings.GetHashCode(); if (payloadVariantCase_ == PayloadVariantOneofCase.CommitEditSettings) hash ^= CommitEditSettings.GetHashCode(); if (payloadVariantCase_ == PayloadVariantOneofCase.RebootOtaSeconds) hash ^= RebootOtaSeconds.GetHashCode(); @@ -1039,6 +1062,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(170, 2); output.WriteString(SetRingtoneMessage); } + if (payloadVariantCase_ == PayloadVariantOneofCase.RemoveByNodenum) { + output.WriteRawTag(176, 2); + output.WriteUInt32(RemoveByNodenum); + } if (payloadVariantCase_ == PayloadVariantOneofCase.BeginEditSettings) { output.WriteRawTag(128, 4); output.WriteBool(BeginEditSettings); @@ -1181,6 +1208,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(170, 2); output.WriteString(SetRingtoneMessage); } + if (payloadVariantCase_ == PayloadVariantOneofCase.RemoveByNodenum) { + output.WriteRawTag(176, 2); + output.WriteUInt32(RemoveByNodenum); + } if (payloadVariantCase_ == PayloadVariantOneofCase.BeginEditSettings) { output.WriteRawTag(128, 4); output.WriteBool(BeginEditSettings); @@ -1298,6 +1329,9 @@ public int CalculateSize() { if (payloadVariantCase_ == PayloadVariantOneofCase.SetRingtoneMessage) { size += 2 + pb::CodedOutputStream.ComputeStringSize(SetRingtoneMessage); } + if (payloadVariantCase_ == PayloadVariantOneofCase.RemoveByNodenum) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(RemoveByNodenum); + } if (payloadVariantCase_ == PayloadVariantOneofCase.BeginEditSettings) { size += 2 + 1; } @@ -1446,6 +1480,9 @@ public void MergeFrom(AdminMessage other) { case PayloadVariantOneofCase.SetRingtoneMessage: SetRingtoneMessage = other.SetRingtoneMessage; break; + case PayloadVariantOneofCase.RemoveByNodenum: + RemoveByNodenum = other.RemoveByNodenum; + break; case PayloadVariantOneofCase.BeginEditSettings: BeginEditSettings = other.BeginEditSettings; break; @@ -1649,6 +1686,10 @@ public void MergeFrom(pb::CodedInputStream input) { SetRingtoneMessage = input.ReadString(); break; } + case 304: { + RemoveByNodenum = input.ReadUInt32(); + break; + } case 512: { BeginEditSettings = input.ReadBool(); break; @@ -1858,6 +1899,10 @@ public void MergeFrom(pb::CodedInputStream input) { SetRingtoneMessage = input.ReadString(); break; } + case 304: { + RemoveByNodenum = input.ReadUInt32(); + break; + } case 512: { BeginEditSettings = input.ReadBool(); break; diff --git a/Meshtastic/Generated/Config.cs b/Meshtastic/Generated/Config.cs index 695469c..b3b8880 100644 --- a/Meshtastic/Generated/Config.cs +++ b/Meshtastic/Generated/Config.cs @@ -24,7 +24,7 @@ public static partial class ConfigReflection { static ConfigReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChdtZXNodGFzdGljL2NvbmZpZy5wcm90bxIKbWVzaHRhc3RpYyLZHAoGQ29u", + "ChdtZXNodGFzdGljL2NvbmZpZy5wcm90bxIKbWVzaHRhc3RpYyKVHQoGQ29u", "ZmlnEjEKBmRldmljZRgBIAEoCzIfLm1lc2h0YXN0aWMuQ29uZmlnLkRldmlj", "ZUNvbmZpZ0gAEjUKCHBvc2l0aW9uGAIgASgLMiEubWVzaHRhc3RpYy5Db25m", "aWcuUG9zaXRpb25Db25maWdIABIvCgVwb3dlchgDIAEoCzIeLm1lc2h0YXN0", @@ -33,87 +33,89 @@ static ConfigReflection() { "ASgLMiAubWVzaHRhc3RpYy5Db25maWcuRGlzcGxheUNvbmZpZ0gAEi0KBGxv", "cmEYBiABKAsyHS5tZXNodGFzdGljLkNvbmZpZy5Mb1JhQ29uZmlnSAASNwoJ", "Ymx1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+ "BwoDQU5aEAYSBgoCS1IQBxIGCgJUVxAIEgYKAlJVEAkSBgoCSU4QChIKCgZO", + "Wl84NjUQCxIGCgJUSBAMEgsKB0xPUkFfMjQQDRIKCgZVQV80MzMQDhIKCgZV", + "QV84NjgQDyKUAQoLTW9kZW1QcmVzZXQSDQoJTE9OR19GQVNUEAASDQoJTE9O", + "R19TTE9XEAESEgoOVkVSWV9MT05HX1NMT1cQAhIPCgtNRURJVU1fU0xPVxAD", + "Eg8KC01FRElVTV9GQVNUEAQSDgoKU0hPUlRfU0xPVxAFEg4KClNIT1JUX0ZB", + "U1QQBhIRCg1MT05HX01PREVSQVRFEAcarQEKD0JsdWV0b290aENvbmZpZxIP", + "CgdlbmFibGVkGAEgASgIEjwKBG1vZGUYAiABKA4yLi5tZXNodGFzdGljLkNv", + "bmZpZy5CbHVldG9vdGhDb25maWcuUGFpcmluZ01vZGUSEQoJZml4ZWRfcGlu", + "GAMgASgNIjgKC1BhaXJpbmdNb2RlEg4KClJBTkRPTV9QSU4QABINCglGSVhF", + "RF9QSU4QARIKCgZOT19QSU4QAkIRCg9wYXlsb2FkX3ZhcmlhbnRCYQoTY29t", + "LmdlZWtzdmlsbGUubWVzaEIMQ29uZmlnUHJvdG9zWiJnaXRodWIuY29tL21l", + "c2h0YXN0aWMvZ28vZ2VuZXJhdGVkqgIUTWVzaHRhc3RpYy5Qcm90b2J1ZnO6", + "AgBiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config), global::Meshtastic.Protobufs.Config.Parser, new[]{ "Device", "Position", "Power", "Network", "Display", "Lora", "Bluetooth" }, new[]{ "PayloadVariant" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig), global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Parser, new[]{ "Role", "SerialEnabled", "DebugLogEnabled", "ButtonGpio", "BuzzerGpio", "RebroadcastMode", "NodeInfoBroadcastSecs", "DoubleTapAsButtonPress", "IsManaged" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Types.Role), typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Types.RebroadcastMode) }, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.PositionConfig), global::Meshtastic.Protobufs.Config.Types.PositionConfig.Parser, new[]{ "PositionBroadcastSecs", "PositionBroadcastSmartEnabled", "FixedPosition", "GpsEnabled", "GpsUpdateInterval", "GpsAttemptTime", "PositionFlags", "RxGpio", "TxGpio", "BroadcastSmartMinimumDistance", "BroadcastSmartMinimumIntervalSecs" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.PositionConfig.Types.PositionFlags) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config), global::Meshtastic.Protobufs.Config.Parser, new[]{ "Device", "Position", "Power", "Network", "Display", "Lora", "Bluetooth" }, new[]{ "PayloadVariant" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig), global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Parser, new[]{ "Role", "SerialEnabled", "DebugLogEnabled", "ButtonGpio", "BuzzerGpio", "RebroadcastMode", "NodeInfoBroadcastSecs", "DoubleTapAsButtonPress", "IsManaged", "DisableTripleClick" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Types.Role), typeof(global::Meshtastic.Protobufs.Config.Types.DeviceConfig.Types.RebroadcastMode) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.PositionConfig), global::Meshtastic.Protobufs.Config.Types.PositionConfig.Parser, new[]{ "PositionBroadcastSecs", "PositionBroadcastSmartEnabled", "FixedPosition", "GpsEnabled", "GpsUpdateInterval", "GpsAttemptTime", "PositionFlags", "RxGpio", "TxGpio", "BroadcastSmartMinimumDistance", "BroadcastSmartMinimumIntervalSecs", "GpsEnGpio" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.PositionConfig.Types.PositionFlags) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.PowerConfig), global::Meshtastic.Protobufs.Config.Types.PowerConfig.Parser, new[]{ "IsPowerSaving", "OnBatteryShutdownAfterSecs", "AdcMultiplierOverride", "WaitBluetoothSecs", "SdsSecs", "LsSecs", "MinWakeSecs", "DeviceBatteryInaAddress" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.NetworkConfig), global::Meshtastic.Protobufs.Config.Types.NetworkConfig.Parser, new[]{ "WifiEnabled", "WifiSsid", "WifiPsk", "NtpServer", "EthEnabled", "AddressMode", "Ipv4Config", "RsyslogServer" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.NetworkConfig.Types.AddressMode) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.NetworkConfig.Types.IpV4Config), global::Meshtastic.Protobufs.Config.Types.NetworkConfig.Types.IpV4Config.Parser, new[]{ "Ip", "Gateway", "Subnet", "Dns" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Config.Types.DisplayConfig), global::Meshtastic.Protobufs.Config.Types.DisplayConfig.Parser, new[]{ "ScreenOnSecs", "GpsFormat", "AutoScreenCarouselSecs", "CompassNorthTop", "FlipScreen", "Units", "Oled", "Displaymode", "HeadingBold", "WakeOnTapOrMotion" }, null, new[]{ typeof(global::Meshtastic.Protobufs.Config.Types.DisplayConfig.Types.GpsCoordinateFormat), typeof(global::Meshtastic.Protobufs.Config.Types.DisplayConfig.Types.DisplayUnits), typeof(global::Meshtastic.Protobufs.Config.Types.DisplayConfig.Types.OledType), typeof(global::Meshtastic.Protobufs.Config.Types.DisplayConfig.Types.DisplayMode) }, null, null), @@ -725,6 +727,7 @@ public DeviceConfig(DeviceConfig other) : this() { nodeInfoBroadcastSecs_ = other.nodeInfoBroadcastSecs_; doubleTapAsButtonPress_ = other.doubleTapAsButtonPress_; isManaged_ = other.isManaged_; + disableTripleClick_ = other.disableTripleClick_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -883,6 +886,22 @@ public bool IsManaged { } } + /// Field number for the "disable_triple_click" field. + public const int DisableTripleClickFieldNumber = 10; + private bool disableTripleClick_; + /// + /// + /// Disables the triple-press of user button to enable or disable GPS + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DisableTripleClick { + get { return disableTripleClick_; } + set { + disableTripleClick_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -907,6 +926,7 @@ public bool Equals(DeviceConfig other) { if (NodeInfoBroadcastSecs != other.NodeInfoBroadcastSecs) return false; if (DoubleTapAsButtonPress != other.DoubleTapAsButtonPress) return false; if (IsManaged != other.IsManaged) return false; + if (DisableTripleClick != other.DisableTripleClick) return false; return Equals(_unknownFields, other._unknownFields); } @@ -923,6 +943,7 @@ public override int GetHashCode() { if (NodeInfoBroadcastSecs != 0) hash ^= NodeInfoBroadcastSecs.GetHashCode(); if (DoubleTapAsButtonPress != false) hash ^= DoubleTapAsButtonPress.GetHashCode(); if (IsManaged != false) hash ^= IsManaged.GetHashCode(); + if (DisableTripleClick != false) hash ^= DisableTripleClick.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -977,6 +998,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(72); output.WriteBool(IsManaged); } + if (DisableTripleClick != false) { + output.WriteRawTag(80); + output.WriteBool(DisableTripleClick); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1023,6 +1048,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(72); output.WriteBool(IsManaged); } + if (DisableTripleClick != false) { + output.WriteRawTag(80); + output.WriteBool(DisableTripleClick); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1060,6 +1089,9 @@ public int CalculateSize() { if (IsManaged != false) { size += 1 + 1; } + if (DisableTripleClick != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1099,6 +1131,9 @@ public void MergeFrom(DeviceConfig other) { if (other.IsManaged != false) { IsManaged = other.IsManaged; } + if (other.DisableTripleClick != false) { + DisableTripleClick = other.DisableTripleClick; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1150,6 +1185,10 @@ public void MergeFrom(pb::CodedInputStream input) { IsManaged = input.ReadBool(); break; } + case 80: { + DisableTripleClick = input.ReadBool(); + break; + } } } #endif @@ -1201,6 +1240,10 @@ public void MergeFrom(pb::CodedInputStream input) { IsManaged = input.ReadBool(); break; } + case 80: { + DisableTripleClick = input.ReadBool(); + break; + } } } } @@ -1252,14 +1295,26 @@ public enum Role { /// /// Tracker device role /// Position Mesh packets will be prioritized higher and sent more frequently by default. + /// When used in conjunction with power.is_power_saving = true, nodes will wake up, + /// send position, and then sleep for position.position_broadcast_secs seconds. /// [pbr::OriginalName("TRACKER")] Tracker = 5, /// /// /// Sensor device role /// Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + /// When used in conjunction with power.is_power_saving = true, nodes will wake up, + /// send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. /// [pbr::OriginalName("SENSOR")] Sensor = 6, + /// + /// + /// TAK device role + /// Used for nodes dedicated for connection to an ATAK EUD. + /// Turns off many of the routine broadcasts to favor CoT packet stream + /// from the Meshtastic ATAK plugin -> IMeshService -> Node + /// + [pbr::OriginalName("TAK")] Tak = 7, } /// @@ -1341,6 +1396,7 @@ public PositionConfig(PositionConfig other) : this() { txGpio_ = other.txGpio_; broadcastSmartMinimumDistance_ = other.broadcastSmartMinimumDistance_; broadcastSmartMinimumIntervalSecs_ = other.broadcastSmartMinimumIntervalSecs_; + gpsEnGpio_ = other.gpsEnGpio_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1535,6 +1591,22 @@ public uint BroadcastSmartMinimumIntervalSecs { } } + /// Field number for the "gps_en_gpio" field. + public const int GpsEnGpioFieldNumber = 12; + private uint gpsEnGpio_; + /// + /// + /// (Re)define PIN_GPS_EN for your board. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint GpsEnGpio { + get { return gpsEnGpio_; } + set { + gpsEnGpio_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -1561,6 +1633,7 @@ public bool Equals(PositionConfig other) { if (TxGpio != other.TxGpio) return false; if (BroadcastSmartMinimumDistance != other.BroadcastSmartMinimumDistance) return false; if (BroadcastSmartMinimumIntervalSecs != other.BroadcastSmartMinimumIntervalSecs) return false; + if (GpsEnGpio != other.GpsEnGpio) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1579,6 +1652,7 @@ public override int GetHashCode() { if (TxGpio != 0) hash ^= TxGpio.GetHashCode(); if (BroadcastSmartMinimumDistance != 0) hash ^= BroadcastSmartMinimumDistance.GetHashCode(); if (BroadcastSmartMinimumIntervalSecs != 0) hash ^= BroadcastSmartMinimumIntervalSecs.GetHashCode(); + if (GpsEnGpio != 0) hash ^= GpsEnGpio.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1641,6 +1715,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(88); output.WriteUInt32(BroadcastSmartMinimumIntervalSecs); } + if (GpsEnGpio != 0) { + output.WriteRawTag(96); + output.WriteUInt32(GpsEnGpio); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1695,6 +1773,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(88); output.WriteUInt32(BroadcastSmartMinimumIntervalSecs); } + if (GpsEnGpio != 0) { + output.WriteRawTag(96); + output.WriteUInt32(GpsEnGpio); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1738,6 +1820,9 @@ public int CalculateSize() { if (BroadcastSmartMinimumIntervalSecs != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BroadcastSmartMinimumIntervalSecs); } + if (GpsEnGpio != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(GpsEnGpio); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1783,6 +1868,9 @@ public void MergeFrom(PositionConfig other) { if (other.BroadcastSmartMinimumIntervalSecs != 0) { BroadcastSmartMinimumIntervalSecs = other.BroadcastSmartMinimumIntervalSecs; } + if (other.GpsEnGpio != 0) { + GpsEnGpio = other.GpsEnGpio; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1842,6 +1930,10 @@ public void MergeFrom(pb::CodedInputStream input) { BroadcastSmartMinimumIntervalSecs = input.ReadUInt32(); break; } + case 96: { + GpsEnGpio = input.ReadUInt32(); + break; + } } } #endif @@ -1901,6 +1993,10 @@ public void MergeFrom(pb::CodedInputStream input) { BroadcastSmartMinimumIntervalSecs = input.ReadUInt32(); break; } + case 96: { + GpsEnGpio = input.ReadUInt32(); + break; + } } } } @@ -4199,6 +4295,7 @@ public float FrequencyOffset { /// /// Maximum number of hops. This can't be greater than 7. /// Default of 3 + /// Attempting to set a value > 7 results in the default /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/Meshtastic/Generated/Mesh.cs b/Meshtastic/Generated/Mesh.cs index 75e3b3f..bb50aec 100644 --- a/Meshtastic/Generated/Mesh.cs +++ b/Meshtastic/Generated/Mesh.cs @@ -122,7 +122,7 @@ static MeshReflection() { "GAcgASgOMiQubWVzaHRhc3RpYy5Db25maWcuRGV2aWNlQ29uZmlnLlJvbGUS", "FgoOcG9zaXRpb25fZmxhZ3MYCCABKA0SKwoIaHdfbW9kZWwYCSABKA4yGS5t", "ZXNodGFzdGljLkhhcmR3YXJlTW9kZWwSGQoRaGFzUmVtb3RlSGFyZHdhcmUY", - "CiABKAgqhAYKDUhhcmR3YXJlTW9kZWwSCQoFVU5TRVQQABIMCghUTE9SQV9W", + "CiABKAgqmAYKDUhhcmR3YXJlTW9kZWwSCQoFVU5TRVQQABIMCghUTE9SQV9W", "MhABEgwKCFRMT1JBX1YxEAISEgoOVExPUkFfVjJfMV8xUDYQAxIJCgVUQkVB", "TRAEEg8KC0hFTFRFQ19WMl8wEAUSDgoKVEJFQU1fVjBQNxAGEgoKBlRfRUNI", "TxAHEhAKDFRMT1JBX1YxXzFQMxAIEgsKB1JBSzQ2MzEQCRIPCgtIRUxURUNf", @@ -138,17 +138,17 @@ static MeshReflection() { "Cg9CRVRBRlBWXzI0MDBfVFgQLRIXChNCRVRBRlBWXzkwMF9OQU5PX1RYEC4S", "DAoIUlBJX1BJQ08QLxIbChdIRUxURUNfV0lSRUxFU1NfVFJBQ0tFUhAwEhkK", "FUhFTFRFQ19XSVJFTEVTU19QQVBFUhAxEgoKBlRfREVDSxAyEg4KClRfV0FU", - "Q0hfUzMQMxIRCg1QSUNPTVBVVEVSX1MzEDQSDwoLSEVMVEVDX0hUNjIQNRIP", - "CgpQUklWQVRFX0hXEP8BKiwKCUNvbnN0YW50cxIICgRaRVJPEAASFQoQREFU", - "QV9QQVlMT0FEX0xFThDtASruAQoRQ3JpdGljYWxFcnJvckNvZGUSCAoETk9O", - "RRAAEg8KC1RYX1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+ "Yy5Qcm90b2J1ZnO6AgBiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Meshtastic.Protobufs.ChannelReflection.Descriptor, global::Meshtastic.Protobufs.ConfigReflection.Descriptor, global::Meshtastic.Protobufs.ModuleConfigReflection.Descriptor, global::Meshtastic.Protobufs.PortnumsReflection.Descriptor, global::Meshtastic.Protobufs.TelemetryReflection.Descriptor, global::Meshtastic.Protobufs.XmodemReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Meshtastic.Protobufs.HardwareModel), typeof(global::Meshtastic.Protobufs.Constants), typeof(global::Meshtastic.Protobufs.CriticalErrorCode), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -410,6 +410,11 @@ public enum HardwareModel { [pbr::OriginalName("HELTEC_HT62")] HeltecHt62 = 53, /// /// + /// EBYTE SPI LoRa module and ESP32-S3 + /// + [pbr::OriginalName("EBYTE_ESP32_S3")] EbyteEsp32S3 = 54, + /// + /// /// ------------------------------------------------------------------------------------------------------------------------------------------ /// 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. /// ------------------------------------------------------------------------------------------------------------------------------------------ @@ -636,9 +641,8 @@ public int Altitude { /// /// /// This is usually not sent over the mesh (to save space), but it is sent - /// from the phone so that the local device can set its RTC If it is sent over - /// the mesh (because there are devices on the mesh without GPS), it will only - /// be sent by devices which has a hardware GPS clock. + /// from the phone so that the local device can set its time if it is sent over + /// the mesh (because there are devices on the mesh without GPS or RTC). /// seconds since 1970 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/Meshtastic/Generated/ModuleConfig.cs b/Meshtastic/Generated/ModuleConfig.cs index f557232..d2da01a 100644 --- a/Meshtastic/Generated/ModuleConfig.cs +++ b/Meshtastic/Generated/ModuleConfig.cs @@ -25,7 +25,7 @@ static ModuleConfigReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Ch5tZXNodGFzdGljL21vZHVsZV9jb25maWcucHJvdG8SCm1lc2h0YXN0aWMi", - "5x4KDE1vZHVsZUNvbmZpZxIzCgRtcXR0GAEgASgLMiMubWVzaHRhc3RpYy5N", + "4h8KDE1vZHVsZUNvbmZpZxIzCgRtcXR0GAEgASgLMiMubWVzaHRhc3RpYy5N", "b2R1bGVDb25maWcuTVFUVENvbmZpZ0gAEjcKBnNlcmlhbBgCIAEoCzIlLm1l", "c2h0YXN0aWMuTW9kdWxlQ29uZmlnLlNlcmlhbENvbmZpZ0gAElQKFWV4dGVy", "bmFsX25vdGlmaWNhdGlvbhgDIAEoCzIzLm1lc2h0YXN0aWMuTW9kdWxlQ29u", @@ -78,7 +78,7 @@ static ModuleConfigReflection() { "C0JBVURfMTE1MjAwEAsSDwoLQkFVRF8yMzA0MDAQDBIPCgtCQVVEXzQ2MDgw", "MBANEg8KC0JBVURfNTc2MDAwEA4SDwoLQkFVRF85MjE2MDAQDyJVCgtTZXJp", "YWxfTW9kZRILCgdERUZBVUxUEAASCgoGU0lNUExFEAESCQoFUFJPVE8QAhIL", - "CgdURVhUTVNHEAMSCAoETk1FQRAEEgsKB0NBTFRPUE8QBRrOAgoaRXh0ZXJu", + "CgdURVhUTVNHEAMSCAoETk1FQRAEEgsKB0NBTFRPUE8QBRrpAgoaRXh0ZXJu", "YWxOb3RpZmljYXRpb25Db25maWcSDwoHZW5hYmxlZBgBIAEoCBIRCglvdXRw", "dXRfbXMYAiABKA0SDgoGb3V0cHV0GAMgASgNEhQKDG91dHB1dF92aWJyYRgI", "IAEoDRIVCg1vdXRwdXRfYnV6emVyGAkgASgNEg4KBmFjdGl2ZRgEIAEoCBIV", @@ -86,40 +86,42 @@ static ModuleConfigReflection() { "CiABKAgSHAoUYWxlcnRfbWVzc2FnZV9idXp6ZXIYCyABKAgSEgoKYWxlcnRf", "YmVsbBgGIAEoCBIYChBhbGVydF9iZWxsX3ZpYnJhGAwgASgIEhkKEWFsZXJ0", "X2JlbGxfYnV6emVyGA0gASgIEg8KB3VzZV9wd20YByABKAgSEwoLbmFnX3Rp", - "bWVvdXQYDiABKA0ahAEKElN0b3JlRm9yd2FyZENvbmZpZxIPCgdlbmFibGVk", - "GAEgASgIEhEKCWhlYXJ0YmVhdBgCIAEoCBIPCgdyZWNvcmRzGAMgASgNEhoK", - "Emhpc3RvcnlfcmV0dXJuX21heBgEIAEoDRIdChVoaXN0b3J5X3JldHVybl93", - "aW5kb3cYBSABKA0aQAoPUmFuZ2VUZXN0Q29uZmlnEg8KB2VuYWJsZWQYASAB", - "KAgSDgoGc2VuZGVyGAIgASgNEgwKBHNhdmUYAyABKAgahgIKD1RlbGVtZXRy", - "eUNvbmZpZxIeChZkZXZpY2VfdXBkYXRlX2ludGVydmFsGAEgASgNEiMKG2Vu", - "dmlyb25tZW50X3VwZGF0ZV9pbnRlcnZhbBgCIAEoDRInCh9lbnZpcm9ubWVu", - "dF9tZWFzdXJlbWVudF9lbmFibGVkGAMgASgIEiIKGmVudmlyb25tZW50X3Nj", - "cmVlbl9lbmFibGVkGAQgASgIEiYKHmVudmlyb25tZW50X2Rpc3BsYXlfZmFo", - "cmVuaGVpdBgFIAEoCBIbChNhaXJfcXVhbGl0eV9lbmFibGVkGAYgASgIEhwK", - "FGFpcl9xdWFsaXR5X2ludGVydmFsGAcgASgNGtYEChNDYW5uZWRNZXNzYWdl", - "Q29uZmlnEhcKD3JvdGFyeTFfZW5hYmxlZBgBIAEoCBIZChFpbnB1dGJyb2tl", - "cl9waW5fYRgCIAEoDRIZChFpbnB1dGJyb2tlcl9waW5fYhgDIAEoDRIdChVp", - "bnB1dGJyb2tlcl9waW5fcHJlc3MYBCABKA0SWQoUaW5wdXRicm9rZXJfZXZl", - "bnRfY3cYBSABKA4yOy5tZXNodGFzdGljLk1vZHVsZUNvbmZpZy5DYW5uZWRN", - "ZXNzYWdlQ29uZmlnLklucHV0RXZlbnRDaGFyEloKFWlucHV0YnJva2VyX2V2", - "ZW50X2NjdxgGIAEo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dXQYDiABKA0SGQoRdXNlX2kyc19hc19idXp6ZXIYDyABKAgahAEKElN0", + "b3JlRm9yd2FyZENvbmZpZxIPCgdlbmFibGVkGAEgASgIEhEKCWhlYXJ0YmVh", + "dBgCIAEoCBIPCgdyZWNvcmRzGAMgASgNEhoKEmhpc3RvcnlfcmV0dXJuX21h", + "eBgEIAEoDRIdChVoaXN0b3J5X3JldHVybl93aW5kb3cYBSABKA0aQAoPUmFu", + "Z2VUZXN0Q29uZmlnEg8KB2VuYWJsZWQYASABKAgSDgoGc2VuZGVyGAIgASgN", + "EgwKBHNhdmUYAyABKAga5gIKD1RlbGVtZXRyeUNvbmZpZxIeChZkZXZpY2Vf", + "dXBkYXRlX2ludGVydmFsGAEgASgNEiMKG2Vudmlyb25tZW50X3VwZGF0ZV9p", + "bnRlcnZhbBgCIAEoDRInCh9lbnZpcm9ubWVudF9tZWFzdXJlbWVudF9lbmFi", + "bGVkGAMgASgIEiIKGmVudmlyb25tZW50X3NjcmVlbl9lbmFibGVkGAQgASgI", + "EiYKHmVudmlyb25tZW50X2Rpc3BsYXlfZmFocmVuaGVpdBgFIAEoCBIbChNh", + "aXJfcXVhbGl0eV9lbmFibGVkGAYgASgIEhwKFGFpcl9xdWFsaXR5X2ludGVy", + "dmFsGAcgASgNEiEKGXBvd2VyX21lYXN1cmVtZW50X2VuYWJsZWQYCCABKAgS", + "HQoVcG93ZXJfdXBkYXRlX2ludGVydmFsGAkgASgNEhwKFHBvd2VyX3NjcmVl", + "bl9lbmFibGVkGAogASgIGtYEChNDYW5uZWRNZXNzYWdlQ29uZmlnEhcKD3Jv", + "dGFyeTFfZW5hYmxlZBgBIAEoCBIZChFpbnB1dGJyb2tlcl9waW5fYRgCIAEo", + "DRIZChFpbnB1dGJyb2tlcl9waW5fYhgDIAEoDRIdChVpbnB1dGJyb2tlcl9w", + "aW5fcHJlc3MYBCABKA0SWQoUaW5wdXRicm9rZXJfZXZlbnRfY3cYBSABKA4y", + "Oy5tZXNodGFzdGljLk1vZHVsZUNvbmZpZy5DYW5uZWRNZXNzYWdlQ29uZmln", + "LklucHV0RXZlbnRDaGFyEloKFWlucHV0YnJva2VyX2V2ZW50X2NjdxgGIAEo", + "DjI7Lm1lc2h0YXN0aWMuTW9kdWxlQ29uZmlnLkNhbm5lZE1lc3NhZ2VDb25m", + "aWcuSW5wdXRFdmVudENoYXISXAoXaW5wdXRicm9rZXJfZXZlbnRfcHJlc3MY", + "ByABKA4yOy5tZXNodGFzdGljLk1vZHVsZUNvbmZpZy5DYW5uZWRNZXNzYWdl", + "Q29uZmlnLklucHV0RXZlbnRDaGFyEhcKD3VwZG93bjFfZW5hYmxlZBgIIAEo", + "CBIPCgdlbmFibGVkGAkgASgIEhoKEmFsbG93X2lucHV0X3NvdXJjZRgKIAEo", + "CRIRCglzZW5kX2JlbGwYCyABKAgiYwoOSW5wdXRFdmVudENoYXISCAoETk9O", + "RRAAEgYKAlVQEBESCAoERE9XThASEggKBExFRlQQExIJCgVSSUdIVBAUEgoK", + "BlNFTEVDVBAKEggKBEJBQ0sQGxIKCgZDQU5DRUwQGBplChVBbWJpZW50TGln", + "aHRpbmdDb25maWcSEQoJbGVkX3N0YXRlGAEgASgIEg8KB2N1cnJlbnQYAiAB", + "KA0SCwoDcmVkGAMgASgNEg0KBWdyZWVuGAQgASgNEgwKBGJsdWUYBSABKA1C", + "EQoPcGF5bG9hZF92YXJpYW50ImQKEVJlbW90ZUhhcmR3YXJlUGluEhAKCGdw", + "aW9fcGluGAEgASgNEgwKBG5hbWUYAiABKAkSLwoEdHlwZRgDIAEoDjIhLm1l", + "c2h0YXN0aWMuUmVtb3RlSGFyZHdhcmVQaW5UeXBlKkkKFVJlbW90ZUhhcmR3", + "YXJlUGluVHlwZRILCgdVTktOT1dOEAASEAoMRElHSVRBTF9SRUFEEAESEQoN", + "RElHSVRBTF9XUklURRACQmcKE2NvbS5nZWVrc3ZpbGxlLm1lc2hCEk1vZHVs", + "ZUNvbmZpZ1Byb3Rvc1oiZ2l0aHViLmNvbS9tZXNodGFzdGljL2dvL2dlbmVy", + "YXRlZKoCFE1lc2h0YXN0aWMuUHJvdG9idWZzugIAYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Meshtastic.Protobufs.RemoteHardwarePinType), }, null, new pbr::GeneratedClrTypeInfo[] { @@ -129,10 +131,10 @@ static ModuleConfigReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.DetectionSensorConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.DetectionSensorConfig.Parser, new[]{ "Enabled", "MinimumBroadcastSecs", "StateBroadcastSecs", "SendBell", "Name", "MonitorPin", "DetectionTriggeredHigh", "UsePullup" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.AudioConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.AudioConfig.Parser, new[]{ "Codec2Enabled", "PttPin", "Bitrate", "I2SWs", "I2SSd", "I2SDin", "I2SSck" }, null, new[]{ typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.AudioConfig.Types.Audio_Baud) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.SerialConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.SerialConfig.Parser, new[]{ "Enabled", "Echo", "Rxd", "Txd", "Baud", "Timeout", "Mode", "OverrideConsoleSerialPort" }, null, new[]{ typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.SerialConfig.Types.Serial_Baud), typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.SerialConfig.Types.Serial_Mode) }, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.ExternalNotificationConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.ExternalNotificationConfig.Parser, new[]{ "Enabled", "OutputMs", "Output", "OutputVibra", "OutputBuzzer", "Active", "AlertMessage", "AlertMessageVibra", "AlertMessageBuzzer", "AlertBell", "AlertBellVibra", "AlertBellBuzzer", "UsePwm", "NagTimeout" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.ExternalNotificationConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.ExternalNotificationConfig.Parser, new[]{ "Enabled", "OutputMs", "Output", "OutputVibra", "OutputBuzzer", "Active", "AlertMessage", "AlertMessageVibra", "AlertMessageBuzzer", "AlertBell", "AlertBellVibra", "AlertBellBuzzer", "UsePwm", "NagTimeout", "UseI2SAsBuzzer" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.StoreForwardConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.StoreForwardConfig.Parser, new[]{ "Enabled", "Heartbeat", "Records", "HistoryReturnMax", "HistoryReturnWindow" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.RangeTestConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.RangeTestConfig.Parser, new[]{ "Enabled", "Sender", "Save" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.TelemetryConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.TelemetryConfig.Parser, new[]{ "DeviceUpdateInterval", "EnvironmentUpdateInterval", "EnvironmentMeasurementEnabled", "EnvironmentScreenEnabled", "EnvironmentDisplayFahrenheit", "AirQualityEnabled", "AirQualityInterval" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.TelemetryConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.TelemetryConfig.Parser, new[]{ "DeviceUpdateInterval", "EnvironmentUpdateInterval", "EnvironmentMeasurementEnabled", "EnvironmentScreenEnabled", "EnvironmentDisplayFahrenheit", "AirQualityEnabled", "AirQualityInterval", "PowerMeasurementEnabled", "PowerUpdateInterval", "PowerScreenEnabled" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.CannedMessageConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.CannedMessageConfig.Parser, new[]{ "Rotary1Enabled", "InputbrokerPinA", "InputbrokerPinB", "InputbrokerPinPress", "InputbrokerEventCw", "InputbrokerEventCcw", "InputbrokerEventPress", "Updown1Enabled", "Enabled", "AllowInputSource", "SendBell" }, null, new[]{ typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.CannedMessageConfig.Types.InputEventChar) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.ModuleConfig.Types.AmbientLightingConfig), global::Meshtastic.Protobufs.ModuleConfig.Types.AmbientLightingConfig.Parser, new[]{ "LedState", "Current", "Red", "Green", "Blue" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.RemoteHardwarePin), global::Meshtastic.Protobufs.RemoteHardwarePin.Parser, new[]{ "GpioPin", "Name", "Type" }, null, null, null, null) @@ -3618,6 +3620,7 @@ public ExternalNotificationConfig(ExternalNotificationConfig other) : this() { alertBellBuzzer_ = other.alertBellBuzzer_; usePwm_ = other.usePwm_; nagTimeout_ = other.nagTimeout_; + useI2SAsBuzzer_ = other.useI2SAsBuzzer_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3861,6 +3864,23 @@ public uint NagTimeout { } } + /// Field number for the "use_i2s_as_buzzer" field. + public const int UseI2SAsBuzzerFieldNumber = 15; + private bool useI2SAsBuzzer_; + /// + /// + /// When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer + /// T-Watch S3 and T-Deck for example have this capability + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UseI2SAsBuzzer { + get { return useI2SAsBuzzer_; } + set { + useI2SAsBuzzer_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -3890,6 +3910,7 @@ public bool Equals(ExternalNotificationConfig other) { if (AlertBellBuzzer != other.AlertBellBuzzer) return false; if (UsePwm != other.UsePwm) return false; if (NagTimeout != other.NagTimeout) return false; + if (UseI2SAsBuzzer != other.UseI2SAsBuzzer) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3911,6 +3932,7 @@ public override int GetHashCode() { if (AlertBellBuzzer != false) hash ^= AlertBellBuzzer.GetHashCode(); if (UsePwm != false) hash ^= UsePwm.GetHashCode(); if (NagTimeout != 0) hash ^= NagTimeout.GetHashCode(); + if (UseI2SAsBuzzer != false) hash ^= UseI2SAsBuzzer.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3985,6 +4007,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(112); output.WriteUInt32(NagTimeout); } + if (UseI2SAsBuzzer != false) { + output.WriteRawTag(120); + output.WriteBool(UseI2SAsBuzzer); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -4051,6 +4077,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(112); output.WriteUInt32(NagTimeout); } + if (UseI2SAsBuzzer != false) { + output.WriteRawTag(120); + output.WriteBool(UseI2SAsBuzzer); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -4103,6 +4133,9 @@ public int CalculateSize() { if (NagTimeout != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NagTimeout); } + if (UseI2SAsBuzzer != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4157,6 +4190,9 @@ public void MergeFrom(ExternalNotificationConfig other) { if (other.NagTimeout != 0) { NagTimeout = other.NagTimeout; } + if (other.UseI2SAsBuzzer != false) { + UseI2SAsBuzzer = other.UseI2SAsBuzzer; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4228,6 +4264,10 @@ public void MergeFrom(pb::CodedInputStream input) { NagTimeout = input.ReadUInt32(); break; } + case 120: { + UseI2SAsBuzzer = input.ReadBool(); + break; + } } } #endif @@ -4299,6 +4339,10 @@ public void MergeFrom(pb::CodedInputStream input) { NagTimeout = input.ReadUInt32(); break; } + case 120: { + UseI2SAsBuzzer = input.ReadBool(); + break; + } } } } @@ -4992,6 +5036,9 @@ public TelemetryConfig(TelemetryConfig other) : this() { environmentDisplayFahrenheit_ = other.environmentDisplayFahrenheit_; airQualityEnabled_ = other.airQualityEnabled_; airQualityInterval_ = other.airQualityInterval_; + powerMeasurementEnabled_ = other.powerMeasurementEnabled_; + powerUpdateInterval_ = other.powerUpdateInterval_; + powerScreenEnabled_ = other.powerScreenEnabled_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -5113,6 +5160,57 @@ public uint AirQualityInterval { } } + /// Field number for the "power_measurement_enabled" field. + public const int PowerMeasurementEnabledFieldNumber = 8; + private bool powerMeasurementEnabled_; + /// + /// + /// Interval in seconds of how often we should try to send our + /// air quality metrics to the mesh + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PowerMeasurementEnabled { + get { return powerMeasurementEnabled_; } + set { + powerMeasurementEnabled_ = value; + } + } + + /// Field number for the "power_update_interval" field. + public const int PowerUpdateIntervalFieldNumber = 9; + private uint powerUpdateInterval_; + /// + /// + /// Interval in seconds of how often we should try to send our + /// air quality metrics to the mesh + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint PowerUpdateInterval { + get { return powerUpdateInterval_; } + set { + powerUpdateInterval_ = value; + } + } + + /// Field number for the "power_screen_enabled" field. + public const int PowerScreenEnabledFieldNumber = 10; + private bool powerScreenEnabled_; + /// + /// + /// Interval in seconds of how often we should try to send our + /// air quality metrics to the mesh + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PowerScreenEnabled { + get { return powerScreenEnabled_; } + set { + powerScreenEnabled_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -5135,6 +5233,9 @@ public bool Equals(TelemetryConfig other) { if (EnvironmentDisplayFahrenheit != other.EnvironmentDisplayFahrenheit) return false; if (AirQualityEnabled != other.AirQualityEnabled) return false; if (AirQualityInterval != other.AirQualityInterval) return false; + if (PowerMeasurementEnabled != other.PowerMeasurementEnabled) return false; + if (PowerUpdateInterval != other.PowerUpdateInterval) return false; + if (PowerScreenEnabled != other.PowerScreenEnabled) return false; return Equals(_unknownFields, other._unknownFields); } @@ -5149,6 +5250,9 @@ public override int GetHashCode() { if (EnvironmentDisplayFahrenheit != false) hash ^= EnvironmentDisplayFahrenheit.GetHashCode(); if (AirQualityEnabled != false) hash ^= AirQualityEnabled.GetHashCode(); if (AirQualityInterval != 0) hash ^= AirQualityInterval.GetHashCode(); + if (PowerMeasurementEnabled != false) hash ^= PowerMeasurementEnabled.GetHashCode(); + if (PowerUpdateInterval != 0) hash ^= PowerUpdateInterval.GetHashCode(); + if (PowerScreenEnabled != false) hash ^= PowerScreenEnabled.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5195,6 +5299,18 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(56); output.WriteUInt32(AirQualityInterval); } + if (PowerMeasurementEnabled != false) { + output.WriteRawTag(64); + output.WriteBool(PowerMeasurementEnabled); + } + if (PowerUpdateInterval != 0) { + output.WriteRawTag(72); + output.WriteUInt32(PowerUpdateInterval); + } + if (PowerScreenEnabled != false) { + output.WriteRawTag(80); + output.WriteBool(PowerScreenEnabled); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -5233,6 +5349,18 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(56); output.WriteUInt32(AirQualityInterval); } + if (PowerMeasurementEnabled != false) { + output.WriteRawTag(64); + output.WriteBool(PowerMeasurementEnabled); + } + if (PowerUpdateInterval != 0) { + output.WriteRawTag(72); + output.WriteUInt32(PowerUpdateInterval); + } + if (PowerScreenEnabled != false) { + output.WriteRawTag(80); + output.WriteBool(PowerScreenEnabled); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -5264,6 +5392,15 @@ public int CalculateSize() { if (AirQualityInterval != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(AirQualityInterval); } + if (PowerMeasurementEnabled != false) { + size += 1 + 1; + } + if (PowerUpdateInterval != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(PowerUpdateInterval); + } + if (PowerScreenEnabled != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -5297,6 +5434,15 @@ public void MergeFrom(TelemetryConfig other) { if (other.AirQualityInterval != 0) { AirQualityInterval = other.AirQualityInterval; } + if (other.PowerMeasurementEnabled != false) { + PowerMeasurementEnabled = other.PowerMeasurementEnabled; + } + if (other.PowerUpdateInterval != 0) { + PowerUpdateInterval = other.PowerUpdateInterval; + } + if (other.PowerScreenEnabled != false) { + PowerScreenEnabled = other.PowerScreenEnabled; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -5340,6 +5486,18 @@ public void MergeFrom(pb::CodedInputStream input) { AirQualityInterval = input.ReadUInt32(); break; } + case 64: { + PowerMeasurementEnabled = input.ReadBool(); + break; + } + case 72: { + PowerUpdateInterval = input.ReadUInt32(); + break; + } + case 80: { + PowerScreenEnabled = input.ReadBool(); + break; + } } } #endif @@ -5383,6 +5541,18 @@ public void MergeFrom(pb::CodedInputStream input) { AirQualityInterval = input.ReadUInt32(); break; } + case 64: { + PowerMeasurementEnabled = input.ReadBool(); + break; + } + case 72: { + PowerUpdateInterval = input.ReadUInt32(); + break; + } + case 80: { + PowerScreenEnabled = input.ReadBool(); + break; + } } } } @@ -6055,6 +6225,7 @@ public enum InputEventChar { } /// + /// ///Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. ///Initially created for the RAK14001 RGB LED module. /// @@ -6110,7 +6281,8 @@ public AmbientLightingConfig Clone() { public const int LedStateFieldNumber = 1; private bool ledState_; /// - ///Sets LED to on or off. + /// + /// Sets LED to on or off. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -6125,7 +6297,8 @@ public bool LedState { public const int CurrentFieldNumber = 2; private uint current_; /// - ///Sets the overall current for the LED, firmware side range for the RAK14001 is 1-31, but users should be given a range of 0-100% + /// + /// Sets the current for the LED output. Default is 10. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -6140,7 +6313,8 @@ public uint Current { public const int RedFieldNumber = 3; private uint red_; /// - /// Red level + /// + /// Sets the red LED level. Values are 0-255. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -6155,7 +6329,8 @@ public uint Red { public const int GreenFieldNumber = 4; private uint green_; /// - ///Sets the green level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% + /// + /// Sets the green LED level. Values are 0-255. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -6170,7 +6345,8 @@ public uint Green { public const int BlueFieldNumber = 5; private uint blue_; /// - ///Sets the blue level of the LED, firmware side values are 0-255, but users should be given a range of 0-100% + /// + /// Sets the blue LED level. Values are 0-255. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] diff --git a/Meshtastic/Generated/Portnums.cs b/Meshtastic/Generated/Portnums.cs index 2e89763..9d346fc 100644 --- a/Meshtastic/Generated/Portnums.cs +++ b/Meshtastic/Generated/Portnums.cs @@ -141,6 +141,7 @@ public enum PortNum { /// /// /// Same as Text Message but originating from Detection Sensor Module. + /// NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 /// [pbr::OriginalName("DETECTION_SENSOR_APP")] DetectionSensorApp = 10, /// @@ -177,6 +178,7 @@ public enum PortNum { /// /// Optional port for messages for the range test module. /// ENCODING: ASCII Plaintext + /// NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 /// [pbr::OriginalName("RANGE_TEST_APP")] RangeTestApp = 66, /// diff --git a/Meshtastic/Generated/Telemetry.cs b/Meshtastic/Generated/Telemetry.cs index 500639f..2f77098 100644 --- a/Meshtastic/Generated/Telemetry.cs +++ b/Meshtastic/Generated/Telemetry.cs @@ -30,33 +30,39 @@ static TelemetryReflection() { "dGlsX3R4GAQgASgCIpsBChJFbnZpcm9ubWVudE1ldHJpY3MSEwoLdGVtcGVy", "YXR1cmUYASABKAISGQoRcmVsYXRpdmVfaHVtaWRpdHkYAiABKAISGwoTYmFy", "b21ldHJpY19wcmVzc3VyZRgDIAEoAhIWCg5nYXNfcmVzaXN0YW5jZRgEIAEo", - "AhIPCgd2b2x0YWdlGAUgASgCEg8KB2N1cnJlbnQYBiABKAIivwIKEUFpclF1", - "YWxpdHlNZXRyaWNzEhUKDXBtMTBfc3RhbmRhcmQYASABKA0SFQoNcG0yNV9z", - "dGFuZGFyZBgCIAEoDRIWCg5wbTEwMF9zdGFuZGFyZBgDIAEoDRIaChJwbTEw", - "X2Vudmlyb25tZW50YWwYBCABKA0SGgoScG0yNV9lbnZpcm9ubWVudGFsGAUg", - "ASgNEhsKE3BtMTAwX2Vudmlyb25tZW50YWwYBiABKA0SFgoOcGFydGljbGVz", - "XzAzdW0YByABKA0SFg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ZJTkEyMTkQBRIKCgZCTVAyODAQBhIJCgVTSFRDMxAHEgkKBUxQ", + "UzIyEAgSCwoHUU1DNjMxMBAJEgsKB1FNSTg2NTgQChIMCghRTUM1ODgzTBAL", + "EgkKBVNIVDMxEAwSDAoIUE1TQTAwM0kQDRILCgdJTkEzMjIxEA5CZAoTY29t", + "LmdlZWtzdmlsbGUubWVzaEIPVGVsZW1ldHJ5UHJvdG9zWiJnaXRodWIuY29t", + "L21lc2h0YXN0aWMvZ28vZ2VuZXJhdGVkqgIUTWVzaHRhc3RpYy5Qcm90b2J1", + "ZnO6AgBiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Meshtastic.Protobufs.TelemetrySensorType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.DeviceMetrics), global::Meshtastic.Protobufs.DeviceMetrics.Parser, new[]{ "BatteryLevel", "Voltage", "ChannelUtilization", "AirUtilTx" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.EnvironmentMetrics), global::Meshtastic.Protobufs.EnvironmentMetrics.Parser, new[]{ "Temperature", "RelativeHumidity", "BarometricPressure", "GasResistance", "Voltage", "Current" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.PowerMetrics), global::Meshtastic.Protobufs.PowerMetrics.Parser, new[]{ "Ch1Voltage", "Ch1Current", "Ch2Voltage", "Ch2Current", "Ch3Voltage", "Ch3Current" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.AirQualityMetrics), global::Meshtastic.Protobufs.AirQualityMetrics.Parser, new[]{ "Pm10Standard", "Pm25Standard", "Pm100Standard", "Pm10Environmental", "Pm25Environmental", "Pm100Environmental", "Particles03Um", "Particles05Um", "Particles10Um", "Particles25Um", "Particles50Um", "Particles100Um" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Telemetry), global::Meshtastic.Protobufs.Telemetry.Parser, new[]{ "Time", "DeviceMetrics", "EnvironmentMetrics", "AirQualityMetrics" }, new[]{ "Variant" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.Telemetry), global::Meshtastic.Protobufs.Telemetry.Parser, new[]{ "Time", "DeviceMetrics", "EnvironmentMetrics", "AirQualityMetrics", "PowerMetrics" }, new[]{ "Variant" }, null, null, null) })); } #endregion @@ -64,88 +70,93 @@ static TelemetryReflection() { } #region Enums /// - /// - /// Supported I2C Sensors for telemetry in Meshtastic + /// + /// Supported I2C Sensors for telemetry in Meshtastic /// public enum TelemetrySensorType { /// - /// - /// No external telemetry sensor explicitly set + /// + /// No external telemetry sensor explicitly set /// [pbr::OriginalName("SENSOR_UNSET")] SensorUnset = 0, /// - /// - /// High accuracy temperature, pressure, humidity + /// + /// High accuracy temperature, pressure, humidity /// [pbr::OriginalName("BME280")] Bme280 = 1, /// - /// - /// High accuracy temperature, pressure, humidity, and air resistance + /// + /// High accuracy temperature, pressure, humidity, and air resistance /// [pbr::OriginalName("BME680")] Bme680 = 2, /// - /// - /// Very high accuracy temperature + /// + /// Very high accuracy temperature /// [pbr::OriginalName("MCP9808")] Mcp9808 = 3, /// - /// - /// Moderate accuracy current and voltage + /// + /// Moderate accuracy current and voltage /// [pbr::OriginalName("INA260")] Ina260 = 4, /// - /// - /// Moderate accuracy current and voltage + /// + /// Moderate accuracy current and voltage /// [pbr::OriginalName("INA219")] Ina219 = 5, /// - /// - /// High accuracy temperature and pressure + /// + /// High accuracy temperature and pressure /// [pbr::OriginalName("BMP280")] Bmp280 = 6, /// - /// - /// High accuracy temperature and humidity + /// + /// High accuracy temperature and humidity /// [pbr::OriginalName("SHTC3")] Shtc3 = 7, /// - /// - /// High accuracy pressure + /// + /// High accuracy pressure /// [pbr::OriginalName("LPS22")] Lps22 = 8, /// - /// - /// 3-Axis magnetic sensor + /// + /// 3-Axis magnetic sensor /// [pbr::OriginalName("QMC6310")] Qmc6310 = 9, /// - /// - /// 6-Axis inertial measurement sensor + /// + /// 6-Axis inertial measurement sensor /// [pbr::OriginalName("QMI8658")] Qmi8658 = 10, /// - /// - /// 3-Axis magnetic sensor + /// + /// 3-Axis magnetic sensor /// [pbr::OriginalName("QMC5883L")] Qmc5883L = 11, /// - /// - /// High accuracy temperature and humidity + /// + /// High accuracy temperature and humidity /// [pbr::OriginalName("SHT31")] Sht31 = 12, /// - /// - /// PM2.5 air quality sensor + /// + /// PM2.5 air quality sensor /// [pbr::OriginalName("PMSA003I")] Pmsa003I = 13, + /// + /// + /// INA3221 3 Channel Voltage / Current Sensor + /// + [pbr::OriginalName("INA3221")] Ina3221 = 14, } #endregion #region Messages /// - /// - /// Key native device metrics such as battery level + /// + /// Key native device metrics such as battery level /// public sealed partial class DeviceMetrics : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -198,8 +209,8 @@ public DeviceMetrics Clone() { public const int BatteryLevelFieldNumber = 1; private uint batteryLevel_; /// - /// - /// 0-100 (>100 means powered) + /// + /// 0-100 (>100 means powered) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -214,8 +225,8 @@ public uint BatteryLevel { public const int VoltageFieldNumber = 2; private float voltage_; /// - /// - /// Voltage measured + /// + /// Voltage measured /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -230,8 +241,8 @@ public float Voltage { public const int ChannelUtilizationFieldNumber = 3; private float channelUtilization_; /// - /// - /// Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + /// + /// Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -246,8 +257,8 @@ public float ChannelUtilization { public const int AirUtilTxFieldNumber = 4; private float airUtilTx_; /// - /// - /// Percent of airtime for transmission used within the last hour. + /// + /// Percent of airtime for transmission used within the last hour. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -464,8 +475,8 @@ public void MergeFrom(pb::CodedInputStream input) { } /// - /// - /// Weather station or other environmental metrics + /// + /// Weather station or other environmental metrics /// public sealed partial class EnvironmentMetrics : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -520,8 +531,8 @@ public EnvironmentMetrics Clone() { public const int TemperatureFieldNumber = 1; private float temperature_; /// - /// - /// Temperature measured + /// + /// Temperature measured /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -536,8 +547,8 @@ public float Temperature { public const int RelativeHumidityFieldNumber = 2; private float relativeHumidity_; /// - /// - /// Relative humidity percent measured + /// + /// Relative humidity percent measured /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -552,8 +563,8 @@ public float RelativeHumidity { public const int BarometricPressureFieldNumber = 3; private float barometricPressure_; /// - /// - /// Barometric pressure in hPA measured + /// + /// Barometric pressure in hPA measured /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -568,8 +579,8 @@ public float BarometricPressure { public const int GasResistanceFieldNumber = 4; private float gasResistance_; /// - /// - /// Gas resistance in MOhm measured + /// + /// Gas resistance in MOhm measured /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -584,8 +595,8 @@ public float GasResistance { public const int VoltageFieldNumber = 5; private float voltage_; /// - /// - /// Voltage measured + /// + /// Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -600,8 +611,8 @@ public float Voltage { public const int CurrentFieldNumber = 6; private float current_; /// - /// - /// Current measured + /// + /// Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -866,8 +877,410 @@ public void MergeFrom(pb::CodedInputStream input) { } /// - /// - /// Air quality metrics + /// + /// Power Metrics (voltage / current / etc) + /// + public sealed partial class PowerMetrics : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PowerMetrics()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Meshtastic.Protobufs.TelemetryReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PowerMetrics() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PowerMetrics(PowerMetrics other) : this() { + ch1Voltage_ = other.ch1Voltage_; + ch1Current_ = other.ch1Current_; + ch2Voltage_ = other.ch2Voltage_; + ch2Current_ = other.ch2Current_; + ch3Voltage_ = other.ch3Voltage_; + ch3Current_ = other.ch3Current_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PowerMetrics Clone() { + return new PowerMetrics(this); + } + + /// Field number for the "ch1_voltage" field. + public const int Ch1VoltageFieldNumber = 1; + private float ch1Voltage_; + /// + /// + /// Voltage (Ch1) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch1Voltage { + get { return ch1Voltage_; } + set { + ch1Voltage_ = value; + } + } + + /// Field number for the "ch1_current" field. + public const int Ch1CurrentFieldNumber = 2; + private float ch1Current_; + /// + /// + /// Current (Ch1) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch1Current { + get { return ch1Current_; } + set { + ch1Current_ = value; + } + } + + /// Field number for the "ch2_voltage" field. + public const int Ch2VoltageFieldNumber = 3; + private float ch2Voltage_; + /// + /// + /// Voltage (Ch2) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch2Voltage { + get { return ch2Voltage_; } + set { + ch2Voltage_ = value; + } + } + + /// Field number for the "ch2_current" field. + public const int Ch2CurrentFieldNumber = 4; + private float ch2Current_; + /// + /// + /// Current (Ch2) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch2Current { + get { return ch2Current_; } + set { + ch2Current_ = value; + } + } + + /// Field number for the "ch3_voltage" field. + public const int Ch3VoltageFieldNumber = 5; + private float ch3Voltage_; + /// + /// + /// Voltage (Ch3) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch3Voltage { + get { return ch3Voltage_; } + set { + ch3Voltage_ = value; + } + } + + /// Field number for the "ch3_current" field. + public const int Ch3CurrentFieldNumber = 6; + private float ch3Current_; + /// + /// + /// Current (Ch3) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public float Ch3Current { + get { return ch3Current_; } + set { + ch3Current_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PowerMetrics); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PowerMetrics other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch1Voltage, other.Ch1Voltage)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch1Current, other.Ch1Current)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch2Voltage, other.Ch2Voltage)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch2Current, other.Ch2Current)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch3Voltage, other.Ch3Voltage)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ch3Current, other.Ch3Current)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Ch1Voltage != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch1Voltage); + if (Ch1Current != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch1Current); + if (Ch2Voltage != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch2Voltage); + if (Ch2Current != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch2Current); + if (Ch3Voltage != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch3Voltage); + if (Ch3Current != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ch3Current); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Ch1Voltage != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Ch1Voltage); + } + if (Ch1Current != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Ch1Current); + } + if (Ch2Voltage != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Ch2Voltage); + } + if (Ch2Current != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Ch2Current); + } + if (Ch3Voltage != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Ch3Voltage); + } + if (Ch3Current != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Ch3Current); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Ch1Voltage != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Ch1Voltage); + } + if (Ch1Current != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Ch1Current); + } + if (Ch2Voltage != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Ch2Voltage); + } + if (Ch2Current != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Ch2Current); + } + if (Ch3Voltage != 0F) { + output.WriteRawTag(45); + output.WriteFloat(Ch3Voltage); + } + if (Ch3Current != 0F) { + output.WriteRawTag(53); + output.WriteFloat(Ch3Current); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Ch1Voltage != 0F) { + size += 1 + 4; + } + if (Ch1Current != 0F) { + size += 1 + 4; + } + if (Ch2Voltage != 0F) { + size += 1 + 4; + } + if (Ch2Current != 0F) { + size += 1 + 4; + } + if (Ch3Voltage != 0F) { + size += 1 + 4; + } + if (Ch3Current != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PowerMetrics other) { + if (other == null) { + return; + } + if (other.Ch1Voltage != 0F) { + Ch1Voltage = other.Ch1Voltage; + } + if (other.Ch1Current != 0F) { + Ch1Current = other.Ch1Current; + } + if (other.Ch2Voltage != 0F) { + Ch2Voltage = other.Ch2Voltage; + } + if (other.Ch2Current != 0F) { + Ch2Current = other.Ch2Current; + } + if (other.Ch3Voltage != 0F) { + Ch3Voltage = other.Ch3Voltage; + } + if (other.Ch3Current != 0F) { + Ch3Current = other.Ch3Current; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Ch1Voltage = input.ReadFloat(); + break; + } + case 21: { + Ch1Current = input.ReadFloat(); + break; + } + case 29: { + Ch2Voltage = input.ReadFloat(); + break; + } + case 37: { + Ch2Current = input.ReadFloat(); + break; + } + case 45: { + Ch3Voltage = input.ReadFloat(); + break; + } + case 53: { + Ch3Current = input.ReadFloat(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 13: { + Ch1Voltage = input.ReadFloat(); + break; + } + case 21: { + Ch1Current = input.ReadFloat(); + break; + } + case 29: { + Ch2Voltage = input.ReadFloat(); + break; + } + case 37: { + Ch2Current = input.ReadFloat(); + break; + } + case 45: { + Ch3Voltage = input.ReadFloat(); + break; + } + case 53: { + Ch3Current = input.ReadFloat(); + break; + } + } + } + } + #endif + + } + + /// + /// + /// Air quality metrics /// public sealed partial class AirQualityMetrics : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -883,7 +1296,7 @@ public sealed partial class AirQualityMetrics : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Meshtastic.Protobufs.TelemetryReflection.Descriptor.MessageTypes[2]; } + get { return global::Meshtastic.Protobufs.TelemetryReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -928,8 +1341,8 @@ public AirQualityMetrics Clone() { public const int Pm10StandardFieldNumber = 1; private uint pm10Standard_; /// - /// - /// Concentration Units Standard PM1.0 + /// + /// Concentration Units Standard PM1.0 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -944,8 +1357,8 @@ public uint Pm10Standard { public const int Pm25StandardFieldNumber = 2; private uint pm25Standard_; /// - /// - /// Concentration Units Standard PM2.5 + /// + /// Concentration Units Standard PM2.5 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -960,8 +1373,8 @@ public uint Pm25Standard { public const int Pm100StandardFieldNumber = 3; private uint pm100Standard_; /// - /// - /// Concentration Units Standard PM10.0 + /// + /// Concentration Units Standard PM10.0 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -976,8 +1389,8 @@ public uint Pm100Standard { public const int Pm10EnvironmentalFieldNumber = 4; private uint pm10Environmental_; /// - /// - /// Concentration Units Environmental PM1.0 + /// + /// Concentration Units Environmental PM1.0 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -992,8 +1405,8 @@ public uint Pm10Environmental { public const int Pm25EnvironmentalFieldNumber = 5; private uint pm25Environmental_; /// - /// - /// Concentration Units Environmental PM2.5 + /// + /// Concentration Units Environmental PM2.5 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1008,8 +1421,8 @@ public uint Pm25Environmental { public const int Pm100EnvironmentalFieldNumber = 6; private uint pm100Environmental_; /// - /// - /// Concentration Units Environmental PM10.0 + /// + /// Concentration Units Environmental PM10.0 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1024,8 +1437,8 @@ public uint Pm100Environmental { public const int Particles03UmFieldNumber = 7; private uint particles03Um_; /// - /// - /// 0.3um Particle Count + /// + /// 0.3um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1040,8 +1453,8 @@ public uint Particles03Um { public const int Particles05UmFieldNumber = 8; private uint particles05Um_; /// - /// - /// 0.5um Particle Count + /// + /// 0.5um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1056,8 +1469,8 @@ public uint Particles05Um { public const int Particles10UmFieldNumber = 9; private uint particles10Um_; /// - /// - /// 1.0um Particle Count + /// + /// 1.0um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1072,8 +1485,8 @@ public uint Particles10Um { public const int Particles25UmFieldNumber = 10; private uint particles25Um_; /// - /// - /// 2.5um Particle Count + /// + /// 2.5um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1088,8 +1501,8 @@ public uint Particles25Um { public const int Particles50UmFieldNumber = 11; private uint particles50Um_; /// - /// - /// 5.0um Particle Count + /// + /// 5.0um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1104,8 +1517,8 @@ public uint Particles50Um { public const int Particles100UmFieldNumber = 12; private uint particles100Um_; /// - /// - /// 10.0um Particle Count + /// + /// 10.0um Particle Count /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1514,8 +1927,8 @@ public void MergeFrom(pb::CodedInputStream input) { } /// - /// - /// Types of Measurements the telemetry module is equipped to handle + /// + /// Types of Measurements the telemetry module is equipped to handle /// public sealed partial class Telemetry : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -1531,7 +1944,7 @@ public sealed partial class Telemetry : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Meshtastic.Protobufs.TelemetryReflection.Descriptor.MessageTypes[3]; } + get { return global::Meshtastic.Protobufs.TelemetryReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1562,6 +1975,9 @@ public Telemetry(Telemetry other) : this() { case VariantOneofCase.AirQualityMetrics: AirQualityMetrics = other.AirQualityMetrics.Clone(); break; + case VariantOneofCase.PowerMetrics: + PowerMetrics = other.PowerMetrics.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -1577,12 +1993,8 @@ public Telemetry Clone() { public const int TimeFieldNumber = 1; private uint time_; /// - /// - /// This is usually not sent over the mesh (to save space), but it is sent - /// from the phone so that the local device can set its RTC If it is sent over - /// the mesh (because there are devices on the mesh without GPS), it will only - /// be sent by devices which has a hardware GPS clock (IE Mobile Phone). - /// seconds since 1970 + /// + /// Seconds since 1970 - or 0 for unknown/unset /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1596,8 +2008,8 @@ public uint Time { /// Field number for the "device_metrics" field. public const int DeviceMetricsFieldNumber = 2; /// - /// - /// Key native device metrics such as battery level + /// + /// Key native device metrics such as battery level /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1612,8 +2024,8 @@ public uint Time { /// Field number for the "environment_metrics" field. public const int EnvironmentMetricsFieldNumber = 3; /// - /// - /// Weather station or other environmental metrics + /// + /// Weather station or other environmental metrics /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1628,8 +2040,8 @@ public uint Time { /// Field number for the "air_quality_metrics" field. public const int AirQualityMetricsFieldNumber = 4; /// - /// - /// Air quality metrics + /// + /// Air quality metrics /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1641,6 +2053,22 @@ public uint Time { } } + /// Field number for the "power_metrics" field. + public const int PowerMetricsFieldNumber = 5; + /// + /// + /// Power Metrics + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Meshtastic.Protobufs.PowerMetrics PowerMetrics { + get { return variantCase_ == VariantOneofCase.PowerMetrics ? (global::Meshtastic.Protobufs.PowerMetrics) variant_ : null; } + set { + variant_ = value; + variantCase_ = value == null ? VariantOneofCase.None : VariantOneofCase.PowerMetrics; + } + } + private object variant_; /// Enum of possible cases for the "variant" oneof. public enum VariantOneofCase { @@ -1648,6 +2076,7 @@ public enum VariantOneofCase { DeviceMetrics = 2, EnvironmentMetrics = 3, AirQualityMetrics = 4, + PowerMetrics = 5, } private VariantOneofCase variantCase_ = VariantOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1682,6 +2111,7 @@ public bool Equals(Telemetry other) { if (!object.Equals(DeviceMetrics, other.DeviceMetrics)) return false; if (!object.Equals(EnvironmentMetrics, other.EnvironmentMetrics)) return false; if (!object.Equals(AirQualityMetrics, other.AirQualityMetrics)) return false; + if (!object.Equals(PowerMetrics, other.PowerMetrics)) return false; if (VariantCase != other.VariantCase) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1694,6 +2124,7 @@ public override int GetHashCode() { if (variantCase_ == VariantOneofCase.DeviceMetrics) hash ^= DeviceMetrics.GetHashCode(); if (variantCase_ == VariantOneofCase.EnvironmentMetrics) hash ^= EnvironmentMetrics.GetHashCode(); if (variantCase_ == VariantOneofCase.AirQualityMetrics) hash ^= AirQualityMetrics.GetHashCode(); + if (variantCase_ == VariantOneofCase.PowerMetrics) hash ^= PowerMetrics.GetHashCode(); hash ^= (int) variantCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -1729,6 +2160,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(34); output.WriteMessage(AirQualityMetrics); } + if (variantCase_ == VariantOneofCase.PowerMetrics) { + output.WriteRawTag(42); + output.WriteMessage(PowerMetrics); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1755,6 +2190,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(34); output.WriteMessage(AirQualityMetrics); } + if (variantCase_ == VariantOneofCase.PowerMetrics) { + output.WriteRawTag(42); + output.WriteMessage(PowerMetrics); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1777,6 +2216,9 @@ public int CalculateSize() { if (variantCase_ == VariantOneofCase.AirQualityMetrics) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(AirQualityMetrics); } + if (variantCase_ == VariantOneofCase.PowerMetrics) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PowerMetrics); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1811,6 +2253,12 @@ public void MergeFrom(Telemetry other) { } AirQualityMetrics.MergeFrom(other.AirQualityMetrics); break; + case VariantOneofCase.PowerMetrics: + if (PowerMetrics == null) { + PowerMetrics = new global::Meshtastic.Protobufs.PowerMetrics(); + } + PowerMetrics.MergeFrom(other.PowerMetrics); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1859,6 +2307,15 @@ public void MergeFrom(pb::CodedInputStream input) { AirQualityMetrics = subBuilder; break; } + case 42: { + global::Meshtastic.Protobufs.PowerMetrics subBuilder = new global::Meshtastic.Protobufs.PowerMetrics(); + if (variantCase_ == VariantOneofCase.PowerMetrics) { + subBuilder.MergeFrom(PowerMetrics); + } + input.ReadMessage(subBuilder); + PowerMetrics = subBuilder; + break; + } } } #endif @@ -1905,6 +2362,15 @@ public void MergeFrom(pb::CodedInputStream input) { AirQualityMetrics = subBuilder; break; } + case 42: { + global::Meshtastic.Protobufs.PowerMetrics subBuilder = new global::Meshtastic.Protobufs.PowerMetrics(); + if (variantCase_ == VariantOneofCase.PowerMetrics) { + subBuilder.MergeFrom(PowerMetrics); + } + input.ReadMessage(subBuilder); + PowerMetrics = subBuilder; + break; + } } } } diff --git a/protobufs b/protobufs index 826dfb7..c845b78 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 826dfb760450a4225384da6316582e93138102ba +Subproject commit c845b7848eebb11150ca0427773303bf8758e533 From d70f261ff9b215f477a73a3c2b79a7a5571a1720 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 19 Nov 2023 07:05:23 -0600 Subject: [PATCH 4/6] Added Remove node command --- .../RemoveNodeCommandHandler.cs | 39 +++++++++++++++++++ Meshtastic.Cli/Commands/RemoveNodeCommand.cs | 25 ++++++++++++ Meshtastic.Cli/Program.cs | 1 + .../MessageFactories/AdminMessageFactory.cs | 8 +++- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 Meshtastic.Cli/CommandHandlers/RemoveNodeCommandHandler.cs create mode 100644 Meshtastic.Cli/Commands/RemoveNodeCommand.cs diff --git a/Meshtastic.Cli/CommandHandlers/RemoveNodeCommandHandler.cs b/Meshtastic.Cli/CommandHandlers/RemoveNodeCommandHandler.cs new file mode 100644 index 0000000..17db81a --- /dev/null +++ b/Meshtastic.Cli/CommandHandlers/RemoveNodeCommandHandler.cs @@ -0,0 +1,39 @@ +using Meshtastic.Data; +using Meshtastic.Data.MessageFactories; +using Meshtastic.Protobufs; +using Microsoft.Extensions.Logging; + +namespace Meshtastic.Cli.CommandHandlers; + +public class RemoveNodeCommandHandler : DeviceCommandHandler +{ + private readonly uint nodeNum; + + public RemoveNodeCommandHandler(uint nodeNum, DeviceConnectionContext context, + CommandContext commandContext) : base(context, commandContext) + { + this.nodeNum = nodeNum; + } + + public async Task Handle() + { + var wantConfig = new ToRadioMessageFactory().CreateWantConfigMessage(); + var container = await Connection.WriteToRadio(wantConfig, CompleteOnConfigReceived); + Connection.Disconnect(); + return container; + } + + public override async Task OnCompleted(FromRadio packet, DeviceStateContainer container) + { + if (!container.Nodes.Any(n => n.Num == nodeNum)) + { + Logger.LogError($"Node with nodenum {nodeNum} not found in device's NodeDB"); + return; + } + + Logger.LogInformation("Removing device from NodeDB.."); + var adminMessageFactory = new AdminMessageFactory(container, Destination); + var adminMessage = adminMessageFactory.CreateRemoveByNodenumMessage(nodeNum); + await Connection.WriteToRadio(ToRadioMessageFactory.CreateMeshPacketMessage(adminMessage), AnyResponseReceived); + } +} \ No newline at end of file diff --git a/Meshtastic.Cli/Commands/RemoveNodeCommand.cs b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs new file mode 100644 index 0000000..cab076c --- /dev/null +++ b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs @@ -0,0 +1,25 @@ +using Meshtastic.Cli.Binders; +using Meshtastic.Cli.CommandHandlers; +using Meshtastic.Cli.Enums; +using Microsoft.Extensions.Logging; + +namespace Meshtastic.Cli.Commands; + +public class RemoveNodeCommand : Command +{ + public RemoveNodeCommand(string name, string description, Option port, Option host, + Option output, Option log, Option dest, Option selectDest) : + base(name, description) + { + + var nodeNum = new Argument("nodenum", "Nodenum of the node to remove from the device NodeDB"); + + this.SetHandler(async (context, commandContext) => + { + var handler = new RemoveNodeCommandHandler(nodeNum, context, commandContext); + await handler.Handle(); + }, + new DeviceConnectionBinder(port, host), + new CommandContextBinder(log, output, dest, selectDest)); + } +} diff --git a/Meshtastic.Cli/Program.cs b/Meshtastic.Cli/Program.cs index a713d61..96dc3bc 100644 --- a/Meshtastic.Cli/Program.cs +++ b/Meshtastic.Cli/Program.cs @@ -52,6 +52,7 @@ root.AddCommand(new FactoryResetCommand("factory-reset", "Factory reset configuration of the device", port, host, output, log, dest, selectDest)); root.AddCommand(new FixedPositionCommand("fixed-position", "Set the device to a fixed position", port, host, output, log, dest, selectDest)); root.AddCommand(new SendTextCommand("text", "Send a text message from the device", port, host, output, log, dest, selectDest)); +root.AddCommand(new RemoveNodeCommand("remove-node", "Remove single node by nodenum from node db of the device", port, host, output, log, dest, selectDest)); root.AddCommand(new ResetNodeDbCommand("reset-nodedb", "Reset the node db of the device", port, host, output, log, dest, selectDest)); root.AddCommand(new TraceRouteCommand("trace-route", "Trace the sequence of nodes routing to the destination", port, host, output, log, dest, selectDest)); root.AddCommand(new CannedMessagesCommand("canned-messages", "Get or set the collection of canned messages on the device", port, host, output, log, dest, selectDest)); diff --git a/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs b/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs index 0a4bfc7..793007f 100644 --- a/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs +++ b/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs @@ -113,9 +113,13 @@ public MeshPacket CreateFactoryResetMessage() { return GetNewMeshPacket(new AdminMessage() { FactoryReset = 1 }); } - public MeshPacket CreateNodeDbResetMessage() + public MeshPacket CreateRemoveByNodenumMessage(uint nodeNum) { - return GetNewMeshPacket(new AdminMessage() { NodedbReset = 1 }); + return GetNewMeshPacket(new AdminMessage() { RemoveByNodenum = nodeNum }); + } + public MeshPacket CreateSetOwnerMessage() + { + return GetNewMeshPacket(new AdminMessage() { SetOwner = container.MyNodeInfo }); } public MeshPacket CreateSetCannedMessage(string message) { From 8ad3cc512767641ca53c77b231e1de89bb575b13 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 19 Nov 2023 07:21:50 -0600 Subject: [PATCH 5/6] Whitespace --- Meshtastic.Cli/Commands/RemoveNodeCommand.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Meshtastic.Cli/Commands/RemoveNodeCommand.cs b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs index cab076c..858b4af 100644 --- a/Meshtastic.Cli/Commands/RemoveNodeCommand.cs +++ b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs @@ -11,7 +11,6 @@ public RemoveNodeCommand(string name, string description, Option port, O Option output, Option log, Option dest, Option selectDest) : base(name, description) { - var nodeNum = new Argument("nodenum", "Nodenum of the node to remove from the device NodeDB"); this.SetHandler(async (context, commandContext) => From 4cd885283962dd2fcf0ba080331cf03a1cb72c67 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 19 Nov 2023 07:49:11 -0600 Subject: [PATCH 6/6] Fix command and admin factory --- Meshtastic.Cli/Commands/RemoveNodeCommand.cs | 6 ++++-- Meshtastic.Cli/Properties/launchSettings.json | 4 ++++ Meshtastic/Data/MessageFactories/AdminMessageFactory.cs | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Meshtastic.Cli/Commands/RemoveNodeCommand.cs b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs index 858b4af..ad0c6c1 100644 --- a/Meshtastic.Cli/Commands/RemoveNodeCommand.cs +++ b/Meshtastic.Cli/Commands/RemoveNodeCommand.cs @@ -11,13 +11,15 @@ public RemoveNodeCommand(string name, string description, Option port, O Option output, Option log, Option dest, Option selectDest) : base(name, description) { - var nodeNum = new Argument("nodenum", "Nodenum of the node to remove from the device NodeDB"); + var nodeNumArgument = new Argument("nodenum", "Nodenum of the node to remove from the device NodeDB"); + AddArgument(nodeNumArgument); - this.SetHandler(async (context, commandContext) => + this.SetHandler(async (nodeNum, context, commandContext) => { var handler = new RemoveNodeCommandHandler(nodeNum, context, commandContext); await handler.Handle(); }, + nodeNumArgument, new DeviceConnectionBinder(port, host), new CommandContextBinder(log, output, dest, selectDest)); } diff --git a/Meshtastic.Cli/Properties/launchSettings.json b/Meshtastic.Cli/Properties/launchSettings.json index d2818ee..239a27b 100644 --- a/Meshtastic.Cli/Properties/launchSettings.json +++ b/Meshtastic.Cli/Properties/launchSettings.json @@ -143,6 +143,10 @@ "mqtt": { "commandName": "Project", "commandLineArgs": "mqtt-proxy" + }, + "remove-node": { + "commandName": "Project", + "commandLineArgs": "remove-node 123456" } } } diff --git a/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs b/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs index 793007f..5e781e7 100644 --- a/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs +++ b/Meshtastic/Data/MessageFactories/AdminMessageFactory.cs @@ -113,13 +113,13 @@ public MeshPacket CreateFactoryResetMessage() { return GetNewMeshPacket(new AdminMessage() { FactoryReset = 1 }); } - public MeshPacket CreateRemoveByNodenumMessage(uint nodeNum) + public MeshPacket CreateNodeDbResetMessage() { - return GetNewMeshPacket(new AdminMessage() { RemoveByNodenum = nodeNum }); + return GetNewMeshPacket(new AdminMessage() { NodedbReset = 1 }); } - public MeshPacket CreateSetOwnerMessage() + public MeshPacket CreateRemoveByNodenumMessage(uint nodeNum) { - return GetNewMeshPacket(new AdminMessage() { SetOwner = container.MyNodeInfo }); + return GetNewMeshPacket(new AdminMessage() { RemoveByNodenum = nodeNum }); } public MeshPacket CreateSetCannedMessage(string message) {