Fix screen on secs (#1673)

* Fix screen on secs

* getIntervalOrDefaultMs

* Display correction

* Paren
This commit is contained in:
Ben Meadors
2022-09-03 22:10:11 -05:00
committed by GitHub
parent 84e438f72f
commit 285ba9639e
4 changed files with 17 additions and 17 deletions

View File

@@ -179,14 +179,20 @@ extern NodeDB nodeDB;
#define default_sds_secs 365 * 24 * 60 * 60
#define default_ls_secs IF_ROUTER(24 * 60 * 60, 5 * 60)
#define default_min_wake_secs 10
#define default_screen_on_secs 60 * 1000 * 10
#define default_screen_on_secs 60 * 10
inline uint32_t getIntervalOrDefaultMs(uint32_t interval)
inline uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval)
{
if (interval > 0) return interval * 1000;
if (configuredInterval > 0) return configuredInterval * 1000;
return default_broadcast_interval_secs * 1000;
}
inline uint32_t getConfiguredOrDefaultMs(uint32_t configuredInterval, uint32_t defaultInterval)
{
if (configuredInterval > 0) return configuredInterval * 1000;
return defaultInterval * 1000;
}
/** The current change # for radio settings. Starts at 0 on boot and any time the radio settings
* might have changed is incremented. Allows others to detect they might now be on a new channel.
*/