DEPENDS = "zenity dbus"
RDEPENDS = "zenity dbus"
-PR = "r114"
+PR = "r115"
SRC_URI = " \
file://op_paths.sh \
file://op_menu.sh \
file://op_xfcemenu.sh \
file://op_hugetlb.sh \
+ file://op_gamma.sh \
"
do_install() {
install -m 0755 ${WORKDIR}/op_menu.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_xfcemenu.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/op_hugetlb.sh ${D}${prefix}/pandora/scripts/
+ install -m 0755 ${WORKDIR}/op_gamma.sh ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/reset_nubs.sh ${D}${prefix}/pandora/scripts/
install -m 0644 ${WORKDIR}/pndlogo.png ${D}${prefix}/pandora/scripts/
install -m 0755 ${WORKDIR}/ConfigModel.py ${D}${prefix}/pandora/scripts/
--- /dev/null
+#!/bin/sh
+
+. /usr/pandora/scripts/op_paths.sh
+
+if [ ! -e "$SYSFS_DSS_GAMMA" ]; then
+ echo "Control file is missing, might be incompatible kernel"
+ exit 1
+fi
+
+if [ "$1" = "0" ]; then
+ # set default gamma
+ # TODO: we could set some user global setting here instead
+ echo 0 > $SYSFS_DSS_GAMMA
+ exit 0
+fi
+
+if [ "$1" = "1" ]; then
+ # no gamma adjustment
+ echo 0 > $SYSFS_DSS_GAMMA
+ exit 0
+fi
+
+if [ "`which op_gammatable`" = "" ]; then
+ echo "op_gammatable tool required"
+ exit 1
+fi
+
+# just forward args to op_gammatable
+op_gammatable "$@" > /sys/devices/platform/omapdss/display0/dss_gamma
echo "ERROR: gamma control not found" >&2
SYSFS_GAMMA=/dev/null
fi
+
+SYSFS_DSS_GAMMA=/sys/devices/platform/omapdss/display0/dss_gamma
RDEPENDS = "sudo"
-PR = "r18"
+PR = "r19"
SRC_URI = " \
file://50_openpandora \
%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/pnd_run.sh
%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_touchinit.sh
%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_hugetlb.sh
+%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_gamma.sh