Merge pull request #3744 from opentx/schwabe/multi_new_protocols
Add new protocols supported by the DIY Multi module
This commit is contained in:
@@ -6,6 +6,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(COMPANION_NAME "companion")
|
||||
set(SIMULATOR_NAME "simulator")
|
||||
if(APPLE)
|
||||
set(SIMULATOR_LIB_PATH ${CMAKE_INSTALL_PREFIX}/Contents/companion.app/Ressources)
|
||||
endif()
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
option(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
|
||||
@@ -264,7 +267,11 @@ target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation common qxtcommandopti
|
||||
|
||||
############# Packaging ####################
|
||||
message(STATUS ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if(APPLE)
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS
|
||||
FILES_MATCHING PATTERN "libopentx-*.dylib"
|
||||
)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
install(TARGETS ${COMPANION_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS ${SIMULATOR_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(DIRECTORY ${CMAKE_BINARY_DIR}/ DESTINATION ${SIMULATOR_LIB_PATH} USE_SOURCE_PERMISSIONS
|
||||
@@ -348,6 +355,9 @@ endif()
|
||||
|
||||
if(APPLE)
|
||||
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
|
||||
SET_SOURCE_FILES_PROPERTIES(${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set(${COMPANION_SOURCES} ${COMPANION_SOURCES} ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE})
|
||||
|
||||
if(CMAKE_GENERATOR STREQUAL Xcode)
|
||||
set(WORK_DIR ${CMAKE_BINARY_DIR}/Debug)
|
||||
else()
|
||||
@@ -393,6 +403,15 @@ string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
|
||||
# very poor trace-backs from the users when they report Companion crash
|
||||
set(CPACK_STRIP_FILES FALSE)
|
||||
|
||||
INSTALL(TARGETS ${COMPANION_NAME}
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION bin COMPONENT Runtime
|
||||
)
|
||||
|
||||
|
||||
# directories to look for dependencies
|
||||
SET(DIRS ${QT_LIBRARY_DIRS})
|
||||
|
||||
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
|
||||
if(DPKG_PROGRAM)
|
||||
set(CPACK_GENERATOR "DEB")
|
||||
@@ -408,6 +427,14 @@ if(DPKG_PROGRAM)
|
||||
set(CPACK_DEBIAN_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_DEBIAN_ARCHITECTURE $(CMAKE_SYSTEM_PROCESSOR))
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
elseif(APPLE)
|
||||
set(APPS "${COMPANION_NAME}.app")
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_BINARY_DRAGNDROP ON)
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE ${COMPANION_SRC_DIRECTORY}/images/dmg_background.png)
|
||||
set(CPACK_DMG_VOLUME_NAME "OpenTX Companion")
|
||||
set(CPACK_DMG_DS_STORE ${PROJECT_SOURCE_DIR}/companion/targets/mac/DS_Store)
|
||||
|
||||
else(DPKG_PROGRAM)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_RPM_PACKAGE_VERSION ${VERSION})
|
||||
@@ -416,4 +443,11 @@ else(DPKG_PROGRAM)
|
||||
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
|
||||
endif(DPKG_PROGRAM)
|
||||
|
||||
INSTALL(CODE "
|
||||
include(BundleUtilities)
|
||||
" COMPONENT Runtime
|
||||
VERIFY_APP(${COMPANION_NAME})
|
||||
)
|
||||
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -1870,9 +1870,9 @@ unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
|
||||
return 3;
|
||||
|
||||
case MM_RF_PROTO_FLYSKY:
|
||||
case MM_RF_PROTO_MJXQ:
|
||||
return 4;
|
||||
|
||||
case MM_RF_PROTO_MJXQ:
|
||||
case MM_RF_PROTO_YD717:
|
||||
return 5;
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ QString ModelPrinter::printMultiSubType(int rfProtocol, int subType) {
|
||||
/* custom protocols */
|
||||
static const char *custom_subtype_strings[] = {"Subtype 0","Subtype 1","Subtype 2","Subtype 3","Subtype 4","Subtype 5","Subtype 6","Subtype 7"};
|
||||
static const char *flysky_strings[] = {"Standard","V9x9","V6x6","V912"};
|
||||
static const char *frsky_strings[] = {"D16", "D8", "D16 8ch"};
|
||||
static const char *frsky_strings[] = {"D16", "D8", "D16 8ch", "LR12"};
|
||||
static const char *hisky_strings[] = { "HiSky", "HK310" };
|
||||
static const char *dsm2_strings[] = {"DSM2", "DSMX"};
|
||||
static const char *yd717_strings[] = {"YD717", "Skywalker", "Syma X2", "XINXUN", "NIHUI"};
|
||||
@@ -130,7 +130,7 @@ QString ModelPrinter::printMultiSubType(int rfProtocol, int subType) {
|
||||
static const char *cg023_strings[] = {"CG023", "YD829", "H3 3D"};
|
||||
static const char* kn_strings[] = {"WLtoys", "FeiLun"};
|
||||
static const char* mt99_strings[] = {"MT99","H7","YZ"};
|
||||
static const char* mjxq_strings[] = {"WLH08", "X600", "X800", "H26D"};
|
||||
static const char* mjxq_strings[] = {"WLH08", "X600", "X800", "H26D", "E010"};
|
||||
|
||||
if (rfProtocol >= MM_RF_PROTO_CUSTOM) {
|
||||
return CHECK_IN_ARRAY(custom_subtype_strings, subType);
|
||||
|
||||
Reference in New Issue
Block a user