Disable pulse while model notes are displayed (#5758)

* Implement model note view without menu handler. Use it before pulse starts

* Also at model change. Handle wd reset and start pulses after mixer

* Fix Horus compile

* Fix Horus crash

* Fix coding style issue
This commit is contained in:
3djc
2018-06-09 11:34:56 +02:00
committed by Bertrand Songis
parent 45804b318a
commit 13c5387dc9
7 changed files with 65 additions and 17 deletions
+23 -1
View File
@@ -2,7 +2,7 @@
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
@@ -102,6 +102,28 @@ void readTextFile(int & lines_count)
#define EVT_KEY_PREVIOUS_LINE EVT_KEY_FIRST(KEY_UP)
#endif
void readModelNotes()
{
LED_ERROR_BEGIN();
strcpy(s_text_file, MODELS_PATH "/");
char *buf = strcat_modelname(&s_text_file[sizeof(MODELS_PATH)], g_eeGeneral.currModel);
strcpy(buf, TEXT_EXT);
clearKeyEvents();
event_t event = EVT_ENTRY;
while (event != EVT_KEY_BREAK(KEY_EXIT)) {
lcdRefreshWait();
lcdClear();
menuTextView(event);
event = getEvent();
lcdRefresh();
wdt_reset();
}
LED_ERROR_END();
}
void menuTextView(event_t event)
{
static int lines_count;