projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added support of BCM2835 which is mostly used by the raspberry pi3
[psensor.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index
6037469
..
a24c636
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2010-201
4
jeanfi@gmail.com
+ * Copyright (C) 2010-201
7
jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@
-31,6
+31,7
@@
#include <config.h>
#include <amd.h>
#include <config.h>
#include <amd.h>
+#include <bcm2835.h>
#include <cfg.h>
#include <graph.h>
#include <hdd.h>
#include <cfg.h>
#include <graph.h>
#include <hdd.h>
@@
-144,6
+145,7
@@
static void *update_measures(void *data)
gtop2_psensor_list_update(sensors);
atasmart_psensor_list_update(sensors);
hddtemp_psensor_list_update(sensors);
gtop2_psensor_list_update(sensors);
atasmart_psensor_list_update(sensors);
hddtemp_psensor_list_update(sensors);
+ bcm2835_psensor_list_update(sensors);
psensor_log_measures(sensors);
psensor_log_measures(sensors);
@@
-185,7
+187,6
@@
static gboolean ui_refresh_thread(gpointer data)
struct config *cfg;
gboolean ret;
struct ui_psensor *ui = (struct ui_psensor *)data;
struct config *cfg;
gboolean ret;
struct ui_psensor *ui = (struct ui_psensor *)data;
- int use_celsius;
ret = TRUE;
cfg = ui->config;
ret = TRUE;
cfg = ui->config;
@@
-199,10
+200,6
@@
static gboolean ui_refresh_thread(gpointer data)
if (is_appindicator_supported() || is_status_supported())
indicators_update(ui);
if (is_appindicator_supported() || is_status_supported())
indicators_update(ui);
- if (config_get_temperature_unit() == CELSIUS)
- use_celsius = 1;
- else
- use_celsius = 0;
ui_unity_launcher_entry_update(ui->sensors);
if (ui->graph_update_interval != cfg->graph_update_interval) {
ui_unity_launcher_entry_update(ui->sensors);
if (ui->graph_update_interval != cfg->graph_update_interval) {
@@
-232,7
+229,7
@@
associate_cb_alarm_raised(struct psensor **sensors, struct ui_psensor *ui)
{
bool ret;
struct psensor *s;
{
bool ret;
struct psensor *s;
- double
d,
high_temp;
+ double high_temp;
high_temp = config_get_default_high_threshold_temperature();
high_temp = config_get_default_high_threshold_temperature();
@@
-420,6
+417,8
@@
static struct psensor **create_sensors_list(const char *url)
if (config_is_udisks2_enabled())
udisks2_psensor_list_append(&sensors, 600);
if (config_is_udisks2_enabled())
udisks2_psensor_list_append(&sensors, 600);
+
+ bcm2835_psensor_list_append(&sensors, 600);
}
associate_preferences(sensors);
}
associate_preferences(sensors);