Merge pull request #356 from meshtastic/position-lite

PositionLite draft
pull/360/head
Ben Meadors 2023-06-07 10:38:00 -05:00 zatwierdzone przez GitHub
commit 67635cc7c7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 82 dodań i 4 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
# FIXME pick a higher number someday? or do dynamic alloc in nanopb?
*DeviceState.node_db max_count:80
*DeviceState.node_db_lite max_count:80
# FIXME - max_count is actually 32 but we save/load this as one long string of preencoded MeshPacket bytes - not a big array in RAM
*DeviceState.receive_queue max_count:1
@ -13,4 +14,6 @@
*OEMStore.oem_icon_bits max_size:2048
*OEMStore.oem_aes_key max_size:32
*DeviceState.node_remote_hardware_pins max_count:12
*DeviceState.node_remote_hardware_pins max_count:12
*NodeInfoLite.channel int_size:8

Wyświetl plik

@ -5,6 +5,7 @@ package meshtastic;
import "meshtastic/channel.proto";
import "meshtastic/localonly.proto";
import "meshtastic/mesh.proto";
import "meshtastic/telemetry.proto";
import "meshtastic/module_config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
@ -32,9 +33,10 @@ message DeviceState {
User owner = 3;
/*
* TODO: REPLACE
* Deprecated in 2.1.x
* Old node_db. See NodeInfoLite node_db_lite
*/
repeated NodeInfo node_db = 4;
repeated NodeInfo node_db = 4 [deprecated = true];
/*
* Received packets saved for delivery to the phone
@ -77,6 +79,79 @@ message DeviceState {
* The mesh's nodes with their available gpio pins for RemoteHardware module
*/
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13;
/*
* New lite version of NodeDB to decrease
*/
repeated NodeInfoLite node_db_lite = 14;
}
message NodeInfoLite {
/*
* The node number
*/
uint32 num = 1;
/*
* The user info for this node
*/
User user = 2;
/*
* 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.
* Position.time now indicates the last time we received a POSITION from that node.
*/
PositionLite position = 3;
/*
* Returns the Signal-to-noise ratio (SNR) of the last received message,
* as measured by the receiver. Return SNR of the last received message in dB
*/
float snr = 4;
/*
* Set to indicate the last time we received a packet from this node
*/
fixed32 last_heard = 5;
/*
* The latest device metrics for the node.
*/
DeviceMetrics device_metrics = 6;
/*
* local channel index we heard that node on. Only populated if its not the default channel.
*/
uint32 channel = 7;
}
/*
* Position with static location information only for NodeDBLite
*/
message PositionLite {
/*
* The new preferred location encoding, multiply by 1e-7 to get degrees
* in floating point
*/
sfixed32 latitude_i = 1;
/*
* TODO: REPLACE
*/
sfixed32 longitude_i = 2;
/*
* In meters above MSL (but see issue #359)
*/
int32 altitude = 3;
/*
* This is usually not sent over the mesh (to save space), but it is sent
* from the phone so that the local device can set its RTC If it is sent over
* the mesh (because there are devices on the mesh without GPS), it will only
* be sent by devices which has a hardware GPS clock.
* seconds since 1970
*/
fixed32 time = 4;
}
/*
@ -175,4 +250,4 @@ message NodeRemoteHardwarePin {
* The the available gpio pin for usage with RemoteHardware module
*/
RemoteHardwarePin pin = 2;
}
}