summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
58746dd)
This will allow QCPUFreq to display a more accurate temperature value.
+ "load_bq27")
+ /sbin/modprobe bq27x00_battery
+ exit 0
+ ;;
"set_maxfreq")
#set scaling_max_freq
echo $2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
"set_maxfreq")
#set scaling_max_freq
echo $2 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
settings = new Settings;
settings->hide();
settings = new Settings;
settings->hide();
+ //applies the settings from the settings dialog
+ applySettings();
+
- // setup auto rotation
- setAutoRotation();
-
//initialize orientation
orientationChanged();
//initialize orientation
orientationChanged();
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
connect(ui->sr_box, SIGNAL(clicked()), this, SLOT(setSmartReflex()));
connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(refresh()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
- connect(settings, SIGNAL(settingsChanged()), this, SLOT(setAutoRotation()));
+ connect(settings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));
+ * SLOT: applies the settings from the Settings dialog.
+ */
+void MainWindow::applySettings()
+{
+ setAutoRotation();
+ setAdvancedTemperature();
+}
+
+
+/**
* Calls the QCPUFreq helper script with "sudo action param"
*
* @param action : the action of the helper script
* Calls the QCPUFreq helper script with "sudo action param"
*
* @param action : the action of the helper script
+ * Checks the settings if the "bq27x00_battery" needs to be loaded.
+ */
+void MainWindow::setAdvancedTemperature()
+{
+ if (settings->usePowerKernel() && settings->useAdvancedTemperature()) {
+ callHelper( "load_bq27", "null" );
+ }
+}
+
+
+/**
* Enables or disables the auto-rotation feature of Maemo5 devices.
*/
void MainWindow::setAutoRotation()
* Enables or disables the auto-rotation feature of Maemo5 devices.
*/
void MainWindow::setAutoRotation()
public slots:
void about();
void adjustFreq();
public slots:
void about();
void adjustFreq();
void orientationChanged();
void refresh();
void orientationChanged();
void refresh();
+ void setAdvancedTemperature();
void setAutoRotation();
void setSmartReflex();
void showHelp();
void setAutoRotation();
void setSmartReflex();
void showHelp();