feat: Support for ext. Multiplex MLink JR type module (#3352)

* introducing external MLink module telemetry as module PPM subtype

* implemented fix for sensor discovery display not showing all detected sensors (is in separate PR too)

implemented PPM subtypes in Companion

* add PPM subtype to model printer

finalize subtypes for PPM in Companion

* added logic to try to use HW UART with inverters turned off first (e.g. NV14), then, if not successfull use soft serial inverted (== uninverted data due to HW inverters on PCB)

changed start bit detection IRQ priority from 5 to the previous 0 (also in separate PR)

* extended telemetry timeout to 2s due to slow Mlink RSSI update rate

* changed the "NOTLM" sub-type texts to:

- "No Telem" for 128x64 (this is the max numbers of characters it can take)
- "No Telemetry" everything else including Companion

* Companion:

- lower case 1st charachter on PpmSubTypeStrings to ppmSubTypeStrings
- added telemetry hooks for ppmSubTypeStrings stringx

* simplified serial port initialization for MLink telemetry

* editorial change: corrected obsolete comment
This commit is contained in:
Michael
2023-05-16 11:22:47 +10:00
committed by GitHub
parent 3d6bc638a6
commit 5db37e2a2b
21 changed files with 231 additions and 14 deletions
@@ -1845,6 +1845,12 @@ static const struct YamlIdStr enum_FLYSKY_Subtypes[] = {
{ 0, NULL }
};
static const struct YamlIdStr enum_PPM_Subtypes[] = {
{ 0, "NOTLM" },
{ 1, "MLINK" },
{ 0, NULL }
};
static const struct YamlIdStr enum_DSM2_Subtypes[] = {
{ 0, "LP45" },
{ 1, "DSM2" },
@@ -1888,6 +1894,8 @@ static void r_modSubtype(void* user, uint8_t* data, uint32_t bitoffs,
#endif
} else if (md->type == MODULE_TYPE_DSM2) {
md->subType = yaml_parse_enum(enum_DSM2_Subtypes, val, val_len);
} else if (md->type == MODULE_TYPE_PPM) {
md->subType = yaml_parse_enum(enum_PPM_Subtypes, val, val_len);
} else {
md->subType = yaml_str2uint(val, val_len);
}
@@ -1925,6 +1933,8 @@ static bool w_modSubtype(void* user, uint8_t* data, uint32_t bitoffs,
#endif
} else if (md->type == MODULE_TYPE_DSM2) {
str = yaml_output_enum(md->subType, enum_DSM2_Subtypes);
} else if (md->type == MODULE_TYPE_PPM) {
str = yaml_output_enum(md->subType, enum_PPM_Subtypes);
} else {
str = yaml_unsigned2str(val);
}