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
+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) {