mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-04 02:34:14 +00:00
fixing ifdefs
This commit is contained in:
parent
aac890d537
commit
bcce6c83d9
@ -163,10 +163,8 @@ void FloodingRouter::mergeMyCoverage(CoverageFilter &coverage)
|
||||
|
||||
float FloodingRouter::calculateForwardProbability(const CoverageFilter &incoming, NodeNum from)
|
||||
{
|
||||
#ifdef USERPREFS_USE_COVERAGE_FILTER
|
||||
bool useCoverageFilter = USERPREFS_USE_COVERAGE_FILTER;
|
||||
if (!useCoverageFilter)
|
||||
return 1.0f;
|
||||
#if defined(USERPREFS_USE_COVERAGE_FILTER) && USERPREFS_USE_COVERAGE_FILTER == true
|
||||
return 1.0f;
|
||||
#endif
|
||||
// If we are a router or repeater, always forward because it's assumed these are in the most advantageous locations
|
||||
// or if we haven't heard from any other nodes within the stale coverage time, fall back to always forward
|
||||
|
@ -36,7 +36,7 @@ enum RxSource {
|
||||
* too long.
|
||||
**/
|
||||
|
||||
#if defined(USERPREFS_USE_COVERAGE_FILTER) && USERPREFS_USE_COVERAGE_FILTER
|
||||
#if defined(USERPREFS_USE_COVERAGE_FILTER) && USERPREFS_USE_COVERAGE_FILTER == true
|
||||
#define HOP_MAX 15
|
||||
#else
|
||||
#define HOP_MAX 7
|
||||
|
@ -494,10 +494,8 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
||||
config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;
|
||||
#endif
|
||||
config.lora.hop_limit = HOP_RELIABLE;
|
||||
#ifdef USERPREFS_USE_COVERAGE_FILTER
|
||||
bool useCoverageFilter = USERPREFS_USE_COVERAGE_FILTER;
|
||||
if (useCoverageFilter)
|
||||
config.lora.hop_limit = HOP_MAX;
|
||||
#if defined(USERPREFS_USE_COVERAGE_FILTER) && USERPREFS_USE_COVERAGE_FILTER == true
|
||||
config.lora.hop_limit = HOP_MAX;
|
||||
#endif
|
||||
#ifdef USERPREFS_CONFIG_LORA_IGNORE_MQTT
|
||||
config.lora.ignore_mqtt = USERPREFS_CONFIG_LORA_IGNORE_MQTT;
|
||||
|
@ -35,5 +35,5 @@
|
||||
// "USERPREFS_USE_ADMIN_KEY_1": "{}",
|
||||
// "USERPREFS_USE_ADMIN_KEY_2": "{}",
|
||||
// "USERPREFS_NODEINFO_BROADCAST_CHANNEL_HASH": "8",
|
||||
"USERPREFS_USE_COVERAGE_FILTER": "true"
|
||||
"USERPREFS_USE_COVERAGE_FILTER": "false"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user