From ece88d70acdf424767321b0c0ecb2539ee6b3557 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 8 Jun 2010 00:26:29 +0300 Subject: [PATCH] pandora-scripts: add op_lcdrate.sh This is inteded to be used by programs (or the user directly) to change LCD refresh rate. Useful for emulators mostly to match screen refresh rate of emulated system. --- recipes/pandora-system/pandora-scripts.bb | 4 ++- .../pandora-scripts/op_lcdrate.sh | 28 +++++++++++++++++++ .../pandora-sudoers/50_openpandora | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 recipes/pandora-system/pandora-scripts/op_lcdrate.sh diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index 06c33f7..4e9367e 100644 --- a/recipes/pandora-system/pandora-scripts.bb +++ b/recipes/pandora-system/pandora-scripts.bb @@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" DEPENDS = "zenity dbus" RDEPENDS = "zenity dbus" -PR = "r24" +PR = "r25" SRC_URI = " \ file://op_bright.sh \ @@ -34,6 +34,7 @@ SRC_URI = " \ # file://op_usermanager.desktop \ file://op_lcdsettings.sh \ # file://op_lcdsettings.desktop \ + file://op_lcdrate.sh \ file://op_nubmode.sh \ # file://op_nubmode.desktop \ file://gui.conf \ @@ -54,6 +55,7 @@ do_install() { install -m 0755 ${WORKDIR}/op_datetime.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_usermanager.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_lcdsettings.sh ${D}${prefix}/pandora/scripts/ + install -m 0755 ${WORKDIR}/op_lcdrate.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_nubmode.sh ${D}${prefix}/pandora/scripts/ install -d ${D}${prefix}/pandora/apps/ diff --git a/recipes/pandora-system/pandora-scripts/op_lcdrate.sh b/recipes/pandora-system/pandora-scripts/op_lcdrate.sh new file mode 100755 index 0000000..928ee83 --- /dev/null +++ b/recipes/pandora-system/pandora-scripts/op_lcdrate.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# LCD mode setup script +# Copyright (c) 2010, Gražvydas Ignotas +# License: BSD (http://www.opensource.org/licenses/bsd-license.php) + +modedb="\ +60|36000,800/68/214/1,480/39/34/1 \ +50|36000,800/189/214/1,480/83/34/1" + +# timings file for LCD device +timings_file="/sys/devices/platform/omapdss/display0/timings" + + +set -e + +for mode in $modedb +do + name=`echo $mode | awk -F '|' '{print $1}'` + if [ "x$name" = "x$1" ] + then + timings=`echo $mode | awk -F '|' '{print $2}'` + echo $timings > $timings_file + exit 0 + fi +done + +echo "$0: missing rate: $1" +exit 1 diff --git a/recipes/pandora-system/pandora-sudoers/50_openpandora b/recipes/pandora-system/pandora-sudoers/50_openpandora index f05b17b..eefd14a 100755 --- a/recipes/pandora-system/pandora-sudoers/50_openpandora +++ b/recipes/pandora-system/pandora-sudoers/50_openpandora @@ -20,5 +20,6 @@ %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_datetime.sh %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_wifi.sh %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_lcdsettings.sh +%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_lcdrate.sh %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_nubmode.sh -- 2.39.2