kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
better nanopb
rodzic
2852e1edd2
commit
afe4133631
|
@ -1,7 +1,7 @@
|
||||||
# options for nanopb
|
# options for nanopb
|
||||||
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options
|
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options
|
||||||
|
|
||||||
*macaddr max_size:6 # macaddrs
|
*macaddr max_size:6 fixed_length:true # macaddrs
|
||||||
*id max_size:16 # node id strings
|
*id max_size:16 # node id strings
|
||||||
|
|
||||||
*User.long_name max_size:40
|
*User.long_name max_size:40
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
// per https://developers.google.com/protocol-buffers/docs/proto3
|
// per https://developers.google.com/protocol-buffers/docs/proto3
|
||||||
|
|
||||||
package mesh;
|
// We are not placing any of these defs inside a package, because if you do the resulting nanopb version is super verbose
|
||||||
|
// package mesh;
|
||||||
|
|
||||||
option java_package = "com.geeksville.mesh";
|
option java_package = "com.geeksville.mesh";
|
||||||
option java_outer_classname = "MeshProtos";
|
option java_outer_classname = "MeshProtos";
|
||||||
|
@ -46,6 +47,9 @@ message Position {
|
||||||
double longitude = 2;
|
double longitude = 2;
|
||||||
int32 altitude = 3;
|
int32 altitude = 3;
|
||||||
int32 battery_level = 4; // 0-100
|
int32 battery_level = 4; // 0-100
|
||||||
|
|
||||||
|
/// true if this position came from the GPS inside the esp32 board, false if it was from a helper app on the phone
|
||||||
|
bool from_hardware = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Times are typically not sent over the mesh, but they will be added to any Packet (chain of SubPacket)
|
// Times are typically not sent over the mesh, but they will be added to any Packet (chain of SubPacket)
|
||||||
|
|
Ładowanie…
Reference in New Issue