refact: ADC, switches and keys
Add "hardware_defs" target to dump hardware defines from hal.h per target Fixed hal.h definitions for switches & ADC inputs Tools to generate hardware definitions from current hal.h generator: add support for EXTx and analog switches WiP Add generated header to hardware_defs target Add support for ADC input direction and index per GPIO port Incredible: it compiles Removed StdPeriph ADC driver Works on QX7 Works on TX16S (VBat missing) Switch driver using generated switches for stm32 targets Switch driver with generated switches for simu Use switch names from switch driver Fixed single conversion handling Fixed horus VBat reading Added switch name Fix warnings about bitfield offsets and GCC 4.4 This is caused by bitfields that cross type boundaries. In this particular case, it happens as the bitfield is not defined the same in `rtc_backup.cpp`. Switches has already been moved to generic driver Jitter measurement for each sample, not just for oversampled values Moved periph clock init to the ADC driver ADC & GPIOs. Add switchInit() to init pins Fix NV14 CMake Fix taranis target Fix NV14 (again) Model audio files: use new interface for switch index Fix X9-lite Fix simu headers Fix getSwitchName() Add support for ADC switches Fix switch warning YAML Test only switches which are defined Conversions tests for QX7 only on QX7 Fix X12S Fix function switch names Enable ADC periph clock before initialising channels NV14: offset inputs for the sticks & fix switches WiP: get rid of VSRCRAW and some more Simu shall use normal ADC driver fix x7 fix nv14 Fix 9x nav fix 212x64 fix xlite fix x9e fix simu lib fix unit tests fix x7 tests PWM stick values should be written directly into adcValues ... just like FlySky sticks. fix x12s fix nv14 Add some support for SPI ADC (only unit tests) Remove `jq` usage fix generate_yaml.py for newer libclang fix pot config fix stick names Some YAML generator improvements Max 16 Pots on COLORLCD Fix some source names Use 10 bits for switches to prevent overflow Removed horus constants for switches & ADC inputs Fix unit tests Fix curve edit Fix libsimulator Fix function switches (tpro) Refine ADC & analog API Moved hardware definitions scripts and templates into own dir cleanup API refine Fix unit tests Mixer: apply calibration only on required inputs Place ADC switches after all other ADC inputs Fix X12S Remove useless TR_POTS_VSRCRAW, TR_SW_VSRCRAW, and TR_VSRCRAW Cleanup redundant generated YAML parsers Fixes Boxer rebase Add boxer to generate-hw-defs.sh Obsolete LUA exports Add boxer ADC_DIRECTION Split generate_hw_defs.py into multiple files Some cleanup (+ LUA switches) Fix AXIS definitions Fixed translation strings declarations Some rebase fixes Remove some useless StdPeriph drivers fix: set pin mode to reset state on usart deinit fix: use canonical names for calibration data fix: ADC driver does not care about unconfigured inputs fix X12S ADC Add support for ADC conversion chaining Better X12S ADC implem Moved X12S ADC driver to HAL/LL Improve ADC driver separation Fixed taranis & nv14 Moved PWM gimbals to HAL/LL Removed useless TR_EXTRA_VSRCRAW Fixed include guards Small fixes Renamed control inputs Moved internal and external module pulse driver def to boards Move more things to the generic_stm32 board Remove STR_VMIXTRIMS Added analog labels Generate main control names Misuse labels / short labels for main controls Backward compatibility: sliders and legacy names New keys driver Let's get rid of StdPeriph headers in simu Add jinja2 to CI workflows Use `grep` instead of `sed` chore: add python jinja2 oto msys setup script Removed more static definitions and use dynamic ones instead Fixes X9E Fix x7 nav too 212 switch display Fix default sliders Removed NUM_STICKS 212 switch display working nicely Surface radio 'stick' replacements fix: switch, trim & rotary pin init Remove old key drivers Removed VKEYS Removed ETX_FOURCC Fixed SURFACE_NAME Removed TR_VSWITCHES & TR_TRIMS_SWITCHES Fix xpot switches Store calibrated analogs in physical order Use getSourceString in drawSource Implement missing YAML read/write Fix isSourceAvailableInInputs() Fix isSourceAvailable() Some surface fixes Fix CLI debug Ported colour UI of analog diagnostics to new ADC API Small fixes Better input mapping Minor tpro fixes Fix trims available Remove TX mode choice on surface radio Rename surface controls Channel order alignement Fix throttle warning Fix checkTrims() Fix pot config casting issue Fix IS_SWITCH_FS() Fixed input mapping Fix fswitch auto-switch Fixed storing / reading function switches in YAML Fix enableVBatBridge() / disableVBatBridge() Fix interesting mode conversion Fix sources issues Fix special funnction list Proper function switch handling 128 GUI improvements Fix compilation Boxer cosmetics 128 hardware screen cosmetic Fix TX12 switches More switches fixes Simplify CPU type handling Fix flash size Fixed page-up / page-down in libopenui
This commit is contained in:
committed by
Malte Langermann
parent
b6dd3a0ef8
commit
2b100e0eb5
+30
-108
@@ -76,26 +76,10 @@
|
||||
|
||||
#define TR_ADCFILTERVALUES "Global","Fra","Til"
|
||||
|
||||
#if defined(PCBX10)
|
||||
#define TR_RETA123 "S","H","G","K","1","3","2","4","5","6","7","V","H"
|
||||
#elif defined(PCBHORUS)
|
||||
#define TR_RETA123 "S","H","G","K","1","3","2","4","5","V","H"
|
||||
#elif defined(PCBX9E)
|
||||
#define TR_RETA123 "S","H","G","K","1","2","3","4","V","H","V","H"
|
||||
#elif defined(PCBTARANIS)
|
||||
#define TR_RETA123 "S","H","G","K","1","2","3","V","H"
|
||||
#else
|
||||
#define TR_RETA123 "S","H","G","K","1","2","3"
|
||||
#endif
|
||||
#define TR_VCURVETYPE "Diff","Expo","Funk","Egen"
|
||||
#define TR_VCURVEFUNC "---","x>0","x<0","|x|","f>0","f<0","|f|"
|
||||
#define TR_VMLTPX "Læg til","Gange","Erstat"
|
||||
#define TR_VMLTPX2 "+=","*=",":="
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_VMIXTRIMS "FRA","TIL","Sid","Høj","Gas","Kræ","T5","T6"
|
||||
#else
|
||||
#define TR_VMIXTRIMS "FRA","TIL","Sid","Høj","Gas","Kræ"
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_CSWTIMER "Tid"
|
||||
@@ -112,63 +96,28 @@
|
||||
#define TR_CSWEQUAL "a=x"
|
||||
#define TR_VCSWFUNC "---",TR_CSWEQUAL,"a" STR_CHAR_TILDE "x","a>x","a<x",TR_CSWRANGE,"|a|>x","|a|<x","AND","OR","XOR",TR_CSWSTAY,"a=b","a>b","a<b",STR_CHAR_DELTA "≥x","|" STR_CHAR_DELTA "|≥x",TR_CSWTIMER,TR_CSWSTICKY
|
||||
|
||||
#if defined(VARIO)
|
||||
#define TR_VVARIO "Vario"
|
||||
#else
|
||||
#define TR_VVARIO "[Vario]"
|
||||
#endif
|
||||
#define TR_SF_TRAINER "Træner"
|
||||
#define TR_SF_INST_TRIM "Inst. Trim"
|
||||
#define TR_SF_RESET "Nulstil"
|
||||
#define TR_SF_SET_TIMER "Sæt"
|
||||
#define TR_SF_VOLUME "Lydstyrke"
|
||||
#define TR_SF_FAILSAFE "SetFejlsikr"
|
||||
#define TR_SF_RANGE_CHECK "AfstandCheck"
|
||||
#define TR_SF_MOD_BIND "ModuleBind"
|
||||
|
||||
#if defined(AUDIO)
|
||||
#define TR_SOUND "Spil lyd"
|
||||
#else
|
||||
#define TR_SOUND "Bip"
|
||||
#endif
|
||||
|
||||
#if defined(HAPTIC)
|
||||
#define TR_HAPTIC TR("Vib.", "Vibration")
|
||||
#else
|
||||
#define TR_HAPTIC TR("[Vib.]", "[Vibration]")
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
#define TR_PLAY_TRACK TR("Afspil lyd", "Afspil lydfil")
|
||||
#define TR_PLAY_VALUE TR("Spil Vær","Spil Værdi")
|
||||
#else
|
||||
#define TR_PLAY_TRACK "[Spil lyd]"
|
||||
#define TR_PLAY_VALUE "[Spil vær]"
|
||||
#endif
|
||||
|
||||
#define TR_SF_BG_MUSIC "BgMusik","BgMusik ||"
|
||||
|
||||
#if defined(SDCARD)
|
||||
#define TR_SDCLOGS "SD Log"
|
||||
#else
|
||||
#define TR_SDCLOGS "[SD Log]"
|
||||
#endif
|
||||
|
||||
#if defined(GVARS)
|
||||
#define TR_ADJUST_GVAR "Juster"
|
||||
#else
|
||||
#define TR_ADJUST_GVAR "[Juster GV]"
|
||||
#endif
|
||||
|
||||
#if defined(LUA)
|
||||
#define TR_SF_PLAY_SCRIPT "Lua Script"
|
||||
#else
|
||||
#define TR_SF_PLAY_SCRIPT "[Lua]"
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define TR_SF_TEST ,"Test"
|
||||
#else
|
||||
#define TR_SF_TEST
|
||||
#endif
|
||||
|
||||
#if defined(OVERRIDE_CHANNEL_FUNCTION)
|
||||
#define TR_SF_SAFETY TR("Overs.", "Overskriv")
|
||||
#else
|
||||
#define TR_SF_SAFETY "---"
|
||||
#endif
|
||||
#define TR_SOUND "Spil lyd"
|
||||
#define TR_PLAY_TRACK TR("Afspil lyd", "Afspil lydfil")
|
||||
#define TR_PLAY_VALUE TR("Spil Vær","Spil Værdi")
|
||||
#define TR_SF_HAPTIC TR("Vib.", "Vibration")
|
||||
#define TR_SF_PLAY_SCRIPT "Lua Script"
|
||||
#define TR_SF_BG_MUSIC "BgMusik"
|
||||
#define TR_SF_BG_MUSIC_PAUSE "BgMusik ||"
|
||||
#define TR_SF_LOGS "SD Log"
|
||||
#define TR_ADJUST_GVAR "Juster"
|
||||
#define TR_SF_BACKLIGHT "Baggrundslys"
|
||||
#define TR_SF_VARIO "Vario"
|
||||
#define TR_SF_TEST "Test"
|
||||
#define TR_SF_SAFETY TR("Overs.", "Overskriv")
|
||||
|
||||
#define TR_SF_SCREENSHOT "Skærm klip"
|
||||
#define TR_SF_RACING_MODE "Ræs tilstand"
|
||||
@@ -176,8 +125,6 @@
|
||||
#define TR_SF_SET_SCREEN "Vælg hoved skærm"
|
||||
#define TR_SF_RESERVE "[reserve]"
|
||||
|
||||
#define TR_VFSWFUNC TR_SF_SAFETY,"Træner","Inst. Trim","Nulstil","Sæt",TR_ADJUST_GVAR,"Lydstyrke","SetFejlsikr","AfstandCheck","ModuleBind",TR_SOUND,TR_PLAY_TRACK,TR_PLAY_VALUE,TR_SF_RESERVE,TR_SF_PLAY_SCRIPT,TR_SF_RESERVE,TR_SF_BG_MUSIC,TR_VVARIO,TR_HAPTIC,TR_SDCLOGS,"Baggrundslys",TR_SF_SCREENSHOT,TR_SF_RACING_MODE,TR_SF_DISABLE_TOUCH,TR_SF_SET_SCREEN TR_SF_TEST
|
||||
|
||||
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetri")
|
||||
|
||||
#if LCD_W >= 212
|
||||
@@ -207,38 +154,8 @@
|
||||
|
||||
#define TR_VSWASHTYPE "---","120","120X","140","90"
|
||||
|
||||
#define TR_STICKS_VSRCRAW STR_CHAR_STICK "Sid", STR_CHAR_STICK "Høj", STR_CHAR_STICK "Gas", STR_CHAR_STICK "Kræ"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_VSRCRAW STR_CHAR_TRIM "Sid", STR_CHAR_TRIM "Høj", STR_CHAR_TRIM "Gas", STR_CHAR_TRIM "Kræ", STR_CHAR_TRIM "T5", STR_CHAR_TRIM "T6"
|
||||
#else
|
||||
#define TR_TRIMS_VSRCRAW STR_CHAR_TRIM "Sid", STR_CHAR_TRIM "Høj", STR_CHAR_TRIM "Gas", STR_CHAR_TRIM "Kræ"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define TR_TRIMS_SWITCHES STR_CHAR_TRIM "Rl", STR_CHAR_TRIM "Rr", STR_CHAR_TRIM "Ed", STR_CHAR_TRIM "Eu", STR_CHAR_TRIM "Td", STR_CHAR_TRIM "Tu", STR_CHAR_TRIM "Al", STR_CHAR_TRIM "Ar", STR_CHAR_TRIM "5d", STR_CHAR_TRIM "5u", STR_CHAR_TRIM "6d", STR_CHAR_TRIM "6u"
|
||||
#else
|
||||
#define TRIM_SWITCH_CHAR TR("t",STR_CHAR_TRIM)
|
||||
#define TR_TRIMS_SWITCHES TRIM_SWITCH_CHAR "Rl", TRIM_SWITCH_CHAR "Rr", TRIM_SWITCH_CHAR "Ed", TRIM_SWITCH_CHAR "Eu", TRIM_SWITCH_CHAR "Td", TRIM_SWITCH_CHAR "Tu", TRIM_SWITCH_CHAR "Al", TRIM_SWITCH_CHAR "Ar"
|
||||
#endif
|
||||
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define TR_VKEYS "PGUP","PGDN","ENTER","MDL","RTN","TELE","SYS"
|
||||
#elif defined(PCBXLITE)
|
||||
#define TR_VKEYS "Shift","Exit","Enter","Ned","Op","Højre","Venstre"
|
||||
#elif defined(RADIO_FAMILY_JUMPER_T12)
|
||||
#define TR_VKEYS "Exit","Enter","Ned","Op","Højre","Venstre"
|
||||
#elif defined(RADIO_TX12) || defined(RADIO_TX12MK2)
|
||||
#define TR_VKEYS "Exit","Enter","PGUP","PGDN","SYS","MDL","TELE"
|
||||
#elif defined(RADIO_T8) || defined(RADIO_COMMANDO8)
|
||||
#define TR_VKEYS "RTN","ENTER","PGUP","PGDN","SYS","MDL","OP","NED"
|
||||
#elif defined(RADIO_ZORRO) || defined(RADIO_BOXER)
|
||||
#define TR_VKEYS "RTN","ENTER","PGUP","PGDN","SYS","MDL","TELE"
|
||||
#elif defined(PCBTARANIS)
|
||||
#define TR_VKEYS "Menu","Exit","Enter","Page","Plus","Minus"
|
||||
#else
|
||||
#define TR_VKEYS "Menu","Exit","Ned","Op","Højre","Venstre"
|
||||
#endif
|
||||
#define TR_STICK_NAMES "Sid", "Høj", "Gas", "Kræ"
|
||||
#define TR_SURFACE_NAMES "Sid", "Gas"
|
||||
|
||||
#if defined(PCBNV14)
|
||||
#define TR_RFPOWER_AFHDS2 "Standard","Høj"
|
||||
@@ -267,8 +184,11 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]","[C2]","[C3]"
|
||||
#endif
|
||||
|
||||
#define TR_RESERVE_VSRCRAW "[--]"
|
||||
#define TR_EXTRA_VSRCRAW "Bat","Time","GPS",TR_RESERVE_VSRCRAW,TR_RESERVE_VSRCRAW,TR_RESERVE_VSRCRAW,TR_RESERVE_VSRCRAW,"Tmr1","Tmr2","Tmr3"
|
||||
|
||||
#define TR_SRC_BATT "Batt"
|
||||
#define TR_SRC_TIME "Time"
|
||||
#define TR_SRC_GPS "GPS"
|
||||
#define TR_SRC_TIMER "Tmr"
|
||||
|
||||
#define TR_VTMRMODES "FRA","TIL","Strt","THs","TH%","THt"
|
||||
#define TR_VTRAINER_MASTER_OFF "FRA"
|
||||
@@ -539,6 +459,7 @@
|
||||
#define TR_MENU_RADIO_ANALOGS_CALIB "KALIBRERET ANALOGE"
|
||||
#define TR_MENU_RADIO_ANALOGS_RAWLOWFPS "RÅ ANALOGE (5 Hz)"
|
||||
#define TR_MENUCALIBRATION "KALIBRIERING"
|
||||
#define TR_MENU_FSWITCH "FUNCTION SWITCHES"
|
||||
#if defined(COLORLCD)
|
||||
#define TR_TRIMS2OFFSETS "Trim => Subtrim"
|
||||
#else
|
||||
@@ -923,6 +844,7 @@
|
||||
#define TR_DEBUG "Fejlfind"
|
||||
#define TR_KEYS_BTN BUTTON("Taster")
|
||||
#define TR_ANALOGS_BTN BUTTON(TR("Analo", "Analoge"))
|
||||
#define TR_FS_BTN BUTTON(TR("F. Switches", "Function switches"))
|
||||
#define TR_TOUCH_NOTFOUND "Tryk skærm ikke fundet"
|
||||
#define TR_TOUCH_EXIT "Tryk på skærm for at forlade"
|
||||
#define TR_SET BUTTON("Set")
|
||||
|
||||
Reference in New Issue
Block a user