Firmware options (#6583)

Firmware options screen
This commit is contained in:
3djc
2019-07-26 11:56:42 +02:00
committed by Bertrand Songis
parent 66e8f88fc1
commit 381b54a56f
17 changed files with 193 additions and 34 deletions
+19
View File
@@ -19,6 +19,7 @@
*/
#include "opentx.h"
#include "options.h"
bool menuRadioVersion(event_t event)
{
@@ -53,5 +54,23 @@ bool menuRadioVersion(event_t event)
}
#endif
coord_t y = MENU_CONTENT_TOP + 5*FH;
lcdDrawText(MENUS_MARGIN_LEFT, y, "OPTS:");
lcdNextPos = MENUS_MARGIN_LEFT + 64;
for (uint8_t i=0; options[i]; i++) {
const char * option = options[i];
coord_t width = getTextWidth(option);
if((lcdNextPos + 5 + width) > LCD_W) {
lcdDrawText(lcdNextPos, y, ",");
lcdNextPos = MENUS_MARGIN_LEFT;
y += FH;
}
if (i > 0 && lcdNextPos !=MENUS_MARGIN_LEFT)
lcdDrawText(lcdNextPos, y, ", ");
lcdDrawText(lcdNextPos, y, option);
}
return true;
}