Added color support in compact mode.

This commit is contained in:
2025-02-03 06:34:33 -08:00
parent 65aa52ac42
commit d4e32a78fc
4 changed files with 18 additions and 26 deletions
-15
View File
@@ -62,27 +62,12 @@ void print_icx3_fans_oneline(struct card_info *card)
struct icx3_fan_control fans[ICX3_MAX_FANS];
get_fan_status(fans, card);
printf("FAN");
for (int i=0; i < ICX3_MAX_FANS; i++) {
printf(" %3d", fans[i].duty_status);
}
printf("%%");
}
void print_icx3_temps_oneline(struct card_info *card)
{
float temps[ICX3_NUM_TEMP_SENSORS];
get_temp_sensors(temps, card);
for (int i=0; i<ICX3_NUM_TEMP_SENSORS; i++) {
/* If this math seems a little jank, it's so we can optionally inject the NVML and vram temps into the oneline */
if (i > 0 && strncmp(icx3_temp_sensor_names[i], icx3_temp_sensor_names[i-1], 3))
printf(" %.3s", icx3_temp_sensor_names[i]);
printf(" %3.0f", temps[i]);
}
}
void get_available_fans(char *fans_avail, struct card_info *card)
{
int product_id = card->product_id;