feat: Add support for Radiomaster MT12 (#4277)

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Raphael Coeffic
2023-11-04 18:18:17 +10:00
committed by GitHub
co-authored by 3djc raphaelcoeffic Peter Feerick
parent cd89e06194
commit ca5355e0c7
22 changed files with 300 additions and 47 deletions
+39
View File
@@ -258,6 +258,45 @@ LEGACY_NAMES = [
}
}
},
{
"targets": {"mt12"},
"inputs": {
"ST": {
"yaml": "ST"
},
"TH": {
"yaml": "TH"
},
"P1": {
"yaml": "POT1",
"lua": "s1",
"label": "S1",
"short_label": "1",
"description": "Potentiometer 1"
},
"P2": {
"yaml": "POT2",
"lua": "s2",
"label": "S2",
"short_label": "2",
"description": "Potentiometer 2"
},
"P3": {
"yaml": "POT3",
"lua": "s3",
"label": "S3",
"short_label": "3",
"description": "Analog 3"
},
"P4": {
"yaml": "POT4",
"lua": "s4",
"label": "S4",
"short_label": "4",
"description": "Analog 4"
}
}
},
{
"targets": {
"commando8",
+6
View File
@@ -14,6 +14,12 @@ POT_CONFIG = {
"P1": {"default": "POT_CENTER"},
"P2": {"default": "POT_CENTER"}
},
"mt12": {
"P1": {"default": "POT"},
"P2": {"default": "POT"},
"P3": {"default": "NONE"},
"P4": {"default": "NONE"}
},
"tpro": {
"P1": {"default": "POT_CENTER"},
"P2": {"default": "POT_CENTER"}
+8
View File
@@ -47,6 +47,14 @@ SWITCH_CONFIG = {
"SG": {"default": "3POS"},
"SH": {"default": "TOGGLE"}
},
"mt12": {
# left side
"SA": { "default": "3POS", "display": [ 0, 0 ] },
"SB": { "default": "TOGGLE", "display": [ 0, 1 ] },
# right side
"SC": { "default": "TOGGLE", "display": [ 1, 0 ] },
"SD": { "default": "TOGGLE", "display": [ 1, 1 ] },
},
"t8": {
# left side
"SA": {"default": "2POS", "display": [0, 0]},