From 66e138c07248381c1a85e68e1d2bf1eeb546ad9e Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 21 Feb 2024 15:13:54 -0600 Subject: [PATCH 1/9] 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 7d2361a..8c5bbdf 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/9] 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 ba8574a..4490f08 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 c8533bb..7ebbe45 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/9] 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 8c5bbdf..2b10aaf 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/9] 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 af08b80..51f38bc 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; } /* From fcb9b31761cf65f98a005ba9cc2a5e45371a1d68 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 22 Feb 2024 07:11:54 -0600 Subject: [PATCH 5/9] Convert alt to int32 --- meshtastic/atak.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/atak.proto b/meshtastic/atak.proto index 182d739..c44479f 100644 --- a/meshtastic/atak.proto +++ b/meshtastic/atak.proto @@ -237,7 +237,7 @@ message PLI { /* * Altitude (ATAK prefers HAE) */ - uint32 altitude = 3; + int32 altitude = 3; /* * Speed @@ -248,4 +248,4 @@ message PLI { * Course in degrees */ uint32 course = 5; -} \ No newline at end of file +} From 4c433ee900e098036fb969338b8fdf8763b7ad9c Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Fri, 23 Feb 2024 23:38:22 -0500 Subject: [PATCH 6/9] Fix MeshPacket.to comment Looks like this became garbled in https://github.com/meshtastic/protobufs/commit/0221e83d689f7930ed3e5c474eff4fbb8697efbb. --- meshtastic/mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 51f38bc..93f991d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -901,8 +901,8 @@ message MeshPacket { fixed32 from = 1; /* - * The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only - * hurts the ble link though. + * The (immediate) destination for this packet. If we are using routing, the + * final destination will be in payload.dest */ fixed32 to = 2; From 6a28d24bd872dbf614784c963e0793282946c308 Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Fri, 23 Feb 2024 23:45:14 -0500 Subject: [PATCH 7/9] Remove fixed FIXME in mesh.proto Looks like these FIXMEs got fixed --- meshtastic/mesh.proto | 3 --- 1 file changed, 3 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 51f38bc..4863826 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -896,7 +896,6 @@ message MeshPacket { * The sending node number. * Note: Our crypto implementation uses this field as well. * See [crypto](/docs/overview/encryption) for details. - * FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. */ fixed32 from = 1; @@ -947,8 +946,6 @@ message MeshPacket { * any ACK or the completion of a mesh broadcast flood). * Note: Our crypto implementation uses this id as well. * See [crypto](/docs/overview/encryption) for details. - * FIXME - really should be fixed32 instead, this encoding only - * hurts the ble link though. */ fixed32 id = 6; From 9515cf2fb5d5e4e375bb6b11809817e439743ef3 Mon Sep 17 00:00:00 2001 From: Toby Murray Date: Sat, 24 Feb 2024 11:52:01 -0500 Subject: [PATCH 8/9] Remove mention of payload.dest --- meshtastic/mesh.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 93f991d..c60d68d 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -901,8 +901,7 @@ message MeshPacket { fixed32 from = 1; /* - * The (immediate) destination for this packet. If we are using routing, the - * final destination will be in payload.dest + * The (immediate) destination for this packet */ fixed32 to = 2; From 5241583565ccbbb4986180bf4c6eb7f8a0dec285 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 25 Feb 2024 03:58:08 +0800 Subject: [PATCH 9/9] 'station_g2' --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 4863826..6a97fc3 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -349,6 +349,11 @@ enum HardwareModel { */ RP2040_LORA = 30; + /* + * B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 + */ + STATION_G2 = 31; + /* * --------------------------------------------------------------------------- * Less common/prototype boards listed here (needs one more byte over the air)