Skip to content

Commit abaab31

Browse files
committed
merge upstream changes
1 parent 8e3799b commit abaab31

13 files changed

Lines changed: 405 additions & 23 deletions

meshtastic/admin.proto

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ message AdminMessage {
154154
PAXCOUNTER_CONFIG = 12;
155155
}
156156

157+
enum BackupLocation {
158+
/*
159+
* Backup to the internal flash
160+
*/
161+
FLASH = 0;
162+
163+
/*
164+
* Backup to the SD card
165+
*/
166+
SD = 1;
167+
}
168+
157169
/*
158170
* TODO: REPLACE
159171
*/
@@ -270,6 +282,20 @@ message AdminMessage {
270282
*/
271283
uint32 set_scale = 23;
272284

285+
/*
286+
* Backup the node's preferences
287+
*/
288+
BackupLocation backup_preferences = 24;
289+
290+
/*
291+
* Restore the node's preferences
292+
*/
293+
BackupLocation restore_preferences = 25;
294+
295+
/*
296+
* Remove backups of the node's preferences
297+
*/
298+
BackupLocation remove_backup_preferences = 26;
273299
/*
274300
* Set the owner for this node
275301
*/
@@ -350,6 +376,16 @@ message AdminMessage {
350376
*/
351377
DeviceUIConfig store_ui_config = 46;
352378

379+
/*
380+
* Set specified node-num to be ignored on the NodeDB on the device
381+
*/
382+
uint32 set_ignored_node = 47;
383+
384+
/*
385+
* Set specified node-num to be un-ignored on the NodeDB on the device
386+
*/
387+
uint32 remove_ignored_node = 48;
388+
353389
/*
354390
* Begins an edit transaction for config, module config, owner, and channel settings changes
355391
* This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)

meshtastic/config.proto

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ message Config {
9999
* Uses position module configuration to determine TAK PLI broadcast interval.
100100
*/
101101
TAK_TRACKER = 10;
102+
103+
/*
104+
* Description: Will always rebroadcast packets, but will do so after all other modes.
105+
* Technical Details: Used for router nodes that are intended to provide additional coverage
106+
* in areas not already covered by other routers, or to bridge around problematic terrain,
107+
* but should not be given priority over other routers in order to avoid unnecessaraily
108+
* consuming hops.
109+
*/
110+
ROUTER_LATE = 11;
102111
}
103112

104113
/*
@@ -506,6 +515,26 @@ message Config {
506515
* rsyslog Server and Port
507516
*/
508517
string rsyslog_server = 9;
518+
519+
/*
520+
* Flags for enabling/disabling network protocols
521+
*/
522+
uint32 enabled_protocols = 10;
523+
524+
/*
525+
* Available flags auxiliary network protocols
526+
*/
527+
enum ProtocolFlags {
528+
/*
529+
* Do not broadcast packets over any network protocol
530+
*/
531+
NO_BROADCAST = 0x0000;
532+
533+
/*
534+
* Enable broadcasting packets via UDP over the local network
535+
*/
536+
UDP_BROADCAST = 0x0001;
537+
}
509538
}
510539

511540
/*
@@ -714,6 +743,12 @@ message Config {
714743
* Indicates how to rotate or invert the compass output to accurate display on the display.
715744
*/
716745
CompassOrientation compass_orientation = 11;
746+
747+
/*
748+
* If false (default), the device will display the time in 24-hour format on screen.
749+
* If true, the device will display the time in 12-hour format on screen.
750+
*/
751+
bool use_12h_clock = 12;
717752
}
718753

719754
/*
@@ -1104,4 +1139,4 @@ message Config {
11041139
SessionkeyConfig sessionkey = 9;
11051140
DeviceUIConfig device_ui = 10;
11061141
}
1107-
}
1142+
}

meshtastic/device_only/deviceonly.options

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
*NodeInfoLite.channel int_size:8
1212
*NodeInfoLite.hops_away int_size:8
13+
*NodeInfoLite.next_hop int_size:8
1314

1415
*UserLite.long_name max_size:40
1516
*UserLite.short_name max_size:5
1617
*UserLite.public_key max_size:32 # public key
17-
*UserLite.macaddr max_size:6 fixed_length:true
18+
*UserLite.macaddr max_size:6 fixed_length:true

meshtastic/device_only/deviceonly.proto

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ syntax = "proto3";
22

33
package meshtastic;
44

5-
import "channel.proto";
6-
import "localonly.proto";
7-
import "mesh.proto";
8-
import "telemetry.proto";
9-
import "config.proto";
5+
import "meshtastic/channel.proto";
6+
import "meshtastic/mesh.proto";
7+
import "meshtastic/telemetry.proto";
8+
import "meshtastic/config.proto";
9+
import "meshtastic/localonly.proto";
1010
import "nanopb.proto";
1111

1212
option csharp_namespace = "Meshtastic.Protobufs";
@@ -139,7 +139,7 @@ message NodeInfoLite {
139139
bool via_mqtt = 8;
140140

141141
/*
142-
* Number of hops away from us this node is (0 if adjacent)
142+
* Number of hops away from us this node is (0 if direct neighbor)
143143
*/
144144
optional uint32 hops_away = 9;
145145

@@ -148,6 +148,17 @@ message NodeInfoLite {
148148
* Persists between NodeDB internal clean ups
149149
*/
150150
bool is_favorite = 10;
151+
152+
/*
153+
* True if node is in our ignored list
154+
* Persists between NodeDB internal clean ups
155+
*/
156+
bool is_ignored = 11;
157+
158+
/*
159+
* Last byte of the node number of the node that should be used as the next hop to reach this node.
160+
*/
161+
uint32 next_hop = 12;
151162
}
152163

153164
/*
@@ -195,9 +206,10 @@ message DeviceState {
195206
bool no_save = 9 [deprecated = true];
196207

197208
/*
198-
* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset.
209+
* Previously used to manage GPS factory resets.
210+
* Deprecated in 2.5.23
199211
*/
200-
bool did_gps_reset = 11;
212+
bool did_gps_reset = 11 [deprecated = true];
201213

202214
/*
203215
* We keep the last received waypoint stored in the device flash,
@@ -210,11 +222,20 @@ message DeviceState {
210222
* The mesh's nodes with their available gpio pins for RemoteHardware module
211223
*/
212224
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13;
225+
}
226+
227+
message NodeDatabase {
228+
/*
229+
* A version integer used to invalidate old save files when we make
230+
* incompatible changes This integer is set at build time and is private to
231+
* NodeDB.cpp in the device code.
232+
*/
233+
uint32 version = 1;
213234

214235
/*
215236
* New lite version of NodeDB to decrease memory footprint
216237
*/
217-
repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
238+
repeated NodeInfoLite nodes = 2 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
218239
}
219240

220241
/*
@@ -233,3 +254,38 @@ message ChannelFile {
233254
*/
234255
uint32 version = 2;
235256
}
257+
258+
/*
259+
* The on-disk backup of the node's preferences
260+
*/
261+
message BackupPreferences {
262+
/*
263+
* The version of the backup
264+
*/
265+
uint32 version = 1;
266+
267+
/*
268+
* The timestamp of the backup (if node has time)
269+
*/
270+
fixed32 timestamp = 2;
271+
272+
/*
273+
* The node's configuration
274+
*/
275+
LocalConfig config = 3;
276+
277+
/*
278+
* The node's module configuration
279+
*/
280+
LocalModuleConfig module_config = 4;
281+
282+
/*
283+
* The node's channels
284+
*/
285+
ChannelFile channels = 5;
286+
287+
/*
288+
* The node's user (owner) information
289+
*/
290+
User owner = 6;
291+
}

meshtastic/device_ui.options

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
*DeviceUIConfig.screen_brightness int_size:8
22
*DeviceUIConfig.screen_timeout int_size:16
33
*DeviceUIConfig.ring_tone_id int_size:8
4+
*DeviceUIConfig.calibration_data max_size:16
45
*NodeFilter.node_name max_size:16
56
*NodeFilter.hops_away int_size:8
7+
*NodeFilter.channel int_size:8
68
*NodeHighlight.node_name max_size:16
9+
*GeoPoint.zoom int_size:8
10+
*Map.style max_size:20

meshtastic/device_ui.proto

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ message DeviceUIConfig {
6161
* Node list highlightening
6262
*/
6363
NodeHighlight node_highlight = 13;
64+
65+
/*
66+
* 8 integers for screen calibration data
67+
*/
68+
bytes calibration_data = 14;
69+
70+
/*
71+
* Map related data
72+
*/
73+
Map map_data = 15;
6474
}
6575

6676

@@ -95,6 +105,11 @@ message NodeFilter {
95105
*/
96106
string node_name = 6;
97107

108+
/*
109+
* Filter based on channel
110+
*/
111+
int32 channel = 7;
112+
98113
}
99114

100115
message NodeHighlight {
@@ -125,6 +140,40 @@ message NodeHighlight {
125140

126141
}
127142

143+
message GeoPoint {
144+
/*
145+
* Zoom level
146+
*/
147+
int32 zoom = 1;
148+
149+
/*
150+
* Coordinate: latitude
151+
*/
152+
int32 latitude = 2;
153+
154+
/*
155+
* Coordinate: longitude
156+
*/
157+
int32 longitude = 3;
158+
}
159+
160+
message Map {
161+
/*
162+
* Home coordinates
163+
*/
164+
GeoPoint home = 1;
165+
166+
/*
167+
* Map tile style
168+
*/
169+
string style = 2;
170+
171+
/*
172+
* Map scroll follows GPS
173+
*/
174+
bool follow_gps = 3;
175+
}
176+
128177
enum Theme {
129178
/*
130179
* Dark
@@ -215,6 +264,16 @@ enum Language {
215264
GREEK = 13;
216265

217266
/*
267+
* Norwegian
268+
*/
269+
NORWEGIAN = 14;
270+
271+
/*
272+
* Slovenian
273+
*/
274+
SLOVENIAN = 15;
275+
276+
/*
218277
* Simplified Chinese (experimental)
219278
*/
220279
SIMPLIFIED_CHINESE = 30;

meshtastic/mesh.options

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

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

2323
*NodeInfo.channel int_size:8
@@ -26,6 +26,7 @@
2626
# Big enough for 1.2.28.568032c-d
2727
*MyNodeInfo.firmware_version max_size:18
2828
*MyNodeInfo.device_id max_size:16
29+
*MyNodeInfo.pio_env max_size:40
2930

3031
*MyNodeInfo.air_period_tx max_count:8
3132
*MyNodeInfo.air_period_rx max_count:8
@@ -37,6 +38,8 @@
3738
*MeshPacket.hop_limit int_size:8
3839
*MeshPacket.hop_start int_size:8
3940
*MeshPacket.channel int_size:8
41+
*MeshPacket.next_hop int_size:8
42+
*MeshPacket.relay_node int_size:8
4043

4144
*QueueStatus.res int_size:8
4245
*QueueStatus.free int_size:8
@@ -59,7 +62,7 @@
5962
# or fixed_length or fixed_count, or max_count
6063

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

6467
*Waypoint.name max_size:30
6568
*Waypoint.description max_size:100
@@ -74,4 +77,4 @@
7477

7578
*ChunkedPayload.chunk_count int_size:16
7679
*ChunkedPayload.chunk_index int_size:16
77-
*ChunkedPayload.payload_chunk max_size:228
80+
*ChunkedPayload.payload_chunk max_size:228

0 commit comments

Comments
 (0)