From aa3c10b58ff9dc050c5de505521e7421c269f801 Mon Sep 17 00:00:00 2001 From: andrekir Date: Mon, 30 May 2022 10:35:01 -0300 Subject: [PATCH] create localonly protos common to app and device --- apponly.proto | 10 ++++-- deviceonly.proto | 72 ----------------------------------------- localonly.proto | 84 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 74 deletions(-) create mode 100644 localonly.proto diff --git a/apponly.proto b/apponly.proto index cee5af7..d1a9b8c 100644 --- a/apponly.proto +++ b/apponly.proto @@ -4,6 +4,7 @@ option java_package = "com.geeksville.mesh"; option optimize_for = LITE_RUNTIME; option go_package = "github.com/meshtastic/gomeshproto"; +import "config.proto"; import "channel.proto"; option java_outer_classname = "AppOnlyProtos"; @@ -18,7 +19,12 @@ option java_outer_classname = "AppOnlyProtos"; message ChannelSet { /* - * TODO: REPLACE + * Channel list with settings */ repeated ChannelSettings settings = 1; -} \ No newline at end of file + + /* + * LoRa config + */ + Config.LoRaConfig lora_config = 2; +} diff --git a/deviceonly.proto b/deviceonly.proto index 6bf83ef..7971acd 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -5,13 +5,10 @@ option optimize_for = LITE_RUNTIME; option go_package = "github.com/meshtastic/gomeshproto"; import "channel.proto"; -import "config.proto"; import "mesh.proto"; -import "module_config.proto"; option java_outer_classname = "DeviceOnly"; - /* * This message is never sent over the wire, but it is used for serializing DB * state to flash in the device code @@ -136,72 +133,3 @@ message OEMStore { */ string oem_text = 5; } - -message LocalConfig { - /* - * TODO: REPLACE - */ - Config.DeviceConfig device = 1; - - /* - * TODO: REPLACE - */ - Config.PositionConfig position = 2; - - /* - * TODO: REPLACE - */ - Config.PowerConfig power = 3; - - /* - * TODO: REPLACE - */ - Config.WiFiConfig wifi = 4; - - /* - * TODO: REPLACE - */ - Config.DisplayConfig display = 5; - - /* - * TODO: REPLACE - */ - Config.LoRaConfig lora = 6; -} - -message LocalModuleConfig { - /* - * TODO: REPLACE - */ - ModuleConfig.MQTTConfig mqtt = 1; - - /* - * TODO: REPLACE - */ - ModuleConfig.SerialConfig serial = 2; - - /* - * TODO: REPLACE - */ - ModuleConfig.ExternalNotificationConfig external_notification = 3; - - /* - * TODO: REPLACE - */ - ModuleConfig.StoreForwardConfig store_forward = 4; - - /* - * TODO: REPLACE - */ - ModuleConfig.RangeTestConfig range_test = 5; - - /* - * TODO: REPLACE - */ - ModuleConfig.TelemetryConfig telemetry = 6; - - /* - * TODO: REPLACE - */ - ModuleConfig.CannedMessageConfig canned_message = 7; -} \ No newline at end of file diff --git a/localonly.proto b/localonly.proto new file mode 100644 index 0000000..38d9542 --- /dev/null +++ b/localonly.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +option java_package = "com.geeksville.mesh"; +option optimize_for = LITE_RUNTIME; +option go_package = "github.com/meshtastic/gomeshproto"; + +import "config.proto"; +import "module_config.proto"; + +option java_outer_classname = "LocalOnlyProtos"; + +/* + * Protobuf structures common to apponly.proto and deviceonly.proto + * This is never sent over the wire, only for local use + */ + +message LocalConfig { + /* + * TODO: REPLACE + */ + Config.DeviceConfig device = 1; + + /* + * TODO: REPLACE + */ + Config.PositionConfig position = 2; + + /* + * TODO: REPLACE + */ + Config.PowerConfig power = 3; + + /* + * TODO: REPLACE + */ + Config.WiFiConfig wifi = 4; + + /* + * TODO: REPLACE + */ + Config.DisplayConfig display = 5; + + /* + * TODO: REPLACE + */ + Config.LoRaConfig lora = 6; +} + +message LocalModuleConfig { + /* + * TODO: REPLACE + */ + ModuleConfig.MQTTConfig mqtt = 1; + + /* + * TODO: REPLACE + */ + ModuleConfig.SerialConfig serial = 2; + + /* + * TODO: REPLACE + */ + ModuleConfig.ExternalNotificationConfig external_notification = 3; + + /* + * TODO: REPLACE + */ + ModuleConfig.StoreForwardConfig store_forward = 4; + + /* + * TODO: REPLACE + */ + ModuleConfig.RangeTestConfig range_test = 5; + + /* + * TODO: REPLACE + */ + ModuleConfig.TelemetryConfig telemetry = 6; + + /* + * TODO: REPLACE + */ + ModuleConfig.CannedMessageConfig canned_message = 7; +}