mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
ADC filtered and OSMP were inverted
TTS script for .AD4 english prompts generation
This commit is contained in:
parent
f2dcecc059
commit
640b5fe668
3 changed files with 30 additions and 2 deletions
|
@ -100,6 +100,12 @@ enum BeeperMode {
|
|||
#define EXTRA_ARM_FIELDS
|
||||
#endif
|
||||
|
||||
enum AdcInput {
|
||||
e_adc_single,
|
||||
e_adc_osmp,
|
||||
e_adc_filtered
|
||||
};
|
||||
|
||||
#define ALTERNATE_VIEW 0x10
|
||||
PACK(typedef struct t_EEGeneral {
|
||||
uint8_t myVers;
|
||||
|
|
|
@ -2804,10 +2804,10 @@ int main(void)
|
|||
uint16_t t0 = getTmr16KHz();
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.filterInput == 1) {
|
||||
if (g_eeGeneral.filterInput == e_adc_filtered) {
|
||||
getADC_filt() ;
|
||||
}
|
||||
else if ( g_eeGeneral.filterInput == 2) {
|
||||
else if ( g_eeGeneral.filterInput == e_adc_osmp) {
|
||||
getADC_osmp() ;
|
||||
}
|
||||
else {
|
||||
|
|
22
util/tts.py
Normal file
22
util/tts.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os, sys, shutil, platform, subprocess
|
||||
|
||||
def generate(str, idx):
|
||||
if platform.system() == "Windows":
|
||||
subprocess.Popen(["C:\Program Files\eSpeak\command_line\espeak.exe", "-w", "%04d.wav" % idx, str], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
|
||||
subprocess.Popen(["D:\Perso\workspace\companion9x\AD4CONVERTER.EXE", "-E4", "%04d.WAV" % idx], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
if "en" in sys.argv:
|
||||
for i in range(20):
|
||||
generate(str(i), i)
|
||||
for i in range(20, 100+1, 10):
|
||||
generate(str(i), 20+(i-20)/10)
|
||||
generate("1000", 29)
|
||||
for i, s in enumerate(["hour", "hours", "minute", "minutes", "second", "seconds", "", "and", "minus"]):
|
||||
generate(s, 40+i)
|
||||
for i, s in enumerate(["volts", "amps", "meters per second", "", "km per hour", "meters", "degrees", "percent", "milliamps"]):
|
||||
generate(s, 50+i)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue