feat(bw): Change layout of telemetry page on B&W radios to match color layout (#3770)

* Improve telemetry sensors view

* Improve telemetry sensors view (212)

* Remove undue TRACES

* COLORLCD compilation fix

* chore: Quit your no EoF newline whining Github!

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
This commit is contained in:
3djc
2023-07-07 10:56:34 +10:00
committed by GitHub
co-authored by Phil Mitchell
parent 7f669f12d9
commit 43db9c8ceb
6 changed files with 62 additions and 43 deletions
+13 -2
View File
@@ -1177,9 +1177,7 @@ const mm_protocol_definition *getMultiProtocolDefinition (uint8_t protocol)
// Return the empty last protocol
return pdef;
}
#endif
#if defined(MULTIMODULE)
const char * getMultiOptionTitleStatic(uint8_t moduleIdx)
{
const uint8_t multi_proto = g_model.moduleData[moduleIdx].multi.rfProtocol;
@@ -1201,3 +1199,16 @@ const char * getMultiOptionTitle(uint8_t moduleIdx)
return getMultiOptionTitleStatic(moduleIdx);
}
#endif
#if !defined(COLORLCD)
uint8_t expandableSection(coord_t y, const char* title, uint8_t value, uint8_t attr, event_t event)
{
lcdDrawTextAlignedLeft(y, title);
lcdDrawText(LCD_W == 128 ? 120 : 200, y, value ? STR_CHAR_UP : STR_CHAR_DOWN, attr);
if (attr && (event == EVT_KEY_BREAK(KEY_ENTER))) {
value = !value;
s_editMode = 0;
}
return value;
}
#endif