-
Notifications
You must be signed in to change notification settings - Fork 12
/
tty2oled-system.ini
140 lines (126 loc) · 5.52 KB
/
tty2oled-system.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Version 2.7
#
# Copyright (c) 2021/2022 ojaksch, venice
#
# v2.7 New Variable "SLEEPMODEDELAY"
# v2.6 New Option Screensaver "Toast"
# v2.5 New Option Screensaver "Stars"
# v2.4 New Option for Screensaver "Screens"
# v2.3 Variable TRANSITION for definable transition effect
# v2.2 New daemon for feedback from ESP
# v2.1 Merge of tty2oled-system.ini and tty2oled-user.ini, leaving
# tty2oled-user.ini to user specific settings
# v2.0 New Options for SCREENSAVER Options
# v1.9 ANSI codes, TTY2OLED_FW_TESTING, USE_GSC_PICTURE=yes default
# v1.8 USE_RANDOM_ALT to dice between xxx_alt* pictures
# v1.7 USE_GSC_PICTURE defaults to no
# v1.6 New Option USE_GSC_PICTURE
# v1.5 New Options CCSCRIPT, PICTURE_REPOSITORY_URL, USERSTARTUP, USERSTARTUPTPL
# Add "-echo" to TTYPARAM
# v1.4 New Options UPDATESCRIPT, INITDISABLED, ROTATE, SCRIPT_UPDATE
# New but unused Options USE_WO_PICTURE, USE_EU_PICTURE, USE_JP_PiCTURE
# Changed "RAW" REPOSITORY_URL.
# v1.3 New Option "USE_US_PICTURE"
# v1.2 New Option "CONTRAST"
# v1.1 New Option "USE_TEXT_PICTURE"
# v1.0 Initial Release
#
# Debugging
debug="false"
debugfile="/tmp/tty2oled"
# Recurring functions
yesno() {
seconds=${1}
[ -z "${seconds}" ] && seconds=5
echo -en "${chide}"
while [ ${seconds} -gt 0 ]; do
echo -en "\e[1D${fred}${seconds}${freset}"
read -r -s -t1 -N1 KEY
[ "${KEY}" == "A" ] && KEY="y" && break
[ "${KEY}" == "B" ] && KEY="n" && break
: $((seconds--))
done
echo -en "${cshow}"
echo
}
fblink="\e[5m"
fbold="\e[1m"
fdim="\e[2m"
freset="\e[0m\033[0m"
finvers="\e[7m"
fhidden="\e[8m"
funderl="\e[4m"
fblue="\e[1;34m"
fgreen="\e[1;32m"
fcyan="\e[1;36m"
fred="\e[1;31m"
fmagenta="\e[1;35m"
fyellow="\e[1;33m"
fwhite="\e[1;37m"
fgrey="\e[1;30m"
chide="\e[?25l"
cshow="\e[?25h"
REPOSITORY_URL="https://raw.githubusercontent.com/venice1200/MiSTer_tty2oled/main"
REPOSITORY_URL2="https://www.tty2tft.de//MiSTer_tty2oled-installer"
[ -e /media/fat/tty2oled/TTY2OLED_TESTING ] && REPOSITORY_URL="https://raw.githubusercontent.com/venice1200/MiSTer_tty2oled/main/Testing"
PICTURE_REPOSITORY_URL="https://www.tty2tft.de"
export RSYNC_PASSWORD="eSvcFFF5aLpmbNqWKE3SE2FewkWE"
NODEBUG="-q -o /dev/null"
TTY2OLED_PATH="/media/fat/tty2oled"
INITSCRIPT="${TTY2OLED_PATH}/S60tty2oled"
INITDISABLED="${TTY2OLED_PATH}/_S60tty2oled"
UPDATESCRIPT="/media/fat/Scripts/update_tty2oled.sh"
DAEMONNAME="tty2oled.sh"
DAEMONSCRIPT="${TTY2OLED_PATH}/tty2oled.sh"
READSCRIPT="${TTY2OLED_PATH}/tty2oled-read.sh"
CCSCRIPT="/media/fat/Scripts/tty2oled_cc.sh"
USERSTARTUP="/media/fat/linux/user-startup.sh"
USERSTARTUPTPL="/media/fat/linux/_user-startup.sh"
SLEEPFILE="/tmp/tty2oled_sleep"
corenamefile="/tmp/CORENAME"
picturefolder="${TTY2OLED_PATH}/pics"
picturefolder_pri="${TTY2OLED_PATH}/pics_pri"
WAITSECS="0.2"
ttyresponse=""
newcore=""
oldcore=""
# Do not change this until you know what you do
MOUNTRO="false" # Helper flag for update_tty2oled_script.sh. Please don't touch as it leaves the SD card of MiSTer writeable otherwise.
################ The lines above are the system settings. Only edit in case
# you know what you are doing!
################ The lines below are the user settings. Instead of editing
# them, please copy the one(s) to tty2oled-user.ini and edit
# them there.
# Serial
BAUDRATE="115200"
TTYDEV="/dev/ttyUSB0"
TTYPARAM="cs8 raw -parenb -cstopb -hupcl -echo"
# ---Currently unused Location's---
USE_WO_PICTURE="no" # Set to "yes" if you want the Global/World Version of the Pictures, default is "no"
USE_EU_PICTURE="no" # Set to "yes" if you want the Europe Version of the Pictures, default is "no"
USE_JP_PiCTURE="no" # Set to "yes" if you want the Japan Version of the Pictures, default is "no"
# Userdata
TTY2OLED_UPDATE="yes" # Keep the display software up-to-date
AUTOUPDATE="yes" # Autoupdate every week?
SCRIPT_UPDATE="yes" # Set to "yes" if you want to update the tty2oled Scripts by the "Updater"
USBMODE="yes" # Set to "yes" if you use the USB Mode Sketch, set to "no" for SD or Standard Version
ROTATE="no" # Set to "yes" if you want the Display rotated by 180 degrees
CONTRAST="100" # Set/send your Contrast from 0..255, default by Arduino Sketch = 200
OVERWRITE_PICTURE="yes" # Set to "yes" if you want to overwrite existing Pictures if they're updated upstream
SCREENSAVER="no" # Set to "yes" to enable screensaver mode on display
SCREENSAVER_START="120" # Start screensaver after x seconds (20-600)
SCREENSAVER_IVAL="10" # Screensaver Interval (10-600) seconds
SCREENSAVER_SCREEN_TTY2OLED="yes" # Use tty2oled Screen "yes/no"
SCREENSAVER_SCREEN_MISTER="yes" # Use MiSTer Screen "yes/no"
SCREENSAVER_SCREEN_CORE="yes" # Use Corename Screen "yes/no"
SCREENSAVER_SCREEN_TIME="yes" # Use Time Screen "yes/no"
SCREENSAVER_SCREEN_DATE="yes" # Use Date Screen "yes/no"
SCREENSAVER_SCREEN_STARS="no" # Use Animated ScreenSaver Starfield "yes/no"
SCREENSAVER_SCREEN_TOAST="no" # Use Animated ScreenSaver Flying Toaster"yes/no"
SCREENSAVER_LEVEL="5" # !! Deprecated !! Screensaver brightness level (1-15)
USE_TEXT_PICTURE="no" # Set to "yes" if you want to use the Text-Pictures-Version, default is no
USE_US_PICTURE="no" # Set to "yes" if you want to use the US Version of the Pictures, default is "no"
USE_GSC_PICTURE="yes" # Set to "yes" if you want to use the Grayscale Version of the Pictures, default is "no"
USE_RANDOM_ALT="yes" # If set to yes and there're xxx_alt* pictures, they'll be diced.
TRANSITION="-1" # Transition effect. -1 = AUTO, 0 = None, 1-xx see sketch
SLEEPMODEDELAY="2" # Delay after Sleepmopde was finished