Skip to content

Commit

Permalink
merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaw committed Feb 28, 2025
1 parent 8e3799b commit abaab31
Show file tree
Hide file tree
Showing 13 changed files with 405 additions and 23 deletions.
36 changes: 36 additions & 0 deletions meshtastic/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -270,6 +282,20 @@ message AdminMessage {
*/
uint32 set_scale = 23;

/*
* Backup the node's preferences
*/
BackupLocation backup_preferences = 24;

/*
* Restore the node's preferences
*/
BackupLocation restore_preferences = 25;

/*
* Remove backups of the node's preferences
*/
BackupLocation remove_backup_preferences = 26;
/*
* Set the owner for this node
*/
Expand Down Expand Up @@ -350,6 +376,16 @@ message AdminMessage {
*/
DeviceUIConfig store_ui_config = 46;

/*
* Set specified node-num to be ignored on the NodeDB on the device
*/
uint32 set_ignored_node = 47;

/*
* Set specified node-num to be un-ignored on the NodeDB on the device
*/
uint32 remove_ignored_node = 48;

/*
* 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)
Expand Down
37 changes: 36 additions & 1 deletion meshtastic/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ message Config {
* Uses position module configuration to determine TAK PLI broadcast interval.
*/
TAK_TRACKER = 10;

/*
* Description: Will always rebroadcast packets, but will do so after all other modes.
* Technical Details: Used for router nodes that are intended to provide additional coverage
* in areas not already covered by other routers, or to bridge around problematic terrain,
* but should not be given priority over other routers in order to avoid unnecessaraily
* consuming hops.
*/
ROUTER_LATE = 11;
}

/*
Expand Down Expand Up @@ -506,6 +515,26 @@ message Config {
* rsyslog Server and Port
*/
string rsyslog_server = 9;

/*
* Flags for enabling/disabling network protocols
*/
uint32 enabled_protocols = 10;

/*
* Available flags auxiliary network protocols
*/
enum ProtocolFlags {
/*
* Do not broadcast packets over any network protocol
*/
NO_BROADCAST = 0x0000;

/*
* Enable broadcasting packets via UDP over the local network
*/
UDP_BROADCAST = 0x0001;
}
}

/*
Expand Down Expand Up @@ -714,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;
}

/*
Expand Down Expand Up @@ -1104,4 +1139,4 @@ message Config {
SessionkeyConfig sessionkey = 9;
DeviceUIConfig device_ui = 10;
}
}
}
3 changes: 2 additions & 1 deletion meshtastic/device_only/deviceonly.options
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

*NodeInfoLite.channel int_size:8
*NodeInfoLite.hops_away int_size:8
*NodeInfoLite.next_hop int_size:8

*UserLite.long_name max_size:40
*UserLite.short_name max_size:5
*UserLite.public_key max_size:32 # public key
*UserLite.macaddr max_size:6 fixed_length:true
*UserLite.macaddr max_size:6 fixed_length:true
74 changes: 65 additions & 9 deletions meshtastic/device_only/deviceonly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ syntax = "proto3";

package meshtastic;

import "channel.proto";
import "localonly.proto";
import "mesh.proto";
import "telemetry.proto";
import "config.proto";
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";
Expand Down Expand Up @@ -139,7 +139,7 @@ message NodeInfoLite {
bool via_mqtt = 8;

/*
* Number of hops away from us this node is (0 if adjacent)
* Number of hops away from us this node is (0 if direct neighbor)
*/
optional uint32 hops_away = 9;

Expand All @@ -148,6 +148,17 @@ message NodeInfoLite {
* Persists between NodeDB internal clean ups
*/
bool is_favorite = 10;

/*
* True if node is in our ignored list
* Persists between NodeDB internal clean ups
*/
bool is_ignored = 11;

/*
* Last byte of the node number of the node that should be used as the next hop to reach this node.
*/
uint32 next_hop = 12;
}

/*
Expand Down Expand Up @@ -195,9 +206,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,
Expand All @@ -210,11 +222,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<meshtastic_NodeInfoLite>"];
repeated NodeInfoLite nodes = 2 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
}

/*
Expand All @@ -233,3 +254,38 @@ message ChannelFile {
*/
uint32 version = 2;
}

/*
* The on-disk backup of the node's preferences
*/
message BackupPreferences {
/*
* The version of the backup
*/
uint32 version = 1;

/*
* The timestamp of the backup (if node has time)
*/
fixed32 timestamp = 2;

/*
* The node's configuration
*/
LocalConfig config = 3;

/*
* The node's module configuration
*/
LocalModuleConfig module_config = 4;

/*
* The node's channels
*/
ChannelFile channels = 5;

/*
* The node's user (owner) information
*/
User owner = 6;
}
4 changes: 4 additions & 0 deletions meshtastic/device_ui.options
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
*DeviceUIConfig.screen_brightness int_size:8
*DeviceUIConfig.screen_timeout int_size:16
*DeviceUIConfig.ring_tone_id int_size:8
*DeviceUIConfig.calibration_data max_size:16
*NodeFilter.node_name max_size:16
*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
59 changes: 59 additions & 0 deletions meshtastic/device_ui.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ message DeviceUIConfig {
* Node list highlightening
*/
NodeHighlight node_highlight = 13;

/*
* 8 integers for screen calibration data
*/
bytes calibration_data = 14;

/*
* Map related data
*/
Map map_data = 15;
}


Expand Down Expand Up @@ -95,6 +105,11 @@ message NodeFilter {
*/
string node_name = 6;

/*
* Filter based on channel
*/
int32 channel = 7;

}

message NodeHighlight {
Expand Down Expand Up @@ -125,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
Expand Down Expand Up @@ -215,6 +264,16 @@ enum Language {
GREEK = 13;

/*
* Norwegian
*/
NORWEGIAN = 14;

/*
* Slovenian
*/
SLOVENIAN = 15;

/*
* Simplified Chinese (experimental)
*/
SIMPLIFIED_CHINESE = 30;
Expand Down
9 changes: 6 additions & 3 deletions meshtastic/mesh.options
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is
# outside of this envelope
*Data.payload max_size:237
*Data.payload max_size:233
*Data.bitfield int_size:8

*NodeInfo.channel int_size:8
Expand All @@ -26,6 +26,7 @@
# Big enough for 1.2.28.568032c-d
*MyNodeInfo.firmware_version max_size:18
*MyNodeInfo.device_id max_size:16
*MyNodeInfo.pio_env max_size:40

*MyNodeInfo.air_period_tx max_count:8
*MyNodeInfo.air_period_rx max_count:8
Expand All @@ -37,6 +38,8 @@
*MeshPacket.hop_limit int_size:8
*MeshPacket.hop_start int_size:8
*MeshPacket.channel int_size:8
*MeshPacket.next_hop int_size:8
*MeshPacket.relay_node int_size:8

*QueueStatus.res int_size:8
*QueueStatus.free int_size:8
Expand All @@ -59,7 +62,7 @@
# or fixed_length or fixed_count, or max_count

#This value may want to be a few bytes smaller to compensate for the parent fields.
*Compressed.data max_size:237
*Compressed.data max_size:233

*Waypoint.name max_size:30
*Waypoint.description max_size:100
Expand All @@ -74,4 +77,4 @@

*ChunkedPayload.chunk_count int_size:16
*ChunkedPayload.chunk_index int_size:16
*ChunkedPayload.payload_chunk max_size:228
*ChunkedPayload.payload_chunk max_size:228
Loading

0 comments on commit abaab31

Please sign in to comment.