diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 21:56:12 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-21 23:55:27 +0200 |
commit | d036cce744b4c0da6b147fe94d7f8ce723f8bb30 (patch) | |
tree | e24e0c097704a076bece519374017787d9ba793d | |
parent | c42bf5fdf5e933413ec0a480d5a2de42538e9c80 (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.
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c | 13 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_misc.h | 6 |
3 files changed, 6 insertions, 19 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", diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c index dcb1eae8..90890e69 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c @@ -305,16 +305,6 @@ void sbts2050_uc_check_temp(int *temp_pa, int *temp_board) msgb_free(msg); } -static struct osmo_timer_list temp_uc_timer; -static void check_uctemp_timer_cb(void *data) -{ - int temp_pa = 0, temp_board = 0; - - sbts2050_uc_check_temp(&temp_pa, &temp_board); - - osmo_timer_schedule(&temp_uc_timer, TEMP_TIMER_SECS, 0); -} - void sbts2050_uc_initialize(void) { if (!is_sbts2050_master()) @@ -326,9 +316,6 @@ void sbts2050_uc_initialize(void) "Failed to open the serial interface\n"); return; } - - temp_uc_timer.cb = check_uctemp_timer_cb; - check_uctemp_timer_cb(NULL); } #else void sbts2050_uc_initialize(void) diff --git a/src/osmo-bts-sysmo/misc/sysmobts_misc.h b/src/osmo-bts-sysmo/misc/sysmobts_misc.h index b62e98dc..bddb1c20 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_misc.h +++ b/src/osmo-bts-sysmo/misc/sysmobts_misc.h @@ -3,12 +3,6 @@ #include <stdint.h> -/* 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) - enum sysmobts_temp_sensor { SYSMOBTS_TEMP_DIGITAL = 1, SYSMOBTS_TEMP_RF = 2, |