initial commit
[ETG_Helmet] / SOFTWARE / OMEGA2 / settings.sh
1
2 PID="/tmp/ETGPID/"
3
4 TMPFS="/tmp/ETG"
5 SD="/tmp/mounts/SD-P1"
6 CONTENT="$SD/AUDIO_CONTENT"
7 TMPMAPDIR="$TMPFS/map"
8 DEVNULL="/dev/null"
9
10 LANGUAGE_DEF_NAME="EN"
11
12 MAPSRC="$SD/map.xml"
13 MAP="$TMPFS/map.xml"
14
15 SYSMESSAGES="System_messages"
16
17 BASE_IP_MASK="20.0.0."  # for searching connected nodes in Master mode
18
19 LEADER_IP="20.0.0.1"
20 SERVICE_IP="21.0.0.1"
21 FOLLOWER_IP="22.0.0.1"
22
23 RECTMPRAW="$TMPFS/recraw.wav"
24 RECTMP="$TMPFS/rec.wav"
25
26 NOISEPROFILE="$TMPFS/noiseprofile"
27
28 # ----------------------- network settings ---------------------------------------------
29
30 AP_CLI_SSID="SERVICEMODE_USER"                          # TODO: SET YOUR SERVICE MODE LOGIN HERE 
31 AP_CLI_PASS="SERVICEMODE_PASS"                          # TODO: SET YOUR SERVICE MODE PASSWORD HERE 
32
33 FOLLOW_PASS="LEADER_PASS"                               # TODO: SET YOUR LEADER PASSWORD HERE FOR MEMBERS
34
35 # ----------------------- update settings ----------------------------------------------
36
37 SFTPlogin="SFTP_LOGIN"                  # TODO: SET YOUR SFTP LOGIN HERE 
38 SFTPpass="SFTP_PASSWD"                  # TODO: SET YOUR SFTP PASSWORD HERE 
39 SRTPhost="SFTP_HOST"                    # TODO: SET YOUR SFTP HOST HERE 
40 SFTPpath="SFTP_PATTH/"                  # TODO: SET YOUR SFTP PATH TO AUDIO CONTENT HERE 
41 SFTPport=22                             # TODO: SET YOUR SFTP PORT HERE 
42
43 IOuser="IO_USER"                        # TODO: SET YOUR FIRMWARE UPDATE USER HERE
44 IOpass="IO_PASS"                        # TODO: SET YOUR FIRMWARE UPDATE PASSWORD HERE
45 IOhost="IO_HOST"                        # TODO: SET YOUR FIRMWARE UPDATE HOST HERE
46
47 # ----------------------- remote debugging settings ------------------------------------
48
49 tunLogin="TUN_USER"                     # TODO: SET YOUR TUNNEL UPDATE USER HERE
50 tunPass="TUN_PASS"                      # TODO: SET YOUR TUNNEL UPDATE PASSWORD HERE
51 tunHost="TUN_HOST"                      # TODO: SET YOUR TUNNEL HOST HERE 
52 tunPort="TUN_PORT"                      # TODO: SET YOUR TUNNEL PORT HERE 
53
54 # ----------------------- system -------------------------------------------------------
55
56 BUTTON_SHUTDOWN_DELAY=10        # 5 # delay after message applied (depending on message playback length, for longest language)
57 BATTERY_SHUTDOWN_DELAY=19       # 14 # delay after message applied (depending on message playback length, for longest language)
58
59 # ------------------------ narrative ---------------------------------------------------
60
61 NARRATIVE_REPEAT=0              # repeat low level layer narrative on return (1=yes)
62
63 # ------------------------ LEDs --------------------------------------------------------
64
65 PIN_WIFI=38     # right, blue
66 PIN_MAIN=1      # left, red
67
68 # ------------------------ GMT time shift for your city --------------------------------
69
70 CITY_TIME_SHIFT="+9";                   # from GMT / UTC
71 CITY_TIME_SHIFT_MIN="+30"               # additional minutes (keep sign!)
72
73 CITY_SAVING_TIME="0";                   #0      # DST from above
74
75 # summer time 
76
77 CITY_SAVING_TIME_DAY_BEG=12;            #31     # day 
78 CITY_SAVING_TIME_MONTH_BEG=3;           #3      # month
79 CITY_SAVING_TIME_DAY_END=5;             #27     # day
80 CITY_SAVING_TIME_MONTH_END=11;          #10     # month
81
82 # ------------------------ audio -------------------------------------------------------
83
84 # breadboard test
85 if [ ! -z "$(lsusb | grep '0c76:1607')" ]; then
86         BBOARD=1
87 fi
88
89 AMP=0   # dB
90 GAINMODE=audiophile
91
92 VOLMAX=100
93 VOLDEF=85
94 VOLMIN=0
95 VOLSTEP=5 # 10
96
97 REWIND=10                       # after message playback (sec)
98
99 MAX_NUMB_OF_MESSAGES=6          # max number of files in message queue (to prevent endless kbd hit and message playback)
100
101 MAX_REC_TIME=20                 # max time of recorded message (sec)
102
103 if [ "$BBOARD" ]; then 
104         # bboard
105 #       REC_PLAY_GAIN=20
106 #       REC_PLAY_BASS=0
107         REC_ADD_PROCESSING="gain -5 treble +46"
108         REC_MIC_VOL=95  # # in % !!!  (max 14)
109 else 
110         #production
111 #       REC_PLAY_GAIN=-25
112 #       REC_PLAY_BASS=60
113 #       REC_PLAY_GAIN=20
114 #       REC_PLAY_BASS=0
115         REC_ADD_PROCESSING="gain 3 treble +56"
116         REC_MIC_VOL=95  # in % !!!   (max 27)
117 fi
118         
119
120 # ------------------------ GPS / NMEA --------------------------------------------------
121
122 GPS_EN_PIN=11
123
124 GPSTTY=/dev/ttyS1
125
126 READLINES=8                     # lines to capture GPRMC | GNRMC (empty lines included)
127 GPSREADINTERVAL=3               # interval between reads, can't be > STANDARD_DISTANCE_TIME (sec)
128 STANDARD_DISTANCE_TIME=5        # min time between GPS probes for direction and GPS status determ. (sec)
129 MAX_GPS_AGE_THRESHOLD=30        # min GPS time treshold before treating as LOST (sec)
130 MIN_DISTANCE=3                  # min distance to determine a movement
131
132 MIN_DIR_DISTANCE=100            # the distanse separating the _NEAR and _FAR directional prefixes
133
134 # ----------------------- messages iteration -------------------------------------------
135
136 NAV_MESSAGE_EACH_SEC=300                # navigation message iteration period (sec)
137 NOGPS_MESSAGE_EACH_SEC=300              # no GPS message iteration period (sec)
138
139 # ----------------------- Keyboard -----------------------------------------------------
140
141 SHORT_BUTTON_HOLD=3             # min short hold button time (in sec)
142
143 KBD_RELEASE=$((0x0))            # 0xbb2fdc7d
144
145 #                               register        ^               ^ binary
146 # KBD_MASK=$((0xf800d))                         # 0xf800d       # 11111000000000001101
147 KBD_MASK="0xf800d"                              # 0xf800d       # 11111000000000001101
148 #                                                                 00111000000000001101
149
150 # dev // obsolette
151
152 # KBD_V_UP=$((0x1))             # 0xbb2fdc7c    # 0x1           # 00000000000000000001
153 # KBD_V_DOWN=$((0x8))           # 0xbb2fdc75    # 0x8           # 00000000000000001000
154 # KBD_T=$((0x4))                # 0xbb2fdc79    # 0x4           # 00000000000000000100
155 # KBD_L=$((0x80000))            # 0xbb27dc7d    # 0x80000       # 10000000000000000000
156 # KBD_M=$((0x20000))            # 0xbb2ddc7d    # 0x20000       # 00100000000000000000
157 # KBD_R=$((0x40000))            # 0xbb2bdc7d    # 0x40000       # 01000000000000000000
158 # KBD_WIFI=$((0x10000))         # 0xbb2edc7d    # 0x10000       # 00010000000000000000
159 # KBD_MIC=$((0x8000))           # 0xbb2f1c7d    # 0xC000/0x8000 # 00001100000000000000 / 1000000000000000
160
161 # production (universal, use this set !)
162
163 KBD_V_DOWN=$((0x4))             
164 KBD_V_UP=$((0x40000))           
165 KBD_T=$((0x8))                  
166 KBD_L=$((0x80000))              
167 KBD_M=$((0x20000))              
168 KBD_R=$((0x1))          
169 KBD_WIFI=$((0x10000))           
170 KBD_MIC=$((0x8000))             
171
172
173
174
175
Contact me: dev (at) shalnoff (dot) com
PGP fingerprint: A6B8 3B23 6013 F18A 0C71 198B 83D8 C64D 917A 5717