Try to refresh the temperature more often
authorDaniel Klaffenbach <danielklaffenbach@gmail.com>
Thu, 8 Jul 2010 19:17:51 +0000 (21:17 +0200)
committerDaniel Klaffenbach <danielklaffenbach@gmail.com>
Thu, 8 Jul 2010 19:17:51 +0000 (21:17 +0200)
Also read temp1_input instead of only temp1_input_raw. It appears
that reading both values refreshes the temperature more often.

src/mainwindow.cpp

index ae3ae67..faf34e4 100755 (executable)
@@ -158,6 +158,12 @@ QString MainWindow::getCPUTemp()
     if (file.exists())
        return QString( readSysFile( "class/power_supply/bq27200-0/temp" ) + " " + QString::fromUtf8("\302\260") + "C" );
     else {
+       /*
+           We actually only need to read the raw temperature, but it appears that by also reading temp1_input
+           the raw temperature (temp1_input_raw) is being updated more frequently.
+       */
+       readSysFile( "devices/platform/omap34xx_temp/temp1_input" );
+
        //read the current system temperature
        QString tstring = readSysFile( "devices/platform/omap34xx_temp/temp1_input_raw" );
        if (tstring == "0")