2.4 continued (#8092)
Quite a bit of work on 2.4 Co-authored-by: 3djc <Th1sisfmyofmyo>
This commit is contained in:
co-authored by
3djc <Th1sisfmyofmyo>
parent
cd6aa7af00
commit
87cd9047b1
@@ -24,32 +24,31 @@
|
||||
#if defined(MULTIMODULE)
|
||||
void lcdDrawMultiProtocolString(coord_t x, coord_t y, uint8_t moduleIdx, uint8_t protocol, LcdFlags flags)
|
||||
{
|
||||
if (protocol <= MODULE_SUBTYPE_MULTI_LAST) {
|
||||
MultiModuleStatus & status = getMultiModuleStatus(moduleIdx);
|
||||
if (status.protocolName[0] && status.isValid()) {
|
||||
lcdDrawText(x, y, status.protocolName, flags);
|
||||
}
|
||||
else if (protocol <= MODULE_SUBTYPE_MULTI_LAST) {
|
||||
lcdDrawTextAtIndex(x, y, STR_MULTI_PROTOCOLS, protocol, flags);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
MultiModuleStatus &status = getMultiModuleStatus(moduleIdx);
|
||||
if (status.protocolName[0] && status.isValid())
|
||||
lcdDrawText(x, y, status.protocolName, flags);
|
||||
else
|
||||
lcdDrawNumber(x, y, protocol + 3, flags); // Convert because of OpenTX FrSky fidling (OpenTX protocol tables and Multiprotocol tables don't match)
|
||||
lcdDrawNumber(x, y, protocol + 3, flags); // Convert because of OpenTX FrSky fidling (OpenTX protocol tables and Multiprotocol tables don't match)
|
||||
}
|
||||
}
|
||||
|
||||
void lcdDrawMultiSubProtocolString(coord_t x, coord_t y, uint8_t moduleIdx, uint8_t subType, LcdFlags flags)
|
||||
{
|
||||
const mm_protocol_definition *pdef = getMultiProtocolDefinition(g_model.moduleData[moduleIdx].getMultiProtocol());
|
||||
if (subType <= pdef->maxSubtype && pdef->subTypeString != nullptr) {
|
||||
MultiModuleStatus & status = getMultiModuleStatus(moduleIdx);
|
||||
const mm_protocol_definition * pdef = getMultiProtocolDefinition(g_model.moduleData[moduleIdx].getMultiProtocol());
|
||||
|
||||
if (status.protocolName[0] && status.isValid()) {
|
||||
lcdDrawText(x, y, status.protocolSubName, flags);
|
||||
}
|
||||
else if (subType <= pdef->maxSubtype && pdef->subTypeString != nullptr) {
|
||||
lcdDrawTextAtIndex(x, y, pdef->subTypeString, subType, flags);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
MultiModuleStatus &status = getMultiModuleStatus(moduleIdx);
|
||||
if (status.protocolName[0] && status.isValid())
|
||||
lcdDrawText(x, y, status.protocolSubName, flags);
|
||||
else
|
||||
lcdDrawNumber(x, y, subType, flags);
|
||||
lcdDrawNumber(x, y, subType, flags);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user