Merge branch '2.2' of https://github.com/opentx/opentx into 2.2

This commit is contained in:
3djc
2018-06-09 11:59:11 +02:00
12 changed files with 306 additions and 121 deletions
+26
View File
@@ -66,6 +66,32 @@ void pushMenu(MenuHandlerFunc newMenu)
TRACE("pushMenu(%d, %p)", menuLevel, newMenu);
}
void readModelNotes()
{
LED_ERROR_BEGIN();
strcpy(s_text_file, MODELS_PATH "/");
char *buf = strcat_currentmodelname(&s_text_file[sizeof(MODELS_PATH)]);
strcpy(buf, TEXT_EXT);
if (!isFileAvailable(s_text_file)) {
char *buf = strAppendFilename(&s_text_file[sizeof(MODELS_PATH)], g_eeGeneral.currModelFilename, LEN_MODEL_FILENAME);
strcpy(buf, TEXT_EXT);
}
clearKeyEvents();
event_t event = EVT_ENTRY;
while (event != EVT_KEY_FIRST(KEY_EXIT)) {
lcdRefreshWait();
lcdClear();
menuTextView(event);
event = getEvent();
lcdRefresh();
wdt_reset();
}
LED_ERROR_END();
}
bool menuModelNotes(event_t event)
{
if (event == EVT_ENTRY) {
+1
View File
@@ -505,6 +505,7 @@ extern void (*popupMenuHandler)(const char * result);
extern char s_text_file[TEXT_FILENAME_MAXLEN];
void pushMenuTextView(const char * filename);
void pushModelNotes();
void readModelNotes();
#define LABEL(...) (uint8_t)-1