we on an aio now, only monitor one fan

This commit is contained in:
2026-05-23 14:49:49 +00:00
parent d903566362
commit 39174cb5f2
3 changed files with 4 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ struct network_t {
};
struct syssensors_t {
uint16_t fan_speed[2]; // left and right cpu fans
uint16_t fan_speed[1]; // just one fan (pump) we monitor
int16_t t_sensor; // ntc temp sensor
char hwmon[64];
};

View File

@@ -115,8 +115,6 @@ static void *display_thread(void *arg) {
{
// prepare some tricky sensors
const uint16_t avg_fan_speed = (sensors->sys.fan_speed[0] + sensors->sys.fan_speed[1]) / 2;
char gpudelta[5];
const uint8_t delta = sensors->gpu.temp_hotspot - sensors->gpu.temp_edge;
snprintf(gpudelta, sizeof(gpudelta), "%c%d", 1, delta);
@@ -136,7 +134,7 @@ static void *display_thread(void *arg) {
lcd_writef(&lcd, 34, 1, "%d/%d%c", sensors->gpu.temp_edge, sensors->gpu.temp_hotspot, 0);
lcd_writef(&lcd, 0, 2, "%.0fW", sensors->cpu.ptotal);
lcd_writef(&lcd, 5, 2, "%dR", avg_fan_speed);
lcd_writef(&lcd, 5, 2, "%dR", sensors->sys.fan_speed[0]);
lcd_writef(&lcd, 12, 2, "%c%s %c%s", 3, P_BYTES(sensors->net.upload, 1), 4, P_BYTES(sensors->net.download, 1));
lcd_writef(&lcd, 26, 2, "%4dR", sensors->gpu.fan_speed);
lcd_writef(&lcd, 32, 2, "%3d/%3dW", sensors->gpu.power_avg, sensors->gpu.power_cap);

View File

@@ -84,7 +84,7 @@ void sys_update_sensors(struct syssensors_t *s) {
if (!s->hwmon[0])
return;
static char buf[8];
fast_read_num_u16(s->hwmon, "/fan2_input", buf, &s->fan_speed[0], 1);
fast_read_num_u16(s->hwmon, "/fan7_input", buf, &s->fan_speed[1], 1);
fast_read_num_u16(s->hwmon, "/fan2_input", buf, &s->fan_speed[0], 1); // cpu fan, aka aio pump now
// fast_read_num_u16(s->hwmon, "/fan7_input", buf, &s->fan_speed[1], 1); // cpu opt
fast_read_num_i16(s->hwmon, "/temp5_input", buf, &s->t_sensor, 1000);
}