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