sp10 sensors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
diff --git a/driver-spondoolies.c b/driver-spondoolies.c
index 69be6b2..c0ed96a 100644
--- a/driver-spondoolies.c
+++ b/driver-spondoolies.c
@@ -185,8 +185,9 @@ static struct api_data *spondoolies_api_stats(struct cgpu_info *cgpu)
struct api_data *root = NULL;
root = api_add_int(root, "ASICs total rate", &a->temp_rate, false);
- root = api_add_int(root, "Temparature rear", &a->rear_temp, false);
root = api_add_int(root, "Temparature front", &a->front_temp, false);
+ root = api_add_int(root, "Temparature rear top", &a->rear_temp_top, false);
+ root = api_add_int(root, "Temparature rear bot", &a->rear_temp_bot, false);
return root;
}
@@ -330,18 +331,18 @@ static void spond_poll_stats(struct cgpu_info *spond, struct spond_adapter *a)
if (!fp) {
applog(LOG_DEBUG, "SPOND unable to open mg_rate_temp");
- a->temp_rate = a->rear_temp = a->front_temp = 0;
+ a->temp_rate = a->front_temp = a->rear_temp_top = a->rear_temp_bot = 0;
} else {
- int ret = fscanf(fp, "%d %d %d", &a->temp_rate, &a->rear_temp, &a->front_temp);
+ int ret = fscanf(fp, "%d %d %d %d", &a->temp_rate, &a->front_temp , &a->rear_temp_top , &a->rear_temp_bot);
- if (ret != 3)
- a->temp_rate = a->rear_temp = a->front_temp = 0;
+ if (ret != 4)
+ a->temp_rate = a->front_temp = a->rear_temp_top = a->rear_temp_bot = 0;
fclose(fp);
}
- applog(LOG_DEBUG, "SPOND poll_stats rate: %d rear: %d front: %d",
- a->temp_rate, a->rear_temp, a->front_temp);
+ applog(LOG_DEBUG, "SPOND poll_stats rate: %d front: %d rear(T/B): %d/%d",
+ a->temp_rate, a->front_temp , a->rear_temp_top, a->rear_temp_bot);
/* Use the rear temperature as the dev temperature for now */
- spond->temp = a->rear_temp;
+ spond->temp = (a->rear_temp_top + a->rear_temp_bot)/2;
}
// Return completed work to submit_nonce() and work_completed()
diff --git a/driver-spondoolies.h b/driver-spondoolies.h
index 484ce80..fe53001 100644
--- a/driver-spondoolies.h
+++ b/driver-spondoolies.h
@@ -63,8 +63,9 @@ struct spond_adapter {
// Temperature statistics
int temp_rate;
- int rear_temp;
int front_temp;
+ int rear_temp_top;
+ int rear_temp_bot;
// Last second we polled stats
time_t last_stats;