Revert "op_cpusettings.sh: Shows warning message if user tries to change OPP with...
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 27 Mar 2012 22:37:24 +0000 (01:37 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 27 Mar 2012 22:38:17 +0000 (01:38 +0300)
This reverts commit 6b644025757beecd970a383872c90f451be28ef2,
as OPP is implemented in kernel.

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_cpusettings.sh

index b120e0b..bf97b54 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r87"
+PR = "r88"
 
 SRC_URI = " \
           file://op_paths.sh \
 
 SRC_URI = " \
           file://op_paths.sh \
index 3d2a0ec..aa627a8 100755 (executable)
@@ -13,19 +13,14 @@ while mainsel=$(zenity --title="CPU-Settings" --width="400" --height="350" --lis
 case $mainsel in
 
   "opp")
 case $mainsel in
 
   "opp")
-    kernel_major=`uname -r | cut -c 1`
-    if [ "$kernel_major" = "3" ]; then 
-      zenity --info --title="OPP not supported" --text "Sorry, the experimental kernel does not support overvolting.\n\nTherefore, you cannot configure these CPU-Settings."
-    else
-      opp="$(cat /etc/pandora/conf/cpu.conf | grep opp | awk -F\: '{print $2}')"
-      if zenity --question --title="OPP Setting Info" --text="WARNING!\n\nIncreasing the maximum allowed OPP will allow you to overclock to higher values.\n\nHowever, besides using more power, it ALSO DECREASES THE LIFETIME OF YOUR CPU!\n\nBe absolutely sure you know what you are doing here. \n\nThe standard OPP setting is 3, everything above is out of the specification!" --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then
-       if newopp=$(zenity --scale --text "Set the maximum allowed OPP" --min-value=3 --max-value=5 --value=$opp --step 1); then
-         echo $newopp > /proc/pandora/cpu_opp_max
-         sed -i "s/.*maxopp.*/maxopp:$newopp/g" /etc/pandora/conf/cpu.conf
-         zenity --info --title="OPP Set" --text "The maximum allowed OPP value has been set to $newopp." --timeout 6
-       else
-         zenity --info --title="No change" --text "The maximum OPP value has not been changed." --timeout 6
-       fi
+    opp="$(cat /etc/pandora/conf/cpu.conf | grep opp | awk -F\: '{print $2}')"
+    if zenity --question --title="OPP Setting Info" --text="WARNING!\n\nIncreasing the maximum allowed OPP will allow you to overclock to higher values.\n\nHowever, besides using more power, it ALSO DECREASES THE LIFETIME OF YOUR CPU!\n\nBe absolutely sure you know what you are doing here. \n\nThe standard OPP setting is 3, everything above is out of the specification!" --ok-label="Yes, I know what I'm doing!" --cancel-label="I'm scared!"; then
+      if newopp=$(zenity --scale --text "Set the maximum allowed OPP" --min-value=3 --max-value=5 --value=$opp --step 1); then
+       echo $newopp > /proc/pandora/cpu_opp_max
+       sed -i "s/.*maxopp.*/maxopp:$newopp/g" /etc/pandora/conf/cpu.conf
+       zenity --info --title="OPP Set" --text "The maximum allowed OPP value has been set to $newopp." --timeout 6
+      else
+       zenity --info --title="No change" --text "The maximum OPP value has not been changed." --timeout 6
       fi
     fi;;
 
       fi
     fi;;