Skip to content

Commit 0c052b5

Browse files
authored
Merge pull request #549 from meshtastic/user-lite
User -> UserLite in NodeDB
2 parents 66eb318 + ee41c42 commit 0c052b5

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

meshtastic/deviceonly.options

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@
1414

1515
*NodeInfoLite.channel int_size:8
1616
*NodeInfoLite.hops_away int_size:8
17+
18+
*UserLite.long_name max_size:40
19+
*UserLite.short_name max_size:5
20+
*UserLite.public_key max_size:32 # public key
21+
*UserLite.macaddr max_size:6 fixed_length:true

meshtastic/deviceonly.proto

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import "meshtastic/channel.proto";
66
import "meshtastic/localonly.proto";
77
import "meshtastic/mesh.proto";
88
import "meshtastic/telemetry.proto";
9+
import "meshtastic/config.proto";
910
import "nanopb.proto";
1011

1112
option csharp_namespace = "Meshtastic.Protobufs";
@@ -51,6 +52,50 @@ message PositionLite {
5152
Position.LocSource location_source = 5;
5253
}
5354

55+
message UserLite {
56+
/*
57+
* This is the addr of the radio.
58+
*/
59+
bytes macaddr = 1 [deprecated = true];
60+
61+
/*
62+
* A full name for this user, i.e. "Kevin Hester"
63+
*/
64+
string long_name = 2;
65+
66+
/*
67+
* A VERY short name, ideally two characters.
68+
* Suitable for a tiny OLED screen
69+
*/
70+
string short_name = 3;
71+
72+
/*
73+
* TBEAM, HELTEC, etc...
74+
* Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
75+
* Apps will still need the string here for older builds
76+
* (so OTA update can find the right image), but if the enum is available it will be used instead.
77+
*/
78+
HardwareModel hw_model = 4;
79+
80+
/*
81+
* In some regions Ham radio operators have different bandwidth limitations than others.
82+
* If this user is a licensed operator, set this flag.
83+
* Also, "long_name" should be their licence number.
84+
*/
85+
bool is_licensed = 5;
86+
87+
/*
88+
* Indicates that the user's role in the mesh
89+
*/
90+
Config.DeviceConfig.Role role = 6;
91+
92+
/*
93+
* The public key of the user's device.
94+
* This is sent out to other nodes on the mesh to allow them to compute a shared secret key.
95+
*/
96+
bytes public_key = 7;
97+
}
98+
5499
message NodeInfoLite {
55100
/*
56101
* The node number
@@ -60,7 +105,7 @@ message NodeInfoLite {
60105
/*
61106
* The user info for this node
62107
*/
63-
User user = 2;
108+
UserLite user = 2;
64109

65110
/*
66111
* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.

0 commit comments

Comments
 (0)