adjusting params

This commit is contained in:
medentem 2024-12-23 13:50:20 -06:00
parent 4718aa7904
commit 6a8e6c15e0
2 changed files with 9 additions and 2 deletions

View File

@ -143,6 +143,12 @@ void FloodingRouter::mergeMyCoverage(CoverageFilter &coverage)
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
std::vector<NodeNum> recentNeighbors = nodeDB->getDistinctRecentDirectNeighborIds(RECENCY_THRESHOLD_MINUTES * 60);

View File

@ -53,13 +53,14 @@ enum RxSource {
#define NUM_HASH_FUNCTIONS 2
// Base forwarding probability - never drop below this value
#define BASE_FORWARD_PROB 0.1f
#define BASE_FORWARD_PROB 0.2f
// Coverage scaling factor
#define COVERAGE_SCALE_FACTOR 0.9f
// 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;