Spelling and fixing defaults

This commit is contained in:
Ben Meadors
2022-09-12 07:55:17 -05:00
parent a8711bc54a
commit 18f37981bb
5 changed files with 9 additions and 5 deletions

View File

@@ -183,6 +183,7 @@ void NodeDB::installDefaultConfig()
void NodeDB::initConfigIntervals()
{
config.position.gps_update_interval = default_gps_update_interval;
config.position.position_broadcast_secs = default_broadcast_interval_secs;
config.power.ls_secs = default_ls_secs;

View File

@@ -175,6 +175,7 @@ extern NodeDB nodeDB;
#define IF_ROUTER(routerVal, normalVal) ((config.device.role == Config_DeviceConfig_Role_ROUTER) ? (routerVal) : (normalVal))
#define default_gps_update_interval IF_ROUTER(30, 15 * 60)
#define default_broadcast_interval_secs IF_ROUTER(12 * 60 * 60, 15 * 60)
#define default_wait_bluetooth_secs IF_ROUTER(1, 60)
#define default_mesh_sds_timeout_secs IF_ROUTER(NODE_DELAY_FOREVER, 2 * 60 * 60)

View File

@@ -414,6 +414,8 @@ void RadioInterface::applyModemConfig()
if (power == 0)
power = 17; // Default to default power if we don't have a valid power
loraConfig.tx_power = power;
// Calculate the number of channels
uint32_t numChannels = floor((myRegion->freqEnd - myRegion->freqStart) / (myRegion->spacing + (bw / 1000)));