From 46b79cbf249d543e7799c224d6224e46a202d7b8 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Tue, 3 Jul 2012 10:13:45 +0200 Subject: [PATCH] pandora-scripts: Added a touchscreen-reinitialization scripts, so that a restart of the device is not necessary anymore. --- recipes/pandora-system/pandora-scripts.bb | 4 +++- recipes/pandora-system/pandora-scripts/op_calibrate.sh | 6 +++++- recipes/pandora-system/pandora-scripts/op_touchinit.sh | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 recipes/pandora-system/pandora-scripts/op_touchinit.sh diff --git a/recipes/pandora-system/pandora-scripts.bb b/recipes/pandora-system/pandora-scripts.bb index 2a742c6..fc98337 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 = "r107" +PR = "r108" SRC_URI = " \ file://op_paths.sh \ @@ -49,6 +49,7 @@ SRC_URI = " \ file://op_nubchange.sh \ file://op_lidsettings.pnd \ file://op_lidsettings.sh \ + file://op_touchinit.sh \ file://op_tvout.sh \ file://op_tvout.pnd \ file://ConfigModel.py \ @@ -112,6 +113,7 @@ do_install() { install -m 0755 ${WORKDIR}/op_lid.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_power.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_battlow.sh ${D}${prefix}/pandora/scripts/ + install -m 0755 ${WORKDIR}/op_touchinit.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_bright_up.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_menu.sh ${D}${prefix}/pandora/scripts/ install -m 0755 ${WORKDIR}/op_xfcemenu.sh ${D}${prefix}/pandora/scripts/ diff --git a/recipes/pandora-system/pandora-scripts/op_calibrate.sh b/recipes/pandora-system/pandora-scripts/op_calibrate.sh index 99a3ff2..0999028 100755 --- a/recipes/pandora-system/pandora-scripts/op_calibrate.sh +++ b/recipes/pandora-system/pandora-scripts/op_calibrate.sh @@ -1,3 +1,7 @@ #!/bin/bash TSLIB_CONSOLEDEVICE=none op_runfbapp ts_calibrate -zenity --info --title="Calibration" --text "The touchscreen has been calibrated. To activate the new settings, you have to reboot your unit." \ No newline at end of file +sudo /usr/pandora/scripts/op_touchinit.sh +while ! zenity --question --title="Check Calibration" --text="Your new calibration setting has been applied.\n\nPlease check if the touchscreen is now working properly.\nIf not, you might want to try a recalibration.\n\n(Hint: use the nubs to press the button if the touchscreen is way off)" --ok-label="The touchscreen is fine" --cancel-label="Recalibrate"; do + TSLIB_CONSOLEDEVICE=none op_runfbapp ts_calibrate + sudo /usr/pandora/scripts/op_touchinit.sh +done \ No newline at end of file diff --git a/recipes/pandora-system/pandora-scripts/op_touchinit.sh b/recipes/pandora-system/pandora-scripts/op_touchinit.sh new file mode 100644 index 0000000..ca57a50 --- /dev/null +++ b/recipes/pandora-system/pandora-scripts/op_touchinit.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rmmod ads7846 +modprobe ads7848 \ No newline at end of file -- 2.39.2