feat: add support for RadioMaster TX16S MK3 (#7017)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com>
This commit is contained in:
3djc
2026-01-25 14:08:05 +10:00
committed by GitHub
co-authored by philmoz 3djc Peter Feerick
parent 5394e84871
commit be496b66b6
86 changed files with 2789 additions and 60 deletions
+6 -1
View File
@@ -100,6 +100,11 @@ class ADCInputParser:
'name': 'RTC_BAT',
'suffix': 'RTC_BAT',
},
{
'type': 'LUX',
'name': 'LUX',
'suffix': 'LUX',
},
{
'range': AZ_seq(),
'type': ADCInput.TYPE_SWITCH,
@@ -237,7 +242,7 @@ class ADCInputParser:
if 'PWM_STICKS' in self.hw_defs:
ch = self.hw_defs.get(f'STICK_PWM_CHANNEL_{adc_input.name}')
adc_input.pwm_channel = idx if ch is None else ch
if adc_input.type != 'VBAT' and adc_input.type != 'RTC_BAT':
if adc_input.type != 'VBAT' and adc_input.type != 'RTC_BAT' and adc_input.type != 'LUX':
d = self.dirs[idx]
if d < 0:
adc_input.inverted = True
+11 -1
View File
@@ -48,12 +48,22 @@ static const etx_hal_adc_input_t _rtc_bat_inputs[] = {
{% endfor %}
};
{% set n_inputs = rtc_bat_offset + n_rtc_bat %}
{% set lux_offset = rtc_bat_offset + n_rtc_bat %}
{% set lux_inputs = adc_inputs.inputs | selectattr('type', '==', 'LUX') | list %}
{% set n_lux = lux_inputs | count %}
static const etx_hal_adc_input_t _lux_inputs[] = {
{% for input in lux_inputs %}
{ "{{ input.name }}", nullptr, nullptr },
{% endfor %}
};
{% set n_inputs = lux_offset + n_lux %}
static const etx_hal_adc_inputs_t _hal_inputs[] = {
{ {{ n_mains }}, 0, _main_inputs },
{ {{ n_flex }}, {{ flex_offset }}, _flex_inputs },
{ {{ n_vbat }}, {{ vbat_offset }}, _vbat_inputs },
{ {{ n_rtc_bat }}, {{ rtc_bat_offset }}, _rtc_bat_inputs },
{ {{ n_lux }}, {{ lux_offset }}, _lux_inputs },
{ {{ n_inputs }}, 0, nullptr },
};
+1 -1
View File
@@ -58,7 +58,7 @@ KEYS = [
KEY_LABELS = [
{
"targets": {"boxer", "f16", "mt12", "gx12", "pocket", "tx12", "tx12mk2", "tx16s", "v16", "zorro"},
"targets": {"boxer", "f16", "mt12", "gx12", "pocket", "tx12", "tx12mk2", "tx16s", "tx16smk3","v16", "zorro"},
"keys": {
"EXIT": { "label": "RTN" }
}
+67
View File
@@ -89,6 +89,73 @@ LEGACY_NAMES = [
}
}
},
{
"targets": {"tx16smk3"},
"inputs": {
"LH": {
"yaml": "Rud",
"lua": "rud",
"description": "Rudder"
},
"LV": {
"yaml": "Ele",
"lua": "ele",
"description": "Elevator"
},
"RV": {
"yaml": "Thr",
"lua": "thr",
"description": "Throttle"
},
"RH": {
"yaml": "Ail",
"lua": "ail",
"description": "Aileron"
},
"P1": {
"yaml": "S1",
"lua": "s1",
"label": "S1",
"short_label": "1",
"description": "Potentiometer S1"
},
"P2": {
"yaml": "S2",
"lua": "s2",
"label": "S2",
"short_label": "2",
"description": "Potentiometer S2"
},
"SL1": {
"yaml": "LS",
"lua": "ls",
"label": "LS",
"short_label": "L",
"description": "Left slider"
},
"SL2": {
"yaml": "RS",
"lua": "rs",
"label": "RS",
"short_label": "R",
"description": "Right slider"
},
"EXT1": {
"yaml": "EXT1",
"lua": "ext1",
"label": "EXT1",
"short_label": "E1",
"description": "Ext 1"
},
"EXT2": {
"yaml": "EXT2",
"lua": "ext2",
"label": "EXT2",
"short_label": "E2",
"description": "Ext 2"
}
}
},
{
"targets": {"t15", "t15pro", "tx15"},
"inputs": {
+8
View File
@@ -157,6 +157,14 @@ POT_CONFIG = {
"SL1": {"default": "SLIDER"},
"SL2": {"default": "SLIDER"}
},
"tx16smk3": {
"P1": {"default": "POT_CENTER"},
"P2": {"default": "POT_CENTER"},
"SL1": {"default": "SLIDER"},
"SL2": {"default": "SLIDER"},
"EXT1": {"default": "NONE"},
"EXT2": {"default": "NONE"},
},
"f16": {
"P1": {"default": "POT_CENTER"},
"P2": {"default": "MULTIPOS"},
+20
View File
@@ -420,6 +420,26 @@ SWITCH_CONFIG = {
"SG": {"default": "3POS"},
"SH": {"default": "TOGGLE"}
},
"tx16smk3": {
"SA": {"default": "3POS"},
"SB": {"default": "3POS"},
"SC": {"default": "3POS"},
"SD": {"default": "3POS"},
"SE": {"default": "3POS"},
"SF": {"default": "2POS"},
"SG": {"default": "3POS"},
"SH": {"default": "2POS"},
#optional
"SI": {"default": "NONE"},
"SJ": {"default": "NONE"},
# custom switches
"SK": {"default": "2POS"},
"SL": {"default": "2POS"},
"SM": {"default": "2POS"},
"SN": {"default": "2POS"},
"SO": {"default": "2POS"},
"SP": {"default": "2POS"},
},
"f16": {
"SA": {"default": "3POS"},
"SB": {"default": "3POS"},