Skip to content

Commit

Permalink
Merge pull request #103 from meshtastic/wip
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
thebentern authored Nov 26, 2024
2 parents 78dd4ad + 63b5e22 commit e0d463b
Show file tree
Hide file tree
Showing 9 changed files with 866 additions and 326 deletions.
9 changes: 4 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="ILogger.Moq" Version="1.1.10" />
<PackageVersion Include="Google.Protobuf" Version="3.25.3" />
<PackageVersion Include="Google.Protobuf.Tools" Version="3.25.3" />
<PackageVersion Include="Google.Protobuf" Version="3.28.3" />
<PackageVersion Include="Google.Protobuf.Tools" Version="3.28.3" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
Expand All @@ -19,8 +18,8 @@
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.1" />
<PackageVersion Include="MQTTnet" Version="4.3.3.952" />
<PackageVersion Include="QRCoder" Version="1.4.3" />
<PackageVersion Include="MQTTnet" Version="4.3.7.1207" />
<PackageVersion Include="QRCoder" Version="1.6.0" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
<PackageVersion Include="Spectre.Console.Json" Version="0.49.1" />
Expand Down
1 change: 0 additions & 1 deletion Meshtastic.Cli/CommandHandlers/RegisterCommandHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Security.Cryptography;
using Meshtastic.Data;
using Meshtastic.Data.MessageFactories;
using Meshtastic.Protobufs;
Expand Down
2 changes: 1 addition & 1 deletion Meshtastic.Test/CommandHandlers/CommandHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Meshtastic.Test.CommandHandlers;
[TestFixture]
[Category(TestCategories.SimulatedDeviceTests)]
[NonParallelizable]
[Timeout(10000)]
[CancelAfter(10000)]
public class CommandHandlerTests : CommandHandlerTestBase
{
[SetUp]
Expand Down
145 changes: 117 additions & 28 deletions Meshtastic/Generated/Admin.cs

Large diffs are not rendered by default.

83 changes: 65 additions & 18 deletions Meshtastic/Generated/DeviceUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static partial class DeviceUiReflection {
static DeviceUiReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChptZXNodGFzdGljL2RldmljZV91aS5wcm90bxIKbWVzaHRhc3RpYyKBAwoO",
"ChptZXNodGFzdGljL2RldmljZV91aS5wcm90bxIKbWVzaHRhc3RpYyKbAwoO",
"RGV2aWNlVUlDb25maWcSDwoHdmVyc2lvbhgBIAEoDRIZChFzY3JlZW5fYnJp",
"Z2h0bmVzcxgCIAEoDRIWCg5zY3JlZW5fdGltZW91dBgDIAEoDRITCgtzY3Jl",
"ZW5fbG9jaxgEIAEoCBIVCg1zZXR0aW5nc19sb2NrGAUgASgIEhAKCHBpbl9j",
Expand All @@ -33,26 +33,27 @@ static DeviceUiReflection() {
"EhQKDHJpbmdfdG9uZV9pZBgKIAEoDRImCghsYW5ndWFnZRgLIAEoDjIULm1l",
"c2h0YXN0aWMuTGFuZ3VhZ2USKwoLbm9kZV9maWx0ZXIYDCABKAsyFi5tZXNo",
"dGFzdGljLk5vZGVGaWx0ZXISMQoObm9kZV9oaWdobGlnaHQYDSABKAsyGS5t",
"ZXNodGFzdGljLk5vZGVIaWdobGlnaHQilgEKCk5vZGVGaWx0ZXISFgoOdW5r",
"bm93bl9zd2l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WJsaWNfa2V5X3N3aXRjaBgD",
"IAEoCBIRCglob3BzX2F3YXkYBCABKAUSFwoPcG9zaXRpb25fc3dpdGNoGAUg",
"ASgIEhEKCW5vZGVfbmFtZRgGIAEoCSJ+Cg1Ob2RlSGlnaGxpZ2h0EhMKC2No",
"YXRfc3dpdGNoGAEgASgIEhcKD3Bvc2l0aW9uX3N3aXRjaBgCIAEoCBIYChB0",
"ZWxlbWV0cnlfc3dpdGNoGAMgASgIEhIKCmlhcV9zd2l0Y2gYBCABKAgSEQoJ",
"bm9kZV9uYW1lGAUgASgJKiUKBVRoZW1lEggKBERBUksQABIJCgVMSUdIVBAB",
"EgcKA1JFRBACKvwBCghMYW5ndWFnZRILCgdFTkdMSVNIEAASCgoGRlJFTkNI",
"EAESCgoGR0VSTUFOEAISCwoHSVRBTElBThADEg4KClBPUlRVR1VFU0UQBBIL",
"CgdTUEFOSVNIEAUSCwoHU1dFRElTSBAGEgsKB0ZJTk5JU0gQBxIKCgZQT0xJ",
"U0gQCBILCgdUVVJLSVNIEAkSCwoHU0VSQklBThAKEgsKB1JVU1NJQU4QCxIJ",
"CgVEVVRDSBAMEgkKBUdSRUVLEA0SDQoJTk9SV0VHSUFOEA4SFgoSU0lNUExJ",
"RklFRF9DSElORVNFEB4SFwoTVFJBRElUSU9OQUxfQ0hJTkVTRRAfQmMKE2Nv",
"bS5nZWVrc3ZpbGxlLm1lc2hCDkRldmljZVVJUHJvdG9zWiJnaXRodWIuY29t",
"L21lc2h0YXN0aWMvZ28vZ2VuZXJhdGVkqgIUTWVzaHRhc3RpYy5Qcm90b2J1",
"ZnO6AgBiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Meshtastic.Protobufs.Theme), typeof(global::Meshtastic.Protobufs.Language), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.DeviceUIConfig), global::Meshtastic.Protobufs.DeviceUIConfig.Parser, new[]{ "Version", "ScreenBrightness", "ScreenTimeout", "ScreenLock", "SettingsLock", "PinCode", "Theme", "AlertEnabled", "BannerEnabled", "RingToneId", "Language", "NodeFilter", "NodeHighlight" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.DeviceUIConfig), global::Meshtastic.Protobufs.DeviceUIConfig.Parser, new[]{ "Version", "ScreenBrightness", "ScreenTimeout", "ScreenLock", "SettingsLock", "PinCode", "Theme", "AlertEnabled", "BannerEnabled", "RingToneId", "Language", "NodeFilter", "NodeHighlight", "CalibrationData" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.NodeFilter), global::Meshtastic.Protobufs.NodeFilter.Parser, new[]{ "UnknownSwitch", "OfflineSwitch", "PublicKeySwitch", "HopsAway", "PositionSwitch", "NodeName" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Meshtastic.Protobufs.NodeHighlight), global::Meshtastic.Protobufs.NodeHighlight.Parser, new[]{ "ChatSwitch", "PositionSwitch", "TelemetrySwitch", "IaqSwitch", "NodeName" }, null, null, null, null)
}));
Expand Down Expand Up @@ -156,6 +157,11 @@ public enum Language {
[pbr::OriginalName("GREEK")] Greek = 13,
/// <summary>
///
/// Norwegian
/// </summary>
[pbr::OriginalName("NORWEGIAN")] Norwegian = 14,
/// <summary>
///
/// Simplified Chinese (experimental)
/// </summary>
[pbr::OriginalName("SIMPLIFIED_CHINESE")] SimplifiedChinese = 30,
Expand Down Expand Up @@ -216,6 +222,7 @@ public DeviceUIConfig(DeviceUIConfig other) : this() {
language_ = other.language_;
nodeFilter_ = other.nodeFilter_ != null ? other.nodeFilter_.Clone() : null;
nodeHighlight_ = other.nodeHighlight_ != null ? other.nodeHighlight_.Clone() : null;
calibrationData_ = other.calibrationData_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

Expand Down Expand Up @@ -417,6 +424,22 @@ public uint RingToneId {
}
}

/// <summary>Field number for the "calibration_data" field.</summary>
public const int CalibrationDataFieldNumber = 14;
private pb::ByteString calibrationData_ = pb::ByteString.Empty;
/// <summary>
///
/// 8 integers for screen calibration data
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pb::ByteString CalibrationData {
get { return calibrationData_; }
set {
calibrationData_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
Expand Down Expand Up @@ -445,6 +468,7 @@ public bool Equals(DeviceUIConfig other) {
if (Language != other.Language) return false;
if (!object.Equals(NodeFilter, other.NodeFilter)) return false;
if (!object.Equals(NodeHighlight, other.NodeHighlight)) return false;
if (CalibrationData != other.CalibrationData) return false;
return Equals(_unknownFields, other._unknownFields);
}

Expand All @@ -465,6 +489,7 @@ public override int GetHashCode() {
if (Language != global::Meshtastic.Protobufs.Language.English) hash ^= Language.GetHashCode();
if (nodeFilter_ != null) hash ^= NodeFilter.GetHashCode();
if (nodeHighlight_ != null) hash ^= NodeHighlight.GetHashCode();
if (CalibrationData.Length != 0) hash ^= CalibrationData.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
Expand Down Expand Up @@ -535,6 +560,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(106);
output.WriteMessage(NodeHighlight);
}
if (CalibrationData.Length != 0) {
output.WriteRawTag(114);
output.WriteBytes(CalibrationData);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
Expand Down Expand Up @@ -597,6 +626,10 @@ public void WriteTo(pb::CodedOutputStream output) {
output.WriteRawTag(106);
output.WriteMessage(NodeHighlight);
}
if (CalibrationData.Length != 0) {
output.WriteRawTag(114);
output.WriteBytes(CalibrationData);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
Expand Down Expand Up @@ -646,6 +679,9 @@ public int CalculateSize() {
if (nodeHighlight_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(NodeHighlight);
}
if (CalibrationData.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(CalibrationData);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
Expand Down Expand Up @@ -703,6 +739,9 @@ public void MergeFrom(DeviceUIConfig other) {
}
NodeHighlight.MergeFrom(other.NodeHighlight);
}
if (other.CalibrationData.Length != 0) {
CalibrationData = other.CalibrationData;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

Expand Down Expand Up @@ -776,6 +815,10 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(NodeHighlight);
break;
}
case 114: {
CalibrationData = input.ReadBytes();
break;
}
}
}
#endif
Expand Down Expand Up @@ -849,6 +892,10 @@ public void MergeFrom(pb::CodedInputStream input) {
input.ReadMessage(NodeHighlight);
break;
}
case 114: {
CalibrationData = input.ReadBytes();
break;
}
}
}
}
Expand Down
Loading

0 comments on commit e0d463b

Please sign in to comment.