Merge pull request #550 from kanoi/master avalon, bab, drillbit, klondike use more screen space
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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
diff --git a/driver-avalon.c b/driver-avalon.c
index 1533ae9..1d00a5f 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -1479,7 +1479,7 @@ static void get_avalon_statline_before(char *buf, size_t bufsiz, struct cgpu_inf
temp = 99;
if (temp < 0)
temp = 0;
- tailsprintf(buf, bufsiz, "%2dC %3d %4dmV", temp, info->frequency, info->core_voltage);
+ tailsprintf(buf, bufsiz, "%2dC %3dMHz %4dmV", temp, info->frequency, info->core_voltage);
} else {
/* Find the lowest fan speed of the ASIC cooling fans. */
if (info->fan1 >= 0 && info->fan1 < lowfan)
diff --git a/driver-bab.c b/driver-bab.c
index c7c46e8..2d28f8e 100644
--- a/driver-bab.c
+++ b/driver-bab.c
@@ -2970,33 +2970,34 @@ static void bab_get_statline_before(char *buf, size_t bufsiz, struct cgpu_info *
#if UPDATE_HISTORY
struct timeval now;
double elapsed;
- int i, dead = 0;
+ int i, bad = 0;
cgtime(&now);
elapsed = tdiff(&now, &(babcgpu->dev_start_tv));
- // At least get 15s of nonces before saying anything is dead
+ // At least get 15s of nonces before saying anything is bad
if (elapsed > 15.0) {
K_RLOCK(babinfo->nfree_list);
for (i = 0; i < babinfo->chips; i++) {
- if (babinfo->disabled[i] ||
- (babinfo->good_nonces[i]->count == 0 &&
- babinfo->bad_nonces[i]->count > 1))
- dead++;
+ if (babinfo->good_nonces[i]->count == 0 &&
+ babinfo->bad_nonces[i]->count > 1)
+ bad++;
}
K_RUNLOCK(babinfo->nfree_list);
}
- tailsprintf(buf, bufsiz, "%d.%02d.%03d D:%03d",
+ tailsprintf(buf, bufsiz, "%d.%02d.%03d B:%03d D:%03d",
babinfo->banks,
babinfo->boards,
babinfo->chips,
- dead);
+ bad,
+ babinfo->total_disabled);
#else
- tailsprintf(buf, bufsiz, "B:%d B:%02d C:%03d",
+ tailsprintf(buf, bufsiz, "%d.%02d.%03d D:%03d",
babinfo->banks,
babinfo->boards,
- babinfo->chips);
+ babinfo->chips,
+ babinfo->total_disabled);
#endif
}
#endif
diff --git a/driver-drillbit.c b/driver-drillbit.c
index 9550a57..08bc997 100644
--- a/driver-drillbit.c
+++ b/driver-drillbit.c
@@ -422,27 +422,17 @@ static void drillbit_updatetemps(struct thr_info *thr)
static void drillbit_get_statline_before(char *buf, size_t bufsiz, struct cgpu_info *drillbit)
{
struct drillbit_info *info = drillbit->device_data;
- int temp, max_temp, space = 0;
-
- temp = (int)(info->temp);
-
- tailsprintf(buf, bufsiz, "%c%d", info->product[0], info->num_chips);
- if (info->num_chips < 10)
- space++;
-
- if ((info->capabilities & CAP_TEMP) && temp != 0) {
- if (temp > 999) // Fixed display space
- temp = 999;
- max_temp = (int)(info->max_temp);
- if (max_temp > 999) // Fixed display space
- max_temp = 999;
- if (max_temp < 100)
- space++;
- tailsprintf(buf, bufsiz, " %2d max%d.%d%*s",
- temp / 10, max_temp / 10, max_temp % 10, space, "");
+
+ if ((info->capabilities & CAP_TEMP) && info->temp != 0) {
+ tailsprintf(buf, bufsiz, "%c%2d %.1fC max%.1fC",
+ info->product[0],
+ info->num_chips,
+ (float)(info->temp/10.0),
+ (float)(info->max_temp/10.0));
} else {
- // Space out to the same width as if there was a temp field in place
- tailsprintf(buf, bufsiz, " %*s", space, "");
+ tailsprintf(buf, bufsiz, "%c%2d",
+ info->product[0],
+ info->num_chips);
}
}
diff --git a/driver-klondike.c b/driver-klondike.c
index 43adbae..1429041 100644
--- a/driver-klondike.c
+++ b/driver-klondike.c
@@ -1417,7 +1417,6 @@ static void get_klondike_statline_before(char *buf, size_t siz, struct cgpu_info
uint16_t fan = 0;
uint16_t clock = 0;
int dev, slaves;
- char tmp[16];
if (klninfo->status == NULL) {
blank_get_statline_before(buf, siz, klncgpu);
@@ -1436,17 +1435,13 @@ static void get_klondike_statline_before(char *buf, size_t siz, struct cgpu_info
fan /= slaves + 1;
//fan *= 100/255; // <-- You can't do this because int 100 / int 255 == 0
fan = 100 * fan / 255;
- if (fan > 99) // short on screen space
- fan = 99;
+ if (fan > 100)
+ fan = 100;
clock /= slaves + 1;
if (clock > 999) // error - so truncate it
clock = 999;
- snprintf(tmp, sizeof(tmp), "%2.0fC", cvtKlnToC(temp));
- if (strlen(tmp) < 4)
- strcat(tmp, " ");
-
- tailsprintf(buf, siz, "%3dMHz %2d%% %s", (int)clock, fan, tmp);
+ tailsprintf(buf, siz, "%3dMHz %3d%% %.1fC", (int)clock, (int)fan, cvtKlnToC(temp));
}
static struct api_data *klondike_api_stats(struct cgpu_info *klncgpu)