From 2b712f523c20f1d46263e98abed11d16fab1e7b9 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] 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; +}