mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-07 03:59:37 +00:00
adjusting params
This commit is contained in:
parent
4718aa7904
commit
6a8e6c15e0
@ -143,6 +143,12 @@ void FloodingRouter::mergeMyCoverage(CoverageFilter &coverage)
|
|||||||
|
|
||||||
float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming)
|
float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming)
|
||||||
{
|
{
|
||||||
|
// If we are a router or repeater, always forward because it's assumed these are in the most advantageous locations
|
||||||
|
if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER ||
|
||||||
|
config.device.role == meshtastic_Config_DeviceConfig_Role_REPEATER) {
|
||||||
|
return 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
// Retrieve recent direct neighbors within the time window
|
// Retrieve recent direct neighbors within the time window
|
||||||
std::vector<NodeNum> recentNeighbors = nodeDB->getDistinctRecentDirectNeighborIds(RECENCY_THRESHOLD_MINUTES * 60);
|
std::vector<NodeNum> recentNeighbors = nodeDB->getDistinctRecentDirectNeighborIds(RECENCY_THRESHOLD_MINUTES * 60);
|
||||||
|
|
||||||
|
@ -53,13 +53,14 @@ enum RxSource {
|
|||||||
#define NUM_HASH_FUNCTIONS 2
|
#define NUM_HASH_FUNCTIONS 2
|
||||||
|
|
||||||
// Base forwarding probability - never drop below this value
|
// Base forwarding probability - never drop below this value
|
||||||
#define BASE_FORWARD_PROB 0.1f
|
#define BASE_FORWARD_PROB 0.2f
|
||||||
|
|
||||||
// Coverage scaling factor
|
// Coverage scaling factor
|
||||||
#define COVERAGE_SCALE_FACTOR 0.9f
|
#define COVERAGE_SCALE_FACTOR 0.9f
|
||||||
|
|
||||||
// Recency threshold in minutes
|
// Recency threshold in minutes
|
||||||
#define RECENCY_THRESHOLD_MINUTES 5
|
// Currently set to 1 hour because that is the minimum interval for nodeinfo broadcasts
|
||||||
|
#define RECENCY_THRESHOLD_MINUTES 60
|
||||||
|
|
||||||
typedef int ErrorCode;
|
typedef int ErrorCode;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user