chore: auto define navigation type based on keys present (#4893)
This commit is contained in:
@@ -5,10 +5,8 @@ if(NOT GUI_DIR STREQUAL colorlcd)
|
||||
set(SRC
|
||||
${SRC}
|
||||
gui/navigation/common.cpp
|
||||
gui/navigation/navigation_${NAVIGATION_TYPE}.cpp
|
||||
gui/navigation/navigation.cpp
|
||||
)
|
||||
string(TOUPPER ${NAVIGATION_TYPE} NAVIGATION_TYPE)
|
||||
add_definitions(-DNAVIGATION_${NAVIGATION_TYPE})
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(NAVIGATION_X9D)
|
||||
#include "navigation_x9d.cpp"
|
||||
#elif defined(NAVIGATION_9X)
|
||||
#include "navigation_9x.cpp"
|
||||
#elif defined(NAVIGATION_XLITE)
|
||||
#include "navigation_xlite"
|
||||
#elif defined(NAVIGATION_X7)
|
||||
#include "navigation_x7.cpp"
|
||||
#else
|
||||
static_assert("navigation not defined");
|
||||
#endif
|
||||
Reference in New Issue
Block a user