mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Add sanity check for map report interval and position precision (#3459)
* Add sanity check for map report interval and position precision * Use new `Default::` methods
This commit is contained in:
@@ -89,9 +89,11 @@ class MQTT : private concurrency::OSThread
|
||||
std::string mapTopic = "/2/map/"; // For protobuf-encoded MapReport messages
|
||||
|
||||
// For map reporting (only applies when enabled)
|
||||
const uint32_t default_map_position_precision = 14; // defaults to max. offset of ~1459m
|
||||
const uint32_t default_map_publish_interval_secs = 60 * 15; // defaults to 15 minutes
|
||||
uint32_t last_report_to_map = 0;
|
||||
uint32_t map_position_precision = 14; // defaults to max. offset of ~1459m
|
||||
uint32_t map_publish_interval_secs = 60 * 15; // defaults to 15 minutes
|
||||
uint32_t map_position_precision = default_map_position_precision;
|
||||
uint32_t map_publish_interval_msecs = default_map_publish_interval_secs * 1000;
|
||||
|
||||
/** return true if we have a channel that wants uplink/downlink or map reporting is enabled
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user