Bsongis/menus refactoring (#6463)

Menus refactoring
This commit is contained in:
Bertrand Songis
2019-05-29 16:04:09 +02:00
committed by GitHub
parent 1b71b7fcbc
commit 670e101fa5
36 changed files with 845 additions and 684 deletions
+18
View File
@@ -215,3 +215,21 @@ void drawPower(coord_t x, coord_t y, int8_t dBm, LcdFlags att)
}
}
}
void drawReceiverName(coord_t x, coord_t y, uint8_t moduleIdx, uint8_t receiverIdx, LcdFlags flags)
{
if (isModulePXX2(moduleIdx)) {
if (g_model.moduleData[moduleIdx].pxx2.receiverName[receiverIdx][0] != '\0')
lcdDrawSizedText(x, y, g_model.moduleData[moduleIdx].pxx2.receiverName[receiverIdx], effectiveLen(g_model.moduleData[moduleIdx].pxx2.receiverName[receiverIdx], PXX2_LEN_RX_NAME), flags);
else
lcdDrawText(x, y, "---", flags);
}
#if defined(HARDWARE_INTERNAL_MODULE)
else if (moduleIdx == INTERNAL_MODULE) {
lcdDrawText(x, y, "Internal", flags);
}
#endif
else {
lcdDrawText(x, y, "External", flags);
}
}