From ae7824eff8946eec8958f5a58683a2872d630b25 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 8 Apr 2021 15:40:23 +0200 Subject: [PATCH] ViewMain must be created first --- radio/src/opentx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 8fcce8cc1..c19056b9b 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1927,8 +1927,10 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim void opentxInit() { TRACE("opentxInit"); - -#if defined(GUI) && !defined(LIBOPENUI) +#if defined(LIBOPENUI) + // create ViewMain + ViewMain::instance(); +#elif defined(GUI) // TODO add a function for this (duplicated) menuHandlers[0] = menuMainView; #if MENUS_LOCK != 2/*no menus*/