From 66e138c07248381c1a85e68e1d2bf1eeb546ad9e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 21 Feb 2024 15:13:54 -0600 Subject: [PATCH 1/4] adds ModuleSettings and position_precision to ChannelSettings --- meshtastic/channel.proto | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 7d2361a4..8c5bbdf7 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -83,6 +83,16 @@ message ChannelSettings { bool downlink_enabled = 6; } +/* + * This message is specifically for modules to store per-channel configuration data. + */ +message ModuleSettings { +/* + * Bits of precision for the location sent in position packets. + */ + uint32 position_precision = 1; +} + /* * A pair of a channel number, mode and the (sharable) settings for that channel */ @@ -132,4 +142,9 @@ message Channel { * TODO: REPLACE */ Role role = 3; -} \ No newline at end of file + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 4; +} From 93c1b33f2f2f10d5cdff94843884d54e2507483f Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 21 Feb 2024 18:58:23 -0600 Subject: [PATCH 2/4] revert channel_precision --- meshtastic/config.options | 2 -- meshtastic/config.proto | 5 ----- 2 files changed, 7 deletions(-) diff --git a/meshtastic/config.options b/meshtastic/config.options index ba8574ae..4490f082 100644 --- a/meshtastic/config.options +++ b/meshtastic/config.options @@ -12,5 +12,3 @@ *LoRaConfig.channel_num int_size:16 *PowerConfig.device_battery_ina_address int_size:8 - -*PositionConfig.channel_precision max_count:8 diff --git a/meshtastic/config.proto b/meshtastic/config.proto index c8533bbc..7ebbe45a 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -342,11 +342,6 @@ message Config { * Set where GPS is enabled, disabled, or not present */ GpsMode gps_mode = 13; - - /* - * Set GPS precision in bits per channel, or 0 for disabled - */ - repeated uint32 channel_precision = 14; } /* From 083d9e719028e8dad9437f41905b602839fdffc3 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 22 Feb 2024 00:31:35 -0600 Subject: [PATCH 3/4] Properly put module_settings inside the Channelsettings message --- meshtastic/channel.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/channel.proto b/meshtastic/channel.proto index 8c5bbdf7..2b10aaf8 100644 --- a/meshtastic/channel.proto +++ b/meshtastic/channel.proto @@ -81,6 +81,11 @@ message ChannelSettings { * If true, messages seen on the internet will be forwarded to the local mesh. */ bool downlink_enabled = 6; + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 7; } /* @@ -142,9 +147,4 @@ message Channel { * TODO: REPLACE */ Role role = 3; - - /* - * Per-channel module settings. - */ - ModuleSettings module_settings = 4; } From df085956824c6d2023ef77304a13024fb890e3d4 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 19 Feb 2024 21:44:04 -0600 Subject: [PATCH 4/4] Add precision_bits to location messages --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index af08b805..51f38bca 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -203,6 +203,11 @@ message Position { * detect lost updates if needed */ uint32 seq_number = 22; + + /* + * Indicates the bits of precision set by the sending node + */ + uint32 precision_bits = 23; } /*