mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Refactor smart position to use throttle helper (#3671)
* Added one minute throttling to NodeDB * Derp * Refactor smart-position to use throttle
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "Default.h"
|
||||
#include "ProtobufModule.h"
|
||||
#include "concurrency/OSThread.h"
|
||||
|
||||
@@ -29,7 +30,8 @@ class PositionModule : public ProtobufModule<meshtastic_Position>, private concu
|
||||
/**
|
||||
* Send our position into the mesh
|
||||
*/
|
||||
void sendOurPosition(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false, uint8_t channel = 0);
|
||||
void sendOurPosition(NodeNum dest, bool wantReplies = false, uint8_t channel = 0);
|
||||
void sendOurPosition();
|
||||
|
||||
void handleNewPosition();
|
||||
|
||||
@@ -52,6 +54,9 @@ class PositionModule : public ProtobufModule<meshtastic_Position>, private concu
|
||||
meshtastic_MeshPacket *allocAtakPli();
|
||||
uint32_t precision;
|
||||
void sendLostAndFoundText();
|
||||
|
||||
const uint32_t minimumTimeThreshold =
|
||||
Default::getConfiguredOrDefaultMs(config.position.broadcast_smart_minimum_interval_secs, 30);
|
||||
};
|
||||
|
||||
struct SmartPosition {
|
||||
|
||||
Reference in New Issue
Block a user