mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
Extract default intervals and coalesce methods into their own file / static class methods (#3425)
* Extract default intervals and coalesce methods into their own file / static class methods * Missed pax * Still managed to miss one
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "configuration.h"
|
||||
#if defined(ARCH_ESP32)
|
||||
#include "Default.h"
|
||||
#include "MeshService.h"
|
||||
#include "PaxcounterModule.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
PaxcounterModule *paxcounterModule;
|
||||
@@ -82,9 +82,9 @@ int32_t PaxcounterModule::runOnce()
|
||||
if (isActive()) {
|
||||
if (firstTime) {
|
||||
firstTime = false;
|
||||
LOG_DEBUG(
|
||||
"Paxcounter starting up with interval of %d seconds\n",
|
||||
getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval, default_broadcast_interval_secs));
|
||||
LOG_DEBUG("Paxcounter starting up with interval of %d seconds\n",
|
||||
Default::getConfiguredOrDefault(moduleConfig.paxcounter.paxcounter_update_interval,
|
||||
default_broadcast_interval_secs));
|
||||
struct libpax_config_t configuration;
|
||||
libpax_default_config(&configuration);
|
||||
|
||||
@@ -104,7 +104,8 @@ int32_t PaxcounterModule::runOnce()
|
||||
} else {
|
||||
sendInfo(NODENUM_BROADCAST);
|
||||
}
|
||||
return getConfiguredOrDefaultMs(moduleConfig.paxcounter.paxcounter_update_interval, default_broadcast_interval_secs);
|
||||
return Default::getConfiguredOrDefaultMs(moduleConfig.paxcounter.paxcounter_update_interval,
|
||||
default_broadcast_interval_secs);
|
||||
} else {
|
||||
return disable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user