From 9c1bf5b384cf6a4bc34b019a468f59fb779bf35d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 7 Jan 2025 19:29:16 -0600 Subject: [PATCH 01/13] Move nodedb to it's own message (and file) --- meshtastic/deviceonly.proto | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index c506137..8bb4603 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -220,11 +220,20 @@ message DeviceState { * The mesh's nodes with their available gpio pins for RemoteHardware module */ repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13; +} + +message NodeDatabase { + /* + * 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 + * NodeDB.cpp in the device code. + */ + uint32 version = 1; /* * New lite version of NodeDB to decrease memory footprint */ - repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector"]; + repeated NodeInfoLite nodes = 2 [(nanopb).callback_datatype = "std::vector"]; } /* From fde27e4ef0fcee967063ba353422ed5f9a1c4790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 18 Jan 2025 13:30:43 +0100 Subject: [PATCH 02/13] add dfrobot gravity rain gauge (#646) --- meshtastic/telemetry.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 688abf7..4b5b3f2 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -134,6 +134,16 @@ message EnvironmentMetrics { */ optional float radiation = 18; + /* + * Rainfall in the last hour in mm + */ + optional float rainfall_1h = 19; + + /* + * Rainfall in the last 24 hours in mm + */ + optional float rainfall_24h = 20; + } /* @@ -542,6 +552,11 @@ enum TelemetrySensorType { */ INA226 = 34; + /* + * DFRobot Gravity tipping bucket rain gauge + */ + DFROBOT_RAIN = 35; + } /* From 7f13df0e5f7cbb07f0e6f3a57c0d86ad448738db Mon Sep 17 00:00:00 2001 From: A_Ponzano Date: Sun, 19 Jan 2025 15:07:06 +0100 Subject: [PATCH 03/13] Update mesh.proto with meshlink (#644) --- meshtastic/mesh.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 556295f..502e65a 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -670,6 +670,11 @@ enum HardwareModel { */ MESH_TAB = 86; + /* + * MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog + * https://www.loraitalia.it + */ + MESHLINK = 87; /* From edc3a7bab55bcad7c32d5a6fc71a76053ef2a00a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 31 Jan 2025 20:09:19 -0600 Subject: [PATCH 04/13] Add 12 hour clock device display config --- meshtastic/config.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index 20334a9..95eb13e 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -743,6 +743,12 @@ message Config { * Indicates how to rotate or invert the compass output to accurate display on the display. */ CompassOrientation compass_orientation = 11; + + /* + * If false (default), the device will display the time in 24-hour format on screen. + * If true, the device will display the time in 12-hour format on screen. + */ + bool use_12h_clock = 12; } /* From 068646653e8375fc145988026ad242a3cf70f7ab Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 10 Feb 2025 14:28:21 -0600 Subject: [PATCH 05/13] Comment --- meshtastic/module_config.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/module_config.proto b/meshtastic/module_config.proto index 040b604..aa30abc 100644 --- a/meshtastic/module_config.proto +++ b/meshtastic/module_config.proto @@ -603,7 +603,7 @@ message ModuleConfig { } /* - * TODO: REPLACE + * Canned Messages Module Config */ message CannedMessageConfig { /* From 7f45a7e8d925ca24b6462ee292dbef61090f3019 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 11 Feb 2025 06:01:02 -0600 Subject: [PATCH 06/13] Decrease MQTT password size --- meshtastic/module_config.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/module_config.options b/meshtastic/module_config.options index fdde1b3..bf2a5f4 100644 --- a/meshtastic/module_config.options +++ b/meshtastic/module_config.options @@ -2,7 +2,7 @@ *MQTTConfig.address max_size:64 *MQTTConfig.username max_size:64 -*MQTTConfig.password max_size:64 +*MQTTConfig.password max_size:32 *MQTTConfig.root max_size:32 *AudioConfig.ptt_pin int_size:8 From ff6fce923a24c4a26164143c236e237435fe6c76 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sat, 22 Feb 2025 18:05:58 +0800 Subject: [PATCH 07/13] Deprecate did_gps_reset Removed in: https://github.com/meshtastic/firmware/pull/6116 --- meshtastic/deviceonly.proto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index c506137..65d4f95 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -205,9 +205,10 @@ message DeviceState { bool no_save = 9 [deprecated = true]; /* - * Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset. + * Previously used to manage GPS factory resets. + * Deprecated in 2.5.23 */ - bool did_gps_reset = 11; + bool did_gps_reset = 11 [deprecated = true]; /* * We keep the last received waypoint stored in the device flash, @@ -242,4 +243,4 @@ message ChannelFile { * NodeDB.cpp in the device code. */ uint32 version = 2; -} \ No newline at end of file +} From 91f73d032691008cae84965a6b3e733d0da2ed4f Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 23 Feb 2025 06:25:35 -0600 Subject: [PATCH 08/13] Add container messages for backup prefs --- meshtastic/deviceonly.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 8bb4603..43ecb0e 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -6,6 +6,7 @@ import "meshtastic/channel.proto"; import "meshtastic/mesh.proto"; import "meshtastic/telemetry.proto"; import "meshtastic/config.proto"; +import "meshtastic/localonly.proto"; import "nanopb.proto"; option csharp_namespace = "Meshtastic.Protobufs"; @@ -251,4 +252,34 @@ message ChannelFile { * NodeDB.cpp in the device code. */ uint32 version = 2; +} + +/* + * The on-disk backup of the node's preferences + */ + message BackupPrefs { + /* + * The version of the backup + */ + uint32 version = 1; + + /* + * The node's configuration + */ + LocalConfig config = 2; + + /* + * The node's module configuration + */ + LocalModuleConfig module_config = 3; + + /* + * The node's channels + */ + ChannelFile channels = 4; + + /* + * The node's user (owner) information + */ + User owner = 5; } \ No newline at end of file From 8b87eac4db0899d54eb11501b2a1ac76cefad6ec Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 23 Feb 2025 06:52:34 -0600 Subject: [PATCH 09/13] Name --- meshtastic/deviceonly.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 43ecb0e..bb57843 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -257,7 +257,7 @@ message ChannelFile { /* * The on-disk backup of the node's preferences */ - message BackupPrefs { + message BackupPreferences { /* * The version of the backup */ From 2a1386b151fb379f718d51ead179960e7ab8394a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 23 Feb 2025 08:42:31 -0600 Subject: [PATCH 10/13] Admin messages --- meshtastic/admin.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 809d7c6..6cfe6dc 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -154,6 +154,18 @@ message AdminMessage { PAXCOUNTER_CONFIG = 12; } + enum BackupLocation { + /* + * Backup to the internal flash + */ + FLASH = 0; + + /* + * Backup to the SD card + */ + SD = 1; + } + /* * TODO: REPLACE */ @@ -270,6 +282,16 @@ message AdminMessage { */ uint32 set_scale = 23; + /* + * Backup the node's preferences + */ + BackupLocation backup_preferences = 24; + + /* + * Restore the node's preferences + */ + BackupLocation restore_preferences = 25; + /* * Set the owner for this node */ From f3a57add1ae4be78af0b74fa97f4bf03cc34890d Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 23 Feb 2025 13:06:21 -0600 Subject: [PATCH 11/13] Timestamp --- meshtastic/deviceonly.proto | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meshtastic/deviceonly.proto b/meshtastic/deviceonly.proto index 16ab020..481bfba 100644 --- a/meshtastic/deviceonly.proto +++ b/meshtastic/deviceonly.proto @@ -264,23 +264,28 @@ message ChannelFile { */ uint32 version = 1; + /* + * The timestamp of the backup (if node has time) + */ + fixed32 timestamp = 2; + /* * The node's configuration */ - LocalConfig config = 2; + LocalConfig config = 3; /* * The node's module configuration */ - LocalModuleConfig module_config = 3; + LocalModuleConfig module_config = 4; /* * The node's channels */ - ChannelFile channels = 4; + ChannelFile channels = 5; /* * The node's user (owner) information */ - User owner = 5; + User owner = 6; } \ No newline at end of file From 2f6a133037310b0c8549b3f63dd76880a2b81fab Mon Sep 17 00:00:00 2001 From: mverch67 Date: Tue, 25 Feb 2025 00:20:33 +0100 Subject: [PATCH 12/13] map persistent UI data --- meshtastic/device_ui.options | 2 ++ meshtastic/device_ui.proto | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/meshtastic/device_ui.options b/meshtastic/device_ui.options index 56b684b..5aa61d0 100644 --- a/meshtastic/device_ui.options +++ b/meshtastic/device_ui.options @@ -6,3 +6,5 @@ *NodeFilter.hops_away int_size:8 *NodeFilter.channel int_size:8 *NodeHighlight.node_name max_size:16 +*GeoPoint.zoom int_size:8 +*Map.style max_size:20 diff --git a/meshtastic/device_ui.proto b/meshtastic/device_ui.proto index b704e47..9ac40a3 100644 --- a/meshtastic/device_ui.proto +++ b/meshtastic/device_ui.proto @@ -66,6 +66,11 @@ message DeviceUIConfig { * 8 integers for screen calibration data */ bytes calibration_data = 14; + + /* + * Map related data + */ + Map map_data = 15; } @@ -135,6 +140,40 @@ message NodeHighlight { } +message GeoPoint { + /* + * Zoom level + */ + int32 zoom = 1; + + /* + * Coordinate: latitude + */ + int32 latitude = 2; + + /* + * Coordinate: longitude + */ + int32 longitude = 3; +} + +message Map { + /* + * Home coordinates + */ + GeoPoint home = 1; + + /* + * Map tile style + */ + string style = 2; + + /* + * Map scroll follows GPS + */ + bool follow_gps = 3; +} + enum Theme { /* * Dark From 79298fcdf04c1e680f5abd875233394f44ddaf7a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 25 Feb 2025 07:26:25 -0600 Subject: [PATCH 13/13] Add remove_backup_preferences --- meshtastic/admin.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 6cfe6dc..e9691ed 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -292,6 +292,10 @@ message AdminMessage { */ BackupLocation restore_preferences = 25; + /* + * Remove backups of the node's preferences + */ + BackupLocation remove_backup_preferences = 26; /* * Set the owner for this node */