Fix doc path
[opentx.git] / radio / util / tts_common.py
blob2541b1fe9a60f0cf6f7f2180e9c17bbc063a2bd1
1 NO_ALTERNATE = 1024
3 import sys
5 def filename(idx, alternate=0):
6 if "gruvin9x" in sys.argv:
7 ext = ".ad4"
8 else:
9 ext = ".wav"
10 if isinstance(idx, int):
11 result = "%04d%s" % (idx, ext)
12 elif board in ('sky9x', 'taranis'):
13 result = idx + ext
14 else:
15 if alternate >= NO_ALTERNATE:
16 return None
17 result = "%04d%s" % (alternate, ext)
18 return result
20 if "sky9x" in sys.argv:
21 board = "sky9x"
22 PROMPT_CUSTOM_BASE = 256
23 PROMPT_SYSTEM_BASE = 0
24 elif "taranis" in sys.argv or "horus" in sys.argv:
25 board = "taranis"
26 PROMPT_CUSTOM_BASE = 256
27 PROMPT_SYSTEM_BASE = 0
28 elif "gruvin9x" in sys.argv:
29 board = "gruvin9x"
30 PROMPT_CUSTOM_BASE = 0
31 PROMPT_SYSTEM_BASE = 256
32 else:
33 board = "stock"
34 PROMPT_CUSTOM_BASE = 0
35 PROMPT_SYSTEM_BASE = 256