From 996940f44c2dbaa8409d82d885dcb968253228a3 Mon Sep 17 00:00:00 2001 From: Balazs Kelemen <10376327+prampec@users.noreply.github.com> Date: Mon, 24 Jan 2022 21:41:27 +0100 Subject: [PATCH 1/5] Canned message - Extend messages length --- admin.options | 13 ++++++---- admin.proto | 28 ++++++--------------- cannedmessages.options | 9 +++---- cannedmessages.proto | 55 +++++------------------------------------- deviceonly.options | 6 ----- deviceonly.proto | 25 ------------------- radioconfig.proto | 8 ------ 7 files changed, 26 insertions(+), 118 deletions(-) diff --git a/admin.options b/admin.options index 8f8a1c2..404d3fa 100644 --- a/admin.options +++ b/admin.options @@ -1,7 +1,10 @@ *AdminMessage.variant anonymous_oneof:true -*AdminMessage.set_canned_message_plugin_part1 max_size:200 -*AdminMessage.set_canned_message_plugin_part2 max_size:200 -*AdminMessage.set_canned_message_plugin_part3 max_size:200 -*AdminMessage.set_canned_message_plugin_part4 max_size:200 -*AdminMessage.set_canned_message_plugin_part5 max_size:200 +*AdminMessage.set_canned_message_plugin_part1 max_size:201 +*AdminMessage.set_canned_message_plugin_part2 max_size:201 +*AdminMessage.set_canned_message_plugin_part3 max_size:201 +*AdminMessage.set_canned_message_plugin_part4 max_size:201 +*AdminMessage.get_canned_message_plugin_part1_response max_size:201 +*AdminMessage.get_canned_message_plugin_part2_response max_size:201 +*AdminMessage.get_canned_message_plugin_part3_response max_size:201 +*AdminMessage.get_canned_message_plugin_part4_response max_size:201 diff --git a/admin.proto b/admin.proto index 2ba4e2a..979e967 100644 --- a/admin.proto +++ b/admin.proto @@ -4,7 +4,6 @@ option java_package = "com.geeksville.mesh"; option optimize_for = LITE_RUNTIME; option go_package = "github.com/meshtastic/gomeshproto"; -import "cannedmessages.proto"; import "channel.proto"; import "mesh.proto"; import "radioconfig.proto"; @@ -82,56 +81,45 @@ message AdminMessage { * Get the Canned Message Plugin message part1 in the response to this message. */ bool get_canned_message_plugin_part1_request = 36; - CannedMessagePluginMessagePart1 get_canned_message_plugin_part1_response = 37; + string get_canned_message_plugin_part1_response = 37; /* * Get the Canned Message Plugin message part2 in the response to this message. */ bool get_canned_message_plugin_part2_request = 38; - CannedMessagePluginMessagePart2 get_canned_message_plugin_part2_response = 39; + string get_canned_message_plugin_part2_response = 39; /* * Get the Canned Message Plugin message part3 in the response to this message. */ bool get_canned_message_plugin_part3_request = 40; - CannedMessagePluginMessagePart3 get_canned_message_plugin_part3_response = 41; + string get_canned_message_plugin_part3_response = 41; /* * Get the Canned Message Plugin message part4 in the response to this message. */ bool get_canned_message_plugin_part4_request = 42; - CannedMessagePluginMessagePart4 get_canned_message_plugin_part4_response = 43; - - /* - * Get the Canned Message Plugin message part5 in the response to this message. - */ - bool get_canned_message_plugin_part5_request = 44; - CannedMessagePluginMessagePart5 get_canned_message_plugin_part5_response = 45; + string get_canned_message_plugin_part4_response = 43; /* * Set the canned message plugin part 1 text. */ - CannedMessagePluginMessagePart1 set_canned_message_plugin_part1 = 46; + string set_canned_message_plugin_part1 = 44; /* * Set the canned message plugin part 2 text. */ - CannedMessagePluginMessagePart2 set_canned_message_plugin_part2 = 47; + string set_canned_message_plugin_part2 = 45; /* * Set the canned message plugin part 3 text. */ - CannedMessagePluginMessagePart3 set_canned_message_plugin_part3 = 48; + string set_canned_message_plugin_part3 = 46; /* * Set the canned message plugin part 4 text. */ - CannedMessagePluginMessagePart4 set_canned_message_plugin_part4 = 49; - - /* - * Set the canned message plugin part 5 text. - */ - CannedMessagePluginMessagePart5 set_canned_message_plugin_part5 = 50; + string set_canned_message_plugin_part4 = 47; /* * Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) diff --git a/cannedmessages.options b/cannedmessages.options index d06a327..f3ecacc 100644 --- a/cannedmessages.options +++ b/cannedmessages.options @@ -1,5 +1,4 @@ -*CannedMessagePluginMessagePart1.text max_size:200 -*CannedMessagePluginMessagePart2.text max_size:200 -*CannedMessagePluginMessagePart3.text max_size:200 -*CannedMessagePluginMessagePart4.text max_size:200 -*CannedMessagePluginMessagePart5.text max_size:200 +*CannedMessagePluginConfig.messagesPart1 max_size:201 +*CannedMessagePluginConfig.messagesPart2 max_size:201 +*CannedMessagePluginConfig.messagesPart3 max_size:201 +*CannedMessagePluginConfig.messagesPart4 max_size:201 diff --git a/cannedmessages.proto b/cannedmessages.proto index 8a249da..a90b27e 100644 --- a/cannedmessages.proto +++ b/cannedmessages.proto @@ -25,57 +25,14 @@ option optimize_for = LITE_RUNTIME; option go_package = "github.com/meshtastic/gomeshproto"; /* - * Canned message plugin part 1 + * Canned message plugin configuration. */ -message CannedMessagePluginMessagePart1 { +message CannedMessagePluginConfig { /* * Predefined messages for canned message plugin separated by '|' characters. - * This is part 1. */ - string text = 1; + string messagesPart1 = 11; + string messagesPart2 = 12; + string messagesPart3 = 13; + string messagesPart4 = 14; } - -/* - * Canned message plugin part 2 - */ -message CannedMessagePluginMessagePart2 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 2. - */ - string text = 1; -} - -/* - * Canned message plugin part 3 - */ -message CannedMessagePluginMessagePart3 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 3. - */ - string text = 1; -} - -/* - * Canned message plugin part 4 - */ -message CannedMessagePluginMessagePart4 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 4. - */ - string text = 1; -} - -/* - * Canned message plugin part 5 - */ -message CannedMessagePluginMessagePart5 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 5. - */ - string text = 1; -} - diff --git a/deviceonly.options b/deviceonly.options index 321174a..9e04083 100644 --- a/deviceonly.options +++ b/deviceonly.options @@ -7,11 +7,5 @@ # FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM *DeviceState.receive_queue max_count:1 -*DeviceState.canned_message_plugin_message_part1 max_size:200 -*DeviceState.canned_message_plugin_message_part2 max_size:200 -*DeviceState.canned_message_plugin_message_part3 max_size:200 -*DeviceState.canned_message_plugin_message_part4 max_size:200 -*DeviceState.canned_message_plugin_message_part5 max_size:200 - *ChannelFile.channels max_count:8 diff --git a/deviceonly.proto b/deviceonly.proto index 62263d1..42e06cb 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -72,31 +72,6 @@ message DeviceState { */ bool did_gps_reset = 11; - /* - * Canned Message Plugin message part1. - */ - string canned_message_plugin_message_part1 = 13; - - /* - * Canned Message Plugin message part2. - */ - string canned_message_plugin_message_part2 = 14; - - /* - * Canned Message Plugin message part3. - */ - string canned_message_plugin_message_part3 = 15; - - /* - * Canned Message Plugin message part4. - */ - string canned_message_plugin_message_part4 = 16; - - /* - * Canned Message Plugin message part5. - */ - string canned_message_plugin_message_part5 = 17; - } /* diff --git a/radioconfig.proto b/radioconfig.proto index a166341..b3ea1ac 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -673,14 +673,6 @@ message RadioConfig { */ string canned_message_plugin_allow_input_source = 171; - /* - * Predefined messages for CannedMessagePlugin separated by '|' characters. - * Note: Split out the messages out to their own messages because we want to store 1,000 characters. - * and the entire message must fit within 256 bytes. - * Not sure if we should deprecate this or just remove it since we're in dev phase. - */ - string canned_message_plugin_messages = 172 [deprecated = true]; - /* * CannedMessagePlugin also sends a bell character with the messages. * ExternalNotificationPlugin can benefit from this feature. From 98929a163afdcfe3db0331016b2485a348fbbec2 Mon Sep 17 00:00:00 2001 From: Balazs Kelemen <10376327+prampec@users.noreply.github.com> Date: Mon, 21 Feb 2022 23:39:30 +0100 Subject: [PATCH 2/5] Canned message - Fixes --- mesh.proto | 2 +- portnums.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh.proto b/mesh.proto index 8508e78..a1eab8a 100644 --- a/mesh.proto +++ b/mesh.proto @@ -530,7 +530,7 @@ message Data { * Defaults to false. If true, then what is in the payload should be treated as an emoji like giving * a message a heart or poop emoji. */ - uint32 group_id = 9; + uint32 group_id = 9; } /* diff --git a/portnums.proto b/portnums.proto index 70509f1..fc1f223 100644 --- a/portnums.proto +++ b/portnums.proto @@ -96,7 +96,7 @@ enum PortNum { */ GROUP_APP = 34; - /* + /* * Provides a hardware serial interface to send and receive from the Meshtastic network. * Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic * network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network. From 30e147a55ce27199cb638a1d82e0b88adc8f5385 Mon Sep 17 00:00:00 2001 From: Ric Letson <78682404+RicInNewMexico@users.noreply.github.com> Date: Tue, 22 Feb 2022 14:08:52 -0700 Subject: [PATCH 3/5] Add serialplugin_baud (#104) * Update radioconfig.proto --- radioconfig.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/radioconfig.proto b/radioconfig.proto index b3ea1ac..d2d2bf0 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -479,6 +479,7 @@ message RadioConfig { bool serialplugin_echo = 121; uint32 serialplugin_rxd = 122; uint32 serialplugin_txd = 123; + uint32 serialplugin_baud = 176; uint32 serialplugin_timeout = 124; uint32 serialplugin_mode = 125; From 1bb626717f5b9746e19bad2908db13dfdd111e6d Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Thu, 24 Feb 2022 21:43:48 -0800 Subject: [PATCH 4/5] remove chat group protos --- deviceonly.proto | 5 ----- mesh.proto | 18 ------------------ portnums.proto | 4 ++-- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/deviceonly.proto b/deviceonly.proto index 62263d1..e24b334 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -42,11 +42,6 @@ message DeviceState { */ repeated MeshPacket receive_queue = 5; - /* - * Group Info - */ - GroupInfo group_info = 6; - /* * A version integer used to invalidate old save files when we make * incompatible changes This integer is set at build time and is private to diff --git a/mesh.proto b/mesh.proto index 8508e78..93999cf 100644 --- a/mesh.proto +++ b/mesh.proto @@ -525,12 +525,6 @@ message Data { * a message a heart or poop emoji. */ bool is_tapback = 8; - - /* - * Defaults to false. If true, then what is in the payload should be treated as an emoji like giving - * a message a heart or poop emoji. - */ - uint32 group_id = 9; } /* @@ -887,14 +881,6 @@ enum CriticalErrorCode { RadioSpiBug = 11; } -/* - * GroupInfo for group chats like #FoodFreaks and #CoolPeopleOnly - */ -message GroupInfo { - repeated string group = 1; -} - - /* * Unique local debugging info for this node * Note: we don't include position or the user info, because that will come in the @@ -1116,10 +1102,6 @@ message FromRadio { */ bool rebooted = 9; - /* - * Groups - */ - GroupInfo groups = 12; } } diff --git a/portnums.proto b/portnums.proto index 70509f1..3da81f9 100644 --- a/portnums.proto +++ b/portnums.proto @@ -92,9 +92,9 @@ enum PortNum { IP_TUNNEL_APP = 33; /* - * Used for managing chat groups + * Used for the router plugin */ - GROUP_APP = 34; + ROUTER_APP = 34; /* * Provides a hardware serial interface to send and receive from the Meshtastic network. From 91bfe0a82d250dab7f80c936b61349d909d4b3f4 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 27 Feb 2022 10:12:00 +1100 Subject: [PATCH 5/5] Create pull_request_template.md --- .github/pull_request_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..595d758 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ + +## What does this PR do? + +> [Related Issue](https://github.com/meshtastic/Meshtastic-protobufs/issues/0) + +## Checklist before merging +- [ ] All top level messages commented +- [ ] All enum members have unique descriptions +- [ ] Formatting is consistant with the defined protolint rules