From d3b2eab090d2deea13ac0bac76aa04c75611147d Mon Sep 17 00:00:00 2001 From: Balazs Kelemen Date: Thu, 13 Jan 2022 14:14:28 +0100 Subject: [PATCH 01/13] CannedMessagePlugin --- radioconfig.options | 2 ++ radioconfig.proto | 70 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/radioconfig.options b/radioconfig.options index 1a95b78..fa053d3 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -9,3 +9,5 @@ *UserPreferences.mqtt_username max_size:32 *UserPreferences.mqtt_password max_size:32 +*UserPreferences.canned_message_plugin_allow_input_origin max_size:16 +*UserPreferences.canned_message_plugin_messages max_size:1024 diff --git a/radioconfig.proto b/radioconfig.proto index 4f1b448..8466a6e 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -217,6 +217,18 @@ enum PositionFlags { POS_TIMESTAMP = 0x0100; } +enum InputEventChar { + NULL = 0; + UP = 17; + DOWN = 18; + LEFT = 19; + RIGHT = 20; + /* '\n' */ + SELECT = 10; + BACK = 27; + CANCEL = 24; +} + /* * The entire set of user settable/readable settings for our radio device. * Includes both the current channel settings and any preferences the user has @@ -606,7 +618,63 @@ message RadioConfig { */ bool is_power_saving = 158; - } + /* + * Enable the rotary encoder #1 + */ + bool rotary1_enabled = 160; + + /* + * GPIO pin for rotary encoder A port. + */ + uint32 rotary1_pin_a = 161; + + /* + * GPIO pin for rotary encoder B port. + */ + uint32 rotary1_pin_b = 162; + + /* + * GPIO pin for rotary encoder Press port. + */ + uint32 rotary1_pin_press = 163; + + /* + * Generate input event on CW of this kind. + */ + InputEventChar rotary1_event_cw = 164; + + /* + * Generate input event on CCW of this kind. + */ + InputEventChar rotary1_event_ccw = 165; + + /* + * Generate input event on Press of this kind. + */ + InputEventChar rotary1_event_press = 166; + + /* + * Enable/disable CannedMessagePlugin. + */ + bool canned_message_plugin_enabled = 170; + + /* + * Input event origin accepted by the canned message plugin. + * Can be e.g. "rotEnc1" or keyword "_any" + */ + string canned_message_plugin_allow_input_origin = 171; + + /* + * Predefined messages for CannedMessagePlugin separated by '|' characters. + */ + string canned_message_plugin_messages = 172; + + /* + * CannedMessagePlugin also sends a bell character with the messages. + * ExternalNotificationPlugin can benefit from this feature. + */ + bool canned_message_plugin_send_bell = 173; + } UserPreferences preferences = 1; } From b95afc8cdd22a91a82578c564fd6d228c04d28e9 Mon Sep 17 00:00:00 2001 From: Balazs Kelemen Date: Sun, 16 Jan 2022 23:04:48 +0100 Subject: [PATCH 02/13] CannedMessagePlugin typo fix. --- radioconfig.options | 2 +- radioconfig.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radioconfig.options b/radioconfig.options index fa053d3..3107589 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -9,5 +9,5 @@ *UserPreferences.mqtt_username max_size:32 *UserPreferences.mqtt_password max_size:32 -*UserPreferences.canned_message_plugin_allow_input_origin max_size:16 +*UserPreferences.canned_message_plugin_allow_input_source max_size:16 *UserPreferences.canned_message_plugin_messages max_size:1024 diff --git a/radioconfig.proto b/radioconfig.proto index 8466a6e..9929ea2 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -662,7 +662,7 @@ message RadioConfig { * Input event origin accepted by the canned message plugin. * Can be e.g. "rotEnc1" or keyword "_any" */ - string canned_message_plugin_allow_input_origin = 171; + string canned_message_plugin_allow_input_source = 171; /* * Predefined messages for CannedMessagePlugin separated by '|' characters. From a4f63f508580d1353d26e50c0be0bb26b9d8a45b Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sun, 16 Jan 2022 15:01:23 -0800 Subject: [PATCH 03/13] add DHT22 sensor --- radioconfig.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/radioconfig.proto b/radioconfig.proto index 9929ea2..5f31d8b 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -551,6 +551,7 @@ message RadioConfig { enum EnvironmentalMeasurementSensorType { DHT11 = 0; DS18B20 = 1; + DHT22 = 2; }; /* From f60875612d6381e07f11cede0cc58b38031937ef Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sun, 16 Jan 2022 15:14:03 -0800 Subject: [PATCH 04/13] going to add the other 2 devices too --- radioconfig.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radioconfig.proto b/radioconfig.proto index 5f31d8b..82d93a0 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -551,7 +551,9 @@ message RadioConfig { enum EnvironmentalMeasurementSensorType { DHT11 = 0; DS18B20 = 1; - DHT22 = 2; + DHT12 = 2; + DHT21 = 3; + DHT22 = 4; }; /* From d2bd49aca380d04f8f1ff2f9e6a20bf2dc1fdb74 Mon Sep 17 00:00:00 2001 From: Balazs Kelemen <10376327+prampec@users.noreply.github.com> Date: Tue, 18 Jan 2022 23:32:44 +0100 Subject: [PATCH 05/13] Temporary fix on canned messages total length. --- radioconfig.options | 2 +- radioconfig.proto | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/radioconfig.options b/radioconfig.options index 3107589..c56c4d3 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -10,4 +10,4 @@ *UserPreferences.mqtt_password max_size:32 *UserPreferences.canned_message_plugin_allow_input_source max_size:16 -*UserPreferences.canned_message_plugin_messages max_size:1024 +*UserPreferences.canned_message_plugin_messages max_size:200 diff --git a/radioconfig.proto b/radioconfig.proto index 82d93a0..8dc9cf9 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -218,15 +218,15 @@ enum PositionFlags { } enum InputEventChar { - NULL = 0; - UP = 17; - DOWN = 18; - LEFT = 19; - RIGHT = 20; + KEY_NONE = 0; + KEY_UP = 17; + KEY_DOWN = 18; + KEY_LEFT = 19; + KEY_RIGHT = 20; /* '\n' */ - SELECT = 10; - BACK = 27; - CANCEL = 24; + KEY_SELECT = 10; + KEY_BACK = 27; + KEY_CANCEL = 24; } /* From 22c12e043b67ddd2dbed8bb34baa1c239280170c Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Tue, 18 Jan 2022 17:39:38 -0800 Subject: [PATCH 06/13] adding the long canned messages --- admin.options | 8 +++++- admin.proto | 59 +++++++++++++++++++++++++++++++++++++++++- deviceonly.options | 6 +++++ deviceonly.proto | 28 +++++++++++++++++++- radioconfig.options | 7 ++++- radioconfig.proto | 63 +++++++++++++++++++++++++++++++++++++++++---- 6 files changed, 162 insertions(+), 9 deletions(-) diff --git a/admin.options b/admin.options index 7f0f5d7..8f8a1c2 100644 --- a/admin.options +++ b/admin.options @@ -1 +1,7 @@ -*AdminMessage.variant anonymous_oneof:true \ No newline at end of file +*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 diff --git a/admin.proto b/admin.proto index 0b85324..ede7637 100644 --- a/admin.proto +++ b/admin.proto @@ -76,5 +76,62 @@ message AdminMessage { * Tell the node to reboot in this many seconds (or <0 to cancel reboot) */ int32 reboot_seconds = 35; + + /* + * Get the Canned Message Plugin message part1 in the response to this message. + */ + bool get_canned_message_plugin_part1_request = 36; + RadioConfig 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; + RadioConfig 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; + RadioConfig 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; + RadioConfig 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; + RadioConfig get_canned_message_plugin_part5_response = 45; + + /* + * Set the canned message plugin part 1 text. + */ + string set_canned_message_plugin_part1 = 46; + + /* + * Set the canned message plugin part 2 text. + */ + string set_canned_message_plugin_part2 = 47; + + /* + * Set the canned message plugin part 3 text. + */ + string set_canned_message_plugin_part3 = 48; + + /* + * Set the canned message plugin part 4 text. + */ + string set_canned_message_plugin_part4 = 49; + + /* + * Set the canned message plugin part 5 text. + */ + string set_canned_message_plugin_part5 = 50; + } -} +} // AdminMessage diff --git a/deviceonly.options b/deviceonly.options index 9e04083..321174a 100644 --- a/deviceonly.options +++ b/deviceonly.options @@ -7,5 +7,11 @@ # 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 0d3110a..bd86446 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -87,7 +87,33 @@ message DeviceState { * Some GPSes seem to have bogus settings from the factory, so we always do one factory reset. */ 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; + +} // DeviceState /* * The on-disk saved channels diff --git a/radioconfig.options b/radioconfig.options index 3107589..77bc0d8 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -10,4 +10,9 @@ *UserPreferences.mqtt_password max_size:32 *UserPreferences.canned_message_plugin_allow_input_source max_size:16 -*UserPreferences.canned_message_plugin_messages max_size:1024 + +*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 diff --git a/radioconfig.proto b/radioconfig.proto index 82d93a0..d0699a5 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -586,13 +586,13 @@ message RadioConfig { /* * If non-zero, the device will fully power off this many seconds after external power is removed. - * + * */ uint32 on_battery_shutdown_after_secs = 153; /* * Overrides HOPS_RELIABLE and sets the maximum number of hops. This can't be greater than 7. - * + * */ uint32 hop_limit = 154; @@ -602,7 +602,7 @@ message RadioConfig { * If using the default server, this will only be honoured if set, otherwise the device will use the default username */ string mqtt_username = 155; - + /* * MQTT password to use (most useful for a custom MQTT server). * If using a custom server, this will be honoured even if empty. @@ -669,8 +669,11 @@ message RadioConfig { /* * 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; + //string canned_message_plugin_messages = 172; /* * CannedMessagePlugin also sends a bell character with the messages. @@ -678,6 +681,56 @@ message RadioConfig { */ bool canned_message_plugin_send_bell = 173; } - UserPreferences preferences = 1; + + + message CannedMessagePluginMessagePart1 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 1. + */ + string text = 1; + } + CannedMessagePluginMessagePart1 canned_message_plugin_message_part1 = 2; + + + message CannedMessagePluginMessagePart2 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 2. + */ + string text = 1; + } + CannedMessagePluginMessagePart2 canned_message_plugin_message_part2 = 3; + + + message CannedMessagePluginMessagePart3 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 3. + */ + string text = 1; + } + CannedMessagePluginMessagePart3 canned_message_plugin_message_part3 = 4; + + + message CannedMessagePluginMessagePart4 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 4. + */ + string text = 1; + } + CannedMessagePluginMessagePart4 canned_message_plugin_message_part4 = 5; + + + message CannedMessagePluginMessagePart5 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 5. + */ + string text = 1; + } + CannedMessagePluginMessagePart5 canned_message_plugin_message_part5 = 6; + } From 1774f7405c04ecaf35803d9285f0cf581fa94e01 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 19 Jan 2022 10:54:26 -0800 Subject: [PATCH 07/13] broke out canned messages --- admin.proto | 12 +++---- cannedmessages.options | 5 +++ cannedmessages.proto | 81 ++++++++++++++++++++++++++++++++++++++++++ radioconfig.options | 6 ---- radioconfig.proto | 51 +------------------------- 5 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 cannedmessages.options create mode 100644 cannedmessages.proto diff --git a/admin.proto b/admin.proto index ede7637..08f808c 100644 --- a/admin.proto +++ b/admin.proto @@ -7,6 +7,7 @@ option go_package = "github.com/meshtastic/gomeshproto"; import "channel.proto"; import "mesh.proto"; import "radioconfig.proto"; +import "cannedmessages.proto"; option java_outer_classname = "AdminProtos"; @@ -81,32 +82,31 @@ message AdminMessage { * Get the Canned Message Plugin message part1 in the response to this message. */ bool get_canned_message_plugin_part1_request = 36; - RadioConfig get_canned_message_plugin_part1_response = 37; - + CannedMessagePluginMessagePart1 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; - RadioConfig get_canned_message_plugin_part2_response = 39; + CannedMessagePluginMessagePart2 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; - RadioConfig get_canned_message_plugin_part3_response = 41; + CannedMessagePluginMessagePart3 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; - RadioConfig get_canned_message_plugin_part4_response = 43; + 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; - RadioConfig get_canned_message_plugin_part5_response = 45; + CannedMessagePluginMessagePart5 get_canned_message_plugin_part5_response = 45; /* * Set the canned message plugin part 1 text. diff --git a/cannedmessages.options b/cannedmessages.options new file mode 100644 index 0000000..d06a327 --- /dev/null +++ b/cannedmessages.options @@ -0,0 +1,5 @@ +*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 diff --git a/cannedmessages.proto b/cannedmessages.proto new file mode 100644 index 0000000..8a249da --- /dev/null +++ b/cannedmessages.proto @@ -0,0 +1,81 @@ +syntax = "proto3"; +/* + * Meshtastic protobufs + * + * For more information on protobufs (and tools to use them with the language of your choice) see + * https://developers.google.com/protocol-buffers/docs/proto3 + * + * We are not placing any of these defs inside a package, because if you do the + * resulting nanopb version is super verbose package mesh. + * + * Protobuf build instructions: + * + * To build java classes for reading writing: + * protoc -I=. --java_out /tmp mesh.proto + * + * To generate Nanopb c code: + * /home/kevinh/packages/nanopb-0.4.0-linux-x86/generator-bin/protoc --nanopb_out=/tmp -I=app/src/main/proto mesh.proto + * + * Nanopb binaries available here: https://jpa.kapsi.fi/nanopb/download/ use nanopb 0.4.0 + */ + +option java_package = "com.geeksville.mesh"; +option java_outer_classname = "CannedMessageConfigProtos"; +option optimize_for = LITE_RUNTIME; +option go_package = "github.com/meshtastic/gomeshproto"; + +/* + * Canned message plugin part 1 + */ +message CannedMessagePluginMessagePart1 { + /* + * Predefined messages for canned message plugin separated by '|' characters. + * This is part 1. + */ + string text = 1; +} + +/* + * 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/radioconfig.options b/radioconfig.options index 77bc0d8..ef3ca1f 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -10,9 +10,3 @@ *UserPreferences.mqtt_password max_size:32 *UserPreferences.canned_message_plugin_allow_input_source max_size:16 - -*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 diff --git a/radioconfig.proto b/radioconfig.proto index d0699a5..3cac3c2 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -683,54 +683,5 @@ message RadioConfig { } UserPreferences preferences = 1; +} // RadioConfig - message CannedMessagePluginMessagePart1 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 1. - */ - string text = 1; - } - CannedMessagePluginMessagePart1 canned_message_plugin_message_part1 = 2; - - - message CannedMessagePluginMessagePart2 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 2. - */ - string text = 1; - } - CannedMessagePluginMessagePart2 canned_message_plugin_message_part2 = 3; - - - message CannedMessagePluginMessagePart3 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 3. - */ - string text = 1; - } - CannedMessagePluginMessagePart3 canned_message_plugin_message_part3 = 4; - - - message CannedMessagePluginMessagePart4 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 4. - */ - string text = 1; - } - CannedMessagePluginMessagePart4 canned_message_plugin_message_part4 = 5; - - - message CannedMessagePluginMessagePart5 { - /* - * Predefined messages for canned message plugin separated by '|' characters. - * This is part 5. - */ - string text = 1; - } - CannedMessagePluginMessagePart5 canned_message_plugin_message_part5 = 6; - -} From 12257fcb75041f83f2764349c09d9b73d91aa8c5 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 19 Jan 2022 11:57:27 -0800 Subject: [PATCH 08/13] change return type --- admin.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin.proto b/admin.proto index 08f808c..4d13fb0 100644 --- a/admin.proto +++ b/admin.proto @@ -111,27 +111,27 @@ message AdminMessage { /* * Set the canned message plugin part 1 text. */ - string set_canned_message_plugin_part1 = 46; + CannedMessagePluginMessagePart1 set_canned_message_plugin_part1 = 46; /* * Set the canned message plugin part 2 text. */ - string set_canned_message_plugin_part2 = 47; + CannedMessagePluginMessagePart2 set_canned_message_plugin_part2 = 47; /* * Set the canned message plugin part 3 text. */ - string set_canned_message_plugin_part3 = 48; + CannedMessagePluginMessagePart3 set_canned_message_plugin_part3 = 48; /* * Set the canned message plugin part 4 text. */ - string set_canned_message_plugin_part4 = 49; + CannedMessagePluginMessagePart4 set_canned_message_plugin_part4 = 49; /* * Set the canned message plugin part 5 text. */ - string set_canned_message_plugin_part5 = 50; + CannedMessagePluginMessagePart5 set_canned_message_plugin_part5 = 50; } } // AdminMessage From 8f1209e3de678ffce55186486f369e0a76a275c2 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 19 Jan 2022 15:43:57 -0800 Subject: [PATCH 09/13] fix lint warnings; deprecate inital messages field --- admin.proto | 32 ++++++++++++++++---------------- deviceonly.proto | 2 +- radioconfig.proto | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/admin.proto b/admin.proto index 4d13fb0..89cb957 100644 --- a/admin.proto +++ b/admin.proto @@ -4,10 +4,10 @@ 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"; -import "cannedmessages.proto"; option java_outer_classname = "AdminProtos"; @@ -108,29 +108,29 @@ message AdminMessage { bool get_canned_message_plugin_part5_request = 44; CannedMessagePluginMessagePart5 get_canned_message_plugin_part5_response = 45; - /* - * Set the canned message plugin part 1 text. - */ + /* + * Set the canned message plugin part 1 text. + */ CannedMessagePluginMessagePart1 set_canned_message_plugin_part1 = 46; - /* - * Set the canned message plugin part 2 text. - */ + /* + * Set the canned message plugin part 2 text. + */ CannedMessagePluginMessagePart2 set_canned_message_plugin_part2 = 47; - /* - * Set the canned message plugin part 3 text. - */ + /* + * Set the canned message plugin part 3 text. + */ CannedMessagePluginMessagePart3 set_canned_message_plugin_part3 = 48; - /* - * Set the canned message plugin part 4 text. - */ + /* + * Set the canned message plugin part 4 text. + */ CannedMessagePluginMessagePart4 set_canned_message_plugin_part4 = 49; - /* - * Set the canned message plugin part 5 text. - */ + /* + * Set the canned message plugin part 5 text. + */ CannedMessagePluginMessagePart5 set_canned_message_plugin_part5 = 50; } diff --git a/deviceonly.proto b/deviceonly.proto index bd86446..7a68534 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -113,7 +113,7 @@ message DeviceState { */ string canned_message_plugin_message_part5 = 17; -} // DeviceState +} /* * The on-disk saved channels diff --git a/radioconfig.proto b/radioconfig.proto index fd8ca5a..199519a 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -673,7 +673,7 @@ message RadioConfig { * 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; + string canned_message_plugin_messages = 172 [deprecated = true]; /* * CannedMessagePlugin also sends a bell character with the messages. From ba8bbb90698cbcc170a3061ce920c3fbe80b8926 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Wed, 19 Jan 2022 16:57:45 -0800 Subject: [PATCH 10/13] need size eventho deprecated --- radioconfig.options | 1 + 1 file changed, 1 insertion(+) diff --git a/radioconfig.options b/radioconfig.options index ef3ca1f..c56c4d3 100644 --- a/radioconfig.options +++ b/radioconfig.options @@ -10,3 +10,4 @@ *UserPreferences.mqtt_password max_size:32 *UserPreferences.canned_message_plugin_allow_input_source max_size:16 +*UserPreferences.canned_message_plugin_messages max_size:200 From 5af171a1a25379869c4dd31fec2fefada3790ebe Mon Sep 17 00:00:00 2001 From: mkinney Date: Thu, 20 Jan 2022 10:03:25 -0800 Subject: [PATCH 11/13] Update README.md add ci badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 74be814..a291992 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Meshtastic-protobufs [![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/meshtastic/Meshtastic-protobufs) +[![CI](https://github.com/meshtastic/Meshtastic-protobufs/actions/workflows/ci.yml/badge.svg)](https://github.com/meshtastic/Meshtastic-protobufs/actions/workflows/ci.yml) The protobuf definitions for the Meshtastic project (used by apps and the device code) From 042d42122dd4f44ffeb5ea82b805e6631721e2b0 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 20 Jan 2022 18:43:16 -0600 Subject: [PATCH 12/13] Shutdown admin message --- admin.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin.proto b/admin.proto index 89cb957..2ba4e2a 100644 --- a/admin.proto +++ b/admin.proto @@ -133,5 +133,9 @@ message AdminMessage { */ CannedMessagePluginMessagePart5 set_canned_message_plugin_part5 = 50; + /* + * Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) + */ + int32 shutdown_seconds = 51; } } // AdminMessage From 3e847b17c9aee67e8301ee8402e17fa5a6598e79 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 22 Jan 2022 09:02:47 -0600 Subject: [PATCH 13/13] Adding bosch sensors for pending support in device --- radioconfig.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/radioconfig.proto b/radioconfig.proto index 199519a..e551cf9 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -554,6 +554,8 @@ message RadioConfig { DHT12 = 2; DHT21 = 3; DHT22 = 4; + BME280 = 5; + BME680 = 6; }; /*