From 83f1918175cacb2e643e22652a3d2313f605c753 Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 3 Feb 2019 21:25:50 +0200 Subject: [PATCH] fix interpolation --- mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 304d07f..97f8fb4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -92,9 +92,7 @@ MainWindow::MainWindow(QWidget *parent) : ui->fanSlider->setDisabled(true); ui->fanSpinBox->setDisabled(true); } - if (nv->GPUList[currentGPUIndex].fanControlMode == 2) { - connect(fanUpdateTimer, SIGNAL(timeout()), this, SLOT(tempUpdater())); - } + if (!nv->GPUList[currentGPUIndex].manualFanCtrlAvailable) { // If manual fan control is not available for the GPU, disable the option QStandardItemModel *model = qobject_cast(ui->fanModeComboBox->model()); @@ -941,7 +939,7 @@ void MainWindow::generateFanPoint() if (nv->GPUList[currentGPUIndex].temp <= xCurvePoints[0]) { targetFanSpeed = yCurvePoints[0]; } - if (nv->GPUList[currentGPUIndex].temp >= xCurvePoints[xCurvePoints.size()-1]) { + else if (nv->GPUList[currentGPUIndex].temp >= xCurvePoints[xCurvePoints.size()-1]) { targetFanSpeed = yCurvePoints[yCurvePoints.size()-1]; } else { // Get the index of the leftmost point of the interpolated interval by comparing it to temperature