Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
0  target/device/opendingux/a320/target_skeleton/usr/bin/system_info 100644 → 100755
File mode changed
View
69 target/device/opendingux/a320/target_skeleton/usr/sbin/tvout_config
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+HELP_MENU='To activate or disactivate the TV-out mode without using this menu, you can use the shortcut POWER+Y.'
+HELP_MODE='Choose the signal type that your television accepts:\n
+\n
+- NTSC is used in the Philippines, Japan, and all American countries, except in Brazil, Argentina, Paraguay and Uruguay.\n
+\n
+- PAL-M is used only in Brazil.\n
+\n
+- PAL-60 is used on all other countries.\n
+\n
+- PAL (50Hz) is for legacy TVs only.'
+
+TEMP_FILE="/tmp/tvtool.fifo"
+CONF_FILE="/etc/local/tvout.conf"
+if [ -f "$CONF_FILE" ]; then
+ OLD_VALUE="`cat $CONF_FILE`"
+fi
+
+while /bin/true; do
+ dialog --help-button --menu 'Choose an action.' 10 50 4 'mode' 'Switch PAL/NTSC' 'on' 'Enable TV-out' 'off' 'Disable TV-out' 2> $TEMP_FILE
+ RESULT=$?
+
+ case $RESULT in
+ 0)
+ ACTION="`cat $TEMP_FILE`"
+ rm "$TEMP_FILE"
+ case $ACTION in
+
+ mode)
+ RESULT=2
+
+ while [ $RESULT -eq 2 ]; do
+ dialog --help-button --menu "Choose your TV type (current: $OLD_VALUE)" 11 50 5 'ntsc' 'Your TV is NTSC' 'pal-60' 'Your TV is PAL (60Hz)' 'pal' 'Your TV is PAL (50Hz)' 'pal-m' 'Your TV is PAL-M (Brazil)' 2> "$CONF_FILE"
+ RESULT=$?
+
+ case $RESULT in
+ 0)
+ OLD_VALUE="`cat $CONF_FILE`"
+ ;;
+ 2)
+ dialog --msgbox "$HELP_MODE" 18 50
+ ;;
+ *)
+ echo "$OLD_VALUE" > "$CONF_FILE"
+ esac
+ done
+ ;;
+
+ on|off)
+ /usr/sbin/tvtool --$ACTION
+ exit 0
+ ;;
+
+ *)
+ exit 1
+ esac
+ ;;
+
+ 2)
+ dialog --msgbox "$HELP_MENU" 8 50
+ ;;
+
+ *)
+ rm "$TEMP_FILE"
+ exit 1
+ ;;
+ esac
+done

No commit comments for this range

Something went wrong with that request. Please try again.