From 5425767b0d664bf5a92dbc26e206c1b2eb2584ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:27:51 +0100 Subject: [PATCH 1/5] add proto for RemoteHardware. This can be extended later, enables for now. --- admin.proto | 5 +++++ localonly.proto | 5 +++++ module_config.proto | 16 ++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/admin.proto b/admin.proto index 79a6687..873939b 100644 --- a/admin.proto +++ b/admin.proto @@ -105,6 +105,11 @@ message AdminMessage { * TODO: REPLACE */ AUDIO_CONFIG = 7; + + /* + * TODO: REPLACE + */ + REMOTEHARDWARE_CONFIG = 7; } /* diff --git a/localonly.proto b/localonly.proto index f4c1859..366ed02 100644 --- a/localonly.proto +++ b/localonly.proto @@ -100,6 +100,11 @@ message LocalModuleConfig { */ ModuleConfig.AudioConfig audio = 9; + /* + * The part of the config that is specific to the GPS module + */ + ModuleConfig.RemoteHardwareConfig remote_hardware = 10; + /* * 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/module_config.proto b/module_config.proto index c6e6cb0..4b4ad87 100644 --- a/module_config.proto +++ b/module_config.proto @@ -56,6 +56,17 @@ message ModuleConfig { bool json_enabled = 6; } + /* + * RemoteHardwareModule Config + */ + message RemoteHardwareConfig { + + /* + * Whether the Module is enabled + */ + bool enabled = 1; + } + /* * Audio Config for codec2 voice */ @@ -516,5 +527,10 @@ message ModuleConfig { */ AudioConfig audio = 8; + /* + * TODO: REPLACE + */ + RemoteHardwareConfig remote_hardware = 9; + } } From 7c7efe8cf5a95a23dcd2627aad468236fca99203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:34:40 +0100 Subject: [PATCH 2/5] fix dual enum --- admin.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.proto b/admin.proto index 873939b..53f1728 100644 --- a/admin.proto +++ b/admin.proto @@ -109,7 +109,7 @@ message AdminMessage { /* * TODO: REPLACE */ - REMOTEHARDWARE_CONFIG = 7; + REMOTEHARDWARE_CONFIG = 8; } /* From 9ba877271250f1a36a28432ee426a70affc841bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:35:22 +0100 Subject: [PATCH 3/5] Add Settings for Screen Layout --- config.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/config.proto b/config.proto index bfeb7a7..eafbdcd 100644 --- a/config.proto +++ b/config.proto @@ -466,6 +466,37 @@ message Config { * Override auto-detect in screen */ OledType oled = 7; + + enum DisplayMode { + /* + * Default. The old style for the 128x64 OLED screen + */ + DEFAULT = 0; + + /* + * Rearrange display elements to cater for bicolor OLED displays + */ + TWOCOLOR = 1; + + /* + * Same as TwoColor, but with inverted top bar. Not so good for Epaper displays + */ + INVERTED = 2; + + /* + * TFT Full Color Displays (not implemented yet) + */ + COLOR = 3; + } + /* + * Display Mode + */ + DisplayMode displaymode = 8; + + /* + * Print first line in pseudo-bold? FALSE is original style, TRUE is bold + */ + bool heading_bold = 9; } /* From a45968f9b4f84a3392230819da8b7daf83125d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 28 Dec 2022 23:49:34 +0100 Subject: [PATCH 4/5] add ringtone storage as extra file --- admin.options | 3 +++ admin.proto | 15 +++++++++++++++ rtttl.options | 1 + rtttl.proto | 18 ++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 rtttl.options create mode 100644 rtttl.proto diff --git a/admin.options b/admin.options index 0873a92..1495a50 100644 --- a/admin.options +++ b/admin.options @@ -2,3 +2,6 @@ *AdminMessage.set_canned_message_module_messages max_size:201 *AdminMessage.get_canned_message_module_messages_response max_size:201 + +*AdminMessage.set_ringtone_message max_size:231 +*AdminMessage.get_ringtone_response max_size:231 diff --git a/admin.proto b/admin.proto index 53f1728..8b203d9 100644 --- a/admin.proto +++ b/admin.proto @@ -178,6 +178,16 @@ message AdminMessage { */ DeviceMetadata get_device_metadata_response = 13; + /* + * Get the Ringtone in the response to this message. + */ + bool get_ringtone_request = 14; + + /* + * Get the Ringtone in the response to this message. + */ + string get_ringtone_response = 15; + /* * Set the owner for this node */ @@ -207,6 +217,11 @@ message AdminMessage { */ string set_canned_message_module_messages = 36; + /* + * Set the ringtone for ExternalNotification. + */ + string set_ringtone_message = 37; + /* * Begins an edit transaction for config, module config, owner, and channel settings changes * This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) diff --git a/rtttl.options b/rtttl.options new file mode 100644 index 0000000..1ae0c2f --- /dev/null +++ b/rtttl.options @@ -0,0 +1 @@ +*RTTTLConfig.ringtone max_size:230 diff --git a/rtttl.proto b/rtttl.proto new file mode 100644 index 0000000..2655c10 --- /dev/null +++ b/rtttl.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +option java_package = "com.geeksville.mesh"; +option java_outer_classname = "RTTTLConfigProtos"; +option optimize_for = LITE_RUNTIME; +option go_package = "github.com/meshtastic/go/generated"; +option csharp_namespace = "Meshtastic.Protobufs"; + +/* + * Canned message module configuration. + */ +message RTTTLConfig { + + /* + * Ringtone for PWM Buzzer in RTTTL Format. + */ + string ringtone = 1; +} From d3f236f074fbe72fcc999520fbd5249135aff7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 29 Dec 2022 14:14:23 +0100 Subject: [PATCH 5/5] Update localonly.proto --- localonly.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localonly.proto b/localonly.proto index 366ed02..46c83d8 100644 --- a/localonly.proto +++ b/localonly.proto @@ -101,7 +101,7 @@ message LocalModuleConfig { ModuleConfig.AudioConfig audio = 9; /* - * The part of the config that is specific to the GPS module + * The part of the config that is specific to the Remote Hardware module */ ModuleConfig.RemoteHardwareConfig remote_hardware = 10;