فهرست منبع

fix for hwmon with sensors in device subdirectory

Malte Veerman 5 سال پیش
والد
کامیت
5da848c28d
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 3 3
      import/src/hwmon.cpp
  2. 1 1
      import/src/temp.cpp

+ 3 - 3
import/src/hwmon.cpp

@@ -165,7 +165,7 @@ void Hwmon::initialize()
                 {
                     if (!m_pwmFans.contains(index))
                     {
-                        auto newPwmFan = new PwmFan(index, this);
+                        auto newPwmFan = new PwmFan(index, this, true);
                         connect(this, &Hwmon::sensorsUpdateNeeded, newPwmFan, &PwmFan::update);
 
                         if (m_parent)
@@ -182,7 +182,7 @@ void Hwmon::initialize()
                 {
                     if (!m_fans.contains(index))
                     {
-                        auto newFan = new Fan(index, this);
+                        auto newFan = new Fan(index, this, true);
                         connect(this, &Hwmon::sensorsUpdateNeeded, newFan, &Fan::update);
 
                         m_fans.insert(index, newFan);
@@ -195,7 +195,7 @@ void Hwmon::initialize()
             {
                 if (!m_temps.contains(index))
                 {
-                    auto newTemp = new Temp(index, this);
+                    auto newTemp = new Temp(index, this, true);
                     connect(this, &Hwmon::sensorsUpdateNeeded, newTemp, &Temp::update);
 
                     m_temps.insert(index, newTemp);

+ 1 - 1
import/src/temp.cpp

@@ -147,7 +147,7 @@ void Temp::update()
     const auto value = m_valueStream->readAll().toInt(&success) / 1000;
 
     if (!success)
-        emit error(i18n("Can't update value of temp: \'%1\'", parent()->path() + "/temp" + QString::number(index())));
+        emit error(i18n("Can't update value of temp: \'%1\'", id()));
 
     if (value != m_value)
     {