MapReport message and config for MQTT

pull/359/head^2
GUVWAF 2024-03-09 17:06:24 +01:00 zatwierdzone przez Thomas Göttgens
rodzic 5a97acb175
commit 3cc3e27e7c
4 zmienionych plików z 103 dodań i 1 usunięć

Wyświetl plik

@ -70,6 +70,31 @@ message ModuleConfig {
* If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection
*/
bool proxy_to_client_enabled = 9;
/*
* If true, we will periodically report unencrypted information about our node to a map via MQTT
*/
bool map_reporting_enabled = 10;
/*
* Settings for reporting information about our node to a map via MQTT
*/
MapReportSettings map_report_settings = 11;
}
/*
* Settings for reporting unencrypted information about our node to a map via MQTT
*/
message MapReportSettings {
/*
* How often we should report our info to the map (in seconds)
*/
uint32 publish_interval_secs = 1;
/*
* Bits of precision for the location sent (default of 32 is full precision).
*/
uint32 position_precision = 2;
}
/*

Wyświetl plik

@ -1,3 +1,7 @@
*ServiceEnvelope.packet type:FT_POINTER
*ServiceEnvelope.channel_id type:FT_POINTER
*ServiceEnvelope.gateway_id type:FT_POINTER
*ServiceEnvelope.gateway_id type:FT_POINTER
*MapReport.long_name max_size:40
*MapReport.short_name max_size:5
*MapReport.num_online_local_nodes int_size:16

Wyświetl plik

@ -3,6 +3,7 @@ syntax = "proto3";
package meshtastic;
import "meshtastic/mesh.proto";
import "meshtastic/config.proto";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
@ -30,4 +31,71 @@ message ServiceEnvelope {
* the globally trusted nodenum
*/
string gateway_id = 3;
}
/*
* Information about a node intended to be reported unencrypted to a map using MQTT.
*/
message MapReport {
/*
* A full name for this user, i.e. "Kevin Hester"
*/
string long_name = 1;
/*
* A VERY short name, ideally two characters.
* Suitable for a tiny OLED screen
*/
string short_name = 2;
/*
* Role of the node that applies specific settings for a particular use-case
*/
Config.DeviceConfig.Role role = 3;
/*
* Hardware model of the node, i.e. T-Beam, Heltec V3, etc...
*/
HardwareModel hw_model = 4;
/*
* The region code for the radio (US, CN, EU433, etc...)
*/
Config.LoRaConfig.RegionCode region = 5;
/*
* Modem preset used by the radio (LongFast, MediumSlow, etc...)
*/
Config.LoRaConfig.ModemPreset modem_preset = 6;
/*
* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
* and it uses the default frequency slot given the region and modem preset.
*/
bool has_default_channel = 7;
/*
* Latitude: multiply by 1e-7 to get degrees in floating point
*/
sfixed32 latitude_i = 8;
/*
* Longitude: multiply by 1e-7 to get degrees in floating point
*/
sfixed32 longitude_i = 9;
/*
* Altitude in meters above MSL
*/
int32 altitude = 10;
/*
* Indicates the bits of precision for latitude and longitude set by the sending node
*/
uint32 position_precision = 11;
/*
* Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT)
*/
uint32 num_online_local_nodes = 12;
}

Wyświetl plik

@ -191,6 +191,11 @@ enum PortNum {
*/
ATAK_PLUGIN = 72;
/*
* Provides unencrypted information about a node for consumption by a map via MQTT
*/
MAP_REPORT_APP = 73;
/*
* Private applications should use portnums >= 256.
* To simplify initial development and testing you can use "PRIVATE_APP"