aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 21:56:12 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 23:55:27 +0200
commitd036cce744b4c0da6b147fe94d7f8ce723f8bb30 (patch)
treee24e0c097704a076bece519374017787d9ba793d /src/osmo-bts-sysmo/misc/sysmobts_mgr.c
parentc42bf5fdf5e933413ec0a480d5a2de42538e9c80 (diff)
sysmobts: Remove the sbt2050 timer and move defines back
We haven't done anything with the result of the micro controller query and querying every six hours for the temperature of the system will not help us. We need to query the temperatures more frequently but avoid writing to the eeprom too frequently so we will start another timer for that.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr.c')
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
index 55a270bb..496efd89 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
@@ -47,6 +47,12 @@ static int no_eeprom_write = 0;
static int daemonize = 0;
void *tall_mgr_ctx;
+/* every 6 hours means 365*4 = 1460 EEprom writes per year (max) */
+#define TEMP_TIMER_SECS (6 * 3600)
+
+/* every 1 hours means 365*24 = 8760 EEprom writes per year (max) */
+#define HOURS_TIMER_SECS (1 * 3600)
+
/* the initial state */
static struct sysmobts_mgr_instance manager = {
.config_file = "sysmobts-mgr.cfg",