From 2946f6e5c374cb2bb9a22ca7bc5fcc5a99bba02e Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Tue, 12 Apr 2022 21:09:22 -0700 Subject: [PATCH] Add compressed payload variant --- mesh.options | 2 ++ mesh.proto | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mesh.options b/mesh.options index 826d125..da75703 100644 --- a/mesh.options +++ b/mesh.options @@ -12,6 +12,8 @@ # note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is # outside of this envelope *Data.payload max_size:237 +*Data.payload_compressed max_size:237 +*Data.payloadVariant anonymous_oneof:true # Big enough for 1.2.28.568032c-d *MyNodeInfo.firmware_version max_size:18 diff --git a/mesh.proto b/mesh.proto index 211bb2c..60af9b8 100644 --- a/mesh.proto +++ b/mesh.proto @@ -628,10 +628,18 @@ message Data { */ PortNum portnum = 1; - /* - * TODO: REPLACE - */ - bytes payload = 2; + oneof payloadVariant { + + /* + * TODO: REPLACE + */ + bytes payload = 2; + + /* + * TODO: REPLACE + */ + bytes payload_compressed = 10; + } /* * Not normally used, but for testing a sender can request that recipient