-
-
Notifications
You must be signed in to change notification settings - Fork 344
Control inputs refactor
This page documents the concepts and ideas implemented in #2631.
In YAML
, only canonical names are used. The UI uses however translated labels
that can be overridden with custom labels.
Sometimes called sticks, gimbals, wheel and throttle: whatever is used to control the vehicle.
To be able to implement the stick modes used usually in RC aircrafts, it is necessary to map the physical controls to canonical labels.
Canonical names shall be used for physical reference:
- calibration data,
Canonical labels are used for logical references:
- inputs
- mixer lines
- etc
Corresponding to the canonical labels, UI labels are used to present translated names to the user. These UI labels can be overidden by the user by defining custom labels.
-
Radios with 2 gimbals:
-
LH
: left gimbal, vertical axis -
LV
: left gimbal, horizontal axis -
RV
: right gimbal, vertical axis -
RH
: right gimbal, horizontal axis
-
-
Surface radios:
-
WH
: steering wheel -
TR
: throttle trigger
-
-
Radios with 2 gimbals:
Rud
Ele
Thr
Ail
-
Surface radios:
Whl
Thr
Additional analog controls have canonical names equal to the canonical labels.
On top of these, labels can be defined to be used in the UI and thus correspond to the real labels printed on the radio case on in the user manual. These labels can be overidden by the user by defining custom labels.
Canonical / physical names:
-
P1
,P2
, etc -
SL1
,SL2
, etc -
JSx
andJSy
Canonical names:
-
SA
toSZ
We use different APIs for the different types of names and labels.
All APIs used the same types as follows:
enum {
ADC_INPUT_MAIN,
ADC_INPUT_POT,
ADC_INPUT_AXIS,
ADC_INPUT_VBAT,
ADC_INPUT_RTC_BAT
};
Physical names are manipulated by using the following functions:
const char* analogGetPhysicalName(uint8_t type, uint8_t idx);
int analogLookupPhysicalIdx(uint8_t type, const char* name, size_t len);
Canonical names are retrieved by using the following function:
const char* analogGetCanonicalName(uint8_t type, uint8_t idx);
int analogLookupCanonicalIdx(uint8_t type, const char* name, size_t len);
UI labels are retrieved using the following functions:
# Retrievs the name of the input (custom or canonical)
const char* getAnalogLabel(uint8_t type, uint8_t idx);
# Custom labels
void analogSetCustomLabel(uint8_t type, uint8_t idx, const char* str, size_t len);
const char* analogGetCustomLabel(uint8_t type, uint8_t idx);
bool analogHasCustomLabel(uint8_t type, uint8_t idx);
Getting started with Git
- Workflow for GitHub noobs
Building and debugging EdgeTX
- In a webbrowser with Gitpod
- Windows 10 (MSYS2)
- Docker with Windows 10
- Ubuntu in a WSL2 under Win10
- Ubuntu 20.04
- MacOS 10.15
- MacOS 14.1
Modifications:
- Flysky Hall Sticks Mod
- Flysky FRM303 Mod for TX16S
- Flysky PL18 & PL18EV Hardware Mod for Complete EdgeTX Support
- Flysky NB4+ Hardware Mod for Complete EdgeTX Support
- Flashing EdgeTX to Flysky PL18 or Paladin-EV
How to unbrick your radio with STM32CubeProgrammer
DMA mappings of radios:
- RadioMaster TX16S
- FlySky NV14
Interrupt usage of radios:
- RadioMaster TX16S
Implementation notes:
- YAML Parser/Generator
- Mixer synchronisation
Deprecated:
- Windows 10 (Visual C++)