Compare commits

..

5 Commits

Author SHA1 Message Date
Arne Schwabe 1599e85820 Implement AUtobind and low power modes 2016-03-15 18:57:40 +01:00
Arne Schwabe cc89285a4c fix opt 2016-03-15 00:39:04 +01:00
Arne Schwabe 79792dfd7b Implement auto bind and low power settings 2016-03-15 00:25:42 +01:00
Arne Schwabe e4f00e867f Implement specifying a custom protocol for the multi module
This is useful if OpenTX firmware is older than the multi module firmware and the protocol in question is not yet in the protocol list of the OpenTX firmware.
2016-03-15 00:24:31 +01:00
Arne Schwabe 250730789c Multi module support for Taranis
Reuse some of the DSM2 routines to avoid code duplication.

This first version only implements the protocol on the Taranis. (and not

Telemetry code is currently untested and will not work (Polarity mismatch). The main protocols to use telemetry are FrSky protocols and not a high priority on the Taranis.

PATCH v3: Fix myeeprom.h, include option value in menu.
2016-03-15 00:22:44 +01:00
1009 changed files with 47172 additions and 73260 deletions
-1
View File
@@ -10,4 +10,3 @@ radio/src/bootloader/bootloader_ramBoot*
*.stamp
radio/src/lua/lua_fields_*.txt
radio/src/lua/lua_exports_*.txt
build*/
+11 -18
View File
@@ -1,27 +1,20 @@
sudo: required
dist: trusty
language: python
virtualenv:
system_site_packages: true
python:
- 3.4
language: cpp
before_install:
- sudo add-apt-repository ppa:ubuntu-sdk-team/ppa --yes
- sudo apt-get remove cmake cmake-data --yes
- sudo add-apt-repository ppa:george-edison55/precise-backports --yes
- sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded --yes
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
- sudo add-apt-repository ppa:beineri/opt-qt551 --yes
- sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' --yes
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-get update -qq
- rsync -av firmware.diydrones.com::Tools/Travis/*.deb ExtraPackages
install:
- sudo apt-get --yes --force-yes install qtbase5-dev qtmultimedia5-dev qttools5-dev qttools5-dev-tools python3-pyqt5 curl gcc-arm-none-eabi libfox-1.6-dev libgtest-dev
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/gcc-avr_1%253a4.8-2.1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpfr4_3.1.2-1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/avr-libc_1%253a1.8.0-4.1_all.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/binutils-avr_2.23.1-2.1_amd64.deb
- wget --quiet http://firmware.ardupilot.org/Tools/Travis/libmpc3_1.0.1-1ubuntu1_amd64.deb
- sudo dpkg --install gcc-avr_1%3a4.8-2.1_amd64.deb avr-libc_1%3a1.8.0-4.1_all.deb libmpfr4_3.1.2-1_amd64.deb binutils-avr_2.23.1-2.1_amd64.deb libmpc3_1.0.1-1ubuntu1_amd64.deb
- sudo apt-get install -y xvfb lcov cmake cmake-data bc curl gcc-arm-none-eabi qt-latest g++-5 libxerces-c-dev xsdcxx libsdl1.2-dev libusb-1.0-0 libfox-1.6-dev libgtest-dev python-clang-3.8 libclang-3.8-dev python-qt4
- sudo dpkg -i ExtraPackages/*.deb || echo "FAILED INSTALL OF EXTRA DEBS"
- export CXX="g++-5" CC="gcc-5"
script:
- ./tools/commit-tests.sh
- ./radio/util/commit-tests.sh .
-22
View File
@@ -8,17 +8,9 @@ set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
message(STATUS "OpenTX ${VERSION}")
set(SDCARD_REVISION "0003")
set(SDCARD_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}V${SDCARD_REVISION})
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0020 NEW)
cmake_policy(SET CMP0023 OLD)
if(POLICY CMP0043)
cmake_policy(SET CMP0043 NEW)
endif()
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
@@ -36,20 +28,6 @@ find_package(Qt5LinguistTools)
find_package(Qt5PrintSupport)
find_package(Qt5Multimedia)
message(STATUS "Looking for SDL ")
find_package(Sdl)
if(SDL_FOUND)
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
else()
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
endif()
message(STATUS "Looking for FOX ")
find_package(Fox)
if ((NOT FOX_FOUND) AND (NOT WIN32))
message("Libfox not found, simu target will not be available")
endif()
include(Macros)
today(DATE)
now(TIME)
-1
View File
@@ -17,4 +17,3 @@ Karl Szmutny
Michal Hlavinka
Pat Mackenzie
Michael Byrne
Christophe Brision (Ingwie)
+1 -1
View File
@@ -1,7 +1,7 @@
##OpenTX 2.2 Branch
[![Build Status](https://travis-ci.org/opentx/opentx.svg?branch=next)](https://travis-ci.org/opentx/opentx)
[![Join the chat at https://opentx.rocket.chat](https://camo.githubusercontent.com/3d659054abd6ce21c0e47cf3b83a51bda69ca282/68747470733a2f2f64656d6f2e726f636b65742e636861742f696d616765732f6a6f696e2d636861742e737667)](https://opentx.rocket.chat)
[![Join the chat at https://gitter.im/opentx/opentx](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/opentx/opentx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Donate using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJ9MASSKVW8WN)
The ongoing development on 2.2.x is done in this branch.
-2
View File
@@ -1,5 +1,4 @@
macro(add_bitmaps_target targetname filter width format)
set(bitmaps_files)
file(GLOB bitmaps ${filter})
foreach(bitmap ${bitmaps})
get_filename_component(target ${bitmap} NAME_WE)
@@ -20,5 +19,4 @@ macro(add_truetype_font_target radio name font size bold)
COMMAND ${RADIO_DIRECTORY}/util/font2png.py ${font} ${size} ${bold} ${target}
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
set(ttf_${radio}_fonts_targets ${ttf_${radio}_fonts_targets} ttf_${radio}_${name})
endmacro(add_truetype_font_target)
-63
View File
@@ -1,63 +0,0 @@
# Imported from the DeskVox project (LPGL 2.1)
include(FindPackageHandleStandardArgs)
set(hints
$ENV{LIB_BASE_PATH}/fox
)
set(paths
/usr
/usr/local
)
find_path(FOX_INCLUDE_DIR
NAMES
fx.h
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
include
include/fox
include/fox-1.6
)
find_library(FOX_LIBRARY
NAMES
FOX-1.6
fox-1.6
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
lib64
lib
)
find_library(FOX_LIBRARY_DEBUG
NAMES
FOXD-1.6
foxd-1.6
HINTS
${hints}
PATHS
${paths}
PATH_SUFFIXES
lib64
lib
)
if(FOX_LIBRARY_DEBUG)
set(FOX_LIBRARIES optimized ${FOX_LIBRARY} debug ${FOX_LIBRARY_DEBUG})
else()
set(FOX_LIBRARIES ${FOX_LIBRARY})
endif()
find_package_handle_standard_args(FOX
DEFAULT_MSG
FOX_INCLUDE_DIR
FOX_LIBRARY
)
+5
View File
@@ -150,6 +150,11 @@ IF(SDL_LIBRARY_TEMP)
SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
ENDIF(NOT APPLE)
# For MinGW library
IF(MINGW)
SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP})
ENDIF(MINGW)
# Set the final string here so the GUI reflects the final state.
SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
+61 -137
View File
@@ -1,4 +1,4 @@
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(C9X_NAME_SUFFIX ${VERSION_MAJOR}${VERSION_MINOR})
set(COMPANION_NAME "companion${C9X_NAME_SUFFIX}")
set(SIMULATOR_NAME "simulator${C9X_NAME_SUFFIX}")
@@ -8,15 +8,6 @@ else(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(SIMULATOR_NAME "simulator")
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# This the name that the user will see in the generated DMG and what the application
# will be called under /Applications. We include the version string to make installing
# different versions for different eeproms easier, i.e. without manually renaming
set(COMPANION_OSX_APP_BUNDLE_NAME "OpenTX Companion ${VERSION_MAJOR}.${VERSION_MINOR}")
# On OS X we copy dfu-util to the application bundle. This the path from which we copy
# the binary (default homebrew path)
set(DFU_UTIL_PATH "/usr/local/bin/dfu-util")
option(ALLOW_NIGHTLY_BUILDS "Allow nightly builds download / update") # Disabled by default
if(ALLOW_NIGHTLY_BUILDS)
add_definitions(-DALLOW_NIGHTLY_BUILDS)
@@ -34,10 +25,15 @@ if(TABLE_LAYOUT)
message(STATUS "Using QTableWidget")
endif(TABLE_LAYOUT)
message(STATUS "Looking for SDL ")
find_package(Sdl)
if(SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
add_definitions(-DSIMU_AUDIO)
message("SDL Include Path: " ${SDL_INCLUDE_DIR})
add_definitions(-DJOYSTICKS)
add_definitions(-DSIMU_AUDIO)
else()
message("SDL not found! Joysticks support will be disabled. Simulator audio will not work.")
endif()
message(STATUS "Looking for QT lupdate ")
@@ -227,13 +223,17 @@ qt5_wrap_ui(companion_SRCS ${companion_UIS})
qt5_wrap_cpp(companion_SRCS ${companion_MOC_HDRS})
qt5_add_translation(companion_QM ${companion_TS})
qt5_add_resources(companion_RCC ${companion_RESOURCES})
add_custom_target(gen_qrc DEPENDS ${companion_RCC})
add_definitions(-DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}")
add_executable(${COMPANION_NAME} MACOSX_BUNDLE WIN32 ${companion_SRCS} ${companion_RCC} ${companion_QM})
if(APPLE)
add_executable(${COMPANION_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_RCC} ${companion_QM})
# OS X compiler no longer automatically includes /Library/Frameworks in search path
set(CMAKE_EXE_LINKER_FLAGS -F/Library/Frameworks)
else()
add_executable(${COMPANION_NAME} WIN32 ${companion_SRCS} ${companion_RCC} ${companion_QM})
endif()
add_dependencies(${COMPANION_NAME} gen_qrc)
qt5_use_modules(${COMPANION_NAME} Core Widgets Network)
target_link_libraries(${COMPANION_NAME} PRIVATE generaledit modeledit simulation common qcustomplot shared ${PTHREAD_LIBRARY} ${SDL_LIBRARY})
@@ -255,53 +255,35 @@ if(WIN32)
set(simu_SRCS ${simu_SRCS} icon.rc)
endif()
if(APPLE)
add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE ${simu_SRCS} ${companion_RCC})
else()
add_executable(${SIMULATOR_NAME} WIN32 ${simu_SRCS} ${companion_RCC})
endif()
add_executable(${SIMULATOR_NAME} MACOSX_BUNDLE WIN32 ${simu_SRCS} ${companion_RCC})
add_dependencies(${SIMULATOR_NAME} gen_qrc)
# TODO not the same link command than companion?
target_link_libraries(${SIMULATOR_NAME} PRIVATE simulation common qxtcommandoptions ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${OPENTX_SIMULATOR_LIBS})
############# Packaging ####################
message(STATUS ${CMAKE_BINARY_DIR} ${CMAKE_INSTALL_PREFIX}/bin)
if(${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
FILES_MATCHING PATTERN "libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}"
PATTERN "CMakeFiles" EXCLUDE
PATTERN "_CPack_Packages" EXCLUDE
PATTERN "companion" EXCLUDE
PATTERN "radio" EXCLUDE
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop DESTINATION share/applications RENAME companion${C9X_NAME_SUFFIX}.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/simulator.desktop DESTINATION share/applications RENAME simulator${C9X_NAME_SUFFIX}.desktop)
if(${CMAKE_INSTALL_PREFIX} MATCHES "/usr/local")
install(FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
else()
install(FILES images/linuxicons/16x16/companion.png DESTINATION share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/22x22/companion.png DESTINATION share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/24x24/companion.png DESTINATION share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/32x32/companion.png DESTINATION share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/48x48/companion.png DESTINATION share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/128x128/companion.png DESTINATION share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/256x256/companion.png DESTINATION share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/512x512/companion.png DESTINATION share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/scalable/companion.svg DESTINATION share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
endif()
install(FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps RENAME companion${C9X_NAME_SUFFIX}.png)
install(FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps RENAME companion${C9X_NAME_SUFFIX}.svg)
install(FILES ../targets/linux/45-companion-taranis.rules DESTINATION /lib/udev/rules.d RENAME 45-companion${C9X_NAME_SUFFIX}-taranis.rules)
# Linux specific code
set(OperatingSystem "Linux")
elseif(WIN32)
else()
get_target_property(QtCore_LOCATION Qt5::Core LOCATION)
get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH)
get_filename_component(SDL_DIR ${SDL_LIBRARY} PATH)
@@ -346,6 +328,34 @@ if(WIN32)
)
endif()
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
if(CMAKE_GENERATOR STREQUAL Xcode)
set(WORK_DIR ${CMAKE_BINARY_DIR}/Debug)
else()
set(WORK_DIR ${PROJECT_BINARY_DIR})
endif()
add_custom_target(addframeworks
COMMAND mkdir -p companion.app/Contents/Frameworks
COMMAND mkdir -p companion.app/Contents/Resources
COMMAND mkdir -p companion.app/Contents/translations
COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files
COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations
COMMAND rsync -r /Library/Frameworks/SDL.framework companion.app/Contents/Frameworks/
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app
COMMAND install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL companion.app/Contents/MacOS/companion
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS ${COMPANION_NAME})
add_custom_target(makedmg
COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins
WORKING_DIRECTORY ${WORK_DIR}
DEPENDS addframeworks opentx-simulators-bundle)
endif()
if(LUPDATE_FOUND)
add_custom_target(translations
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
@@ -358,92 +368,14 @@ else()
endif()
set(CPACK_PACKAGE_NAME "companion${C9X_NAME_SUFFIX}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTX open source firmware")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware")
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE)
# The file stripping is deliberately disabled, with the stripped file we get
# very poor trace-backs from the users when they report Companion crash
set(CPACK_STRIP_FILES FALSE)
set(plugin_dest_dir bin)
set(qtconf_dest_dir bin)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/${COMPANION_NAME}")
IF(APPLE)
set(plugin_dest_dir ${COMPANION_NAME}.app/Contents/Plugins)
set(qtconf_dest_dir ${COMPANION_NAME}.app/Contents/Resources)
set(translations_dest_dir ${COMPANION_NAME}.app/Contents/translations)
set(APPS "\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app")
set_target_properties(${COMPANION_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Companion ${VERSION_MAJOR}.${VERSION_MINOR}")
set_target_properties(${SIMULATOR_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simulator ${VERSION_MAJOR}.${VERSION_MINOR}")
ENDIF(APPLE)
IF(WIN32)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/QtTest.exe")
ENDIF(WIN32)
INSTALL(TARGETS ${COMPANION_NAME}
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
)
# Qt5 + Cmake + Mac is poorly documented. A lot of this is guesswork
# and trial and error. Do not hesitate to fix it for the better
if(APPLE)
set(APPS "\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app")
file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(companion_res_dir ${COMPANION_NAME}.app/Contents/Resources)
install(FILES ${simulator_plugins} DESTINATION "${companion_res_dir}" COMPONENT Runtime)
# Write qt.conf to tell qt where to find it plugins
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
"[Paths]\nPlugins = Plugins\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "${companion_res_dir}"
COMPONENT Runtime)
# menu file
install(DIRECTORY ${PROJECT_SOURCE_DIR}/companion/targets/mac/qt_menu.nib DESTINATION "${companion_res_dir}" COMPONENT Runtime)
# translations file
install(FILES ${companion_QM} DESTINATION "${translations_dest_dir}" COMPONENT Runtime)
# manually add the cocoa plugin
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/platforms/" COMPONENT Runtime)
set(bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib")
# Add icon
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
set(MAC_ICON_FILE ${COMPANION_SRC_DIRECTORY}/images/${MACOSX_BUNDLE_ICON_FILE})
SET_SOURCE_FILES_PROPERTIES(${MAC_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(${COMPANION_SOURCES} ${COMPANION_SOURCES} ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE})
install(FILES ${MAC_ICON_FILE} DESTINATION ${companion_res_dir} COMPONENT Runtime)
# Copy dfu-util, resolve symlink first
get_filename_component(DFU_UTIL_ABSOLUTE_PATH ${DFU_UTIL_PATH} REALPATH)
install(FILES ${DFU_UTIL_ABSOLUTE_PATH} DESTINATION ${companion_res_dir} COMPONENT Runtime)
set(bundle_dfu_util_path "\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/dfu-util")
# These needs to be relative to CMAKE_INSTALL_PREFIX
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
# Include depencies (adding frameworks, fixing the embbeded libraries)
# I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is
# technically a hack (that is already is in the Bundle library ....)
install(CODE "
include(BundleUtilities)
file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
set(BU_CHMOD_BUNDLE_ITEMS on)
fixup_bundle(\"${APPS}\" \"\${bundle_simulator_libs};${bundle_qt_libs};${bundle_dfu_util_path}\" \"${QT_LIBRARY_DIR}\")
file(RENAME \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_NAME}.app\" \"\${CMAKE_INSTALL_PREFIX}/${COMPANION_OSX_APP_BUNDLE_NAME}.app\")
" COMPONENT Runtime)
endif()
find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems")
if(DPKG_PROGRAM)
set(CPACK_GENERATOR "DEB")
execute_process(
@@ -458,20 +390,12 @@ 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(CPACK_GENERATOR "DragNDrop")
# set(CPACK_GENERATOR "TGZ") # for quick testing
set(CPACK_BINARY_DRAGNDROP ON)
set(CPACK_DMG_BACKGROUND_IMAGE ${COMPANION_SRC_DIRECTORY}/images/splash22_3_dmg.png)
set(CPACK_DMG_VOLUME_NAME "OpenTX Companion")
set(CPACK_DMG_DS_STORE ${PROJECT_SOURCE_DIR}/companion/targets/mac/DS_Store)
set(CPACK_PACKAGE_FILE_NAME "opentx-${CPACK_PACKAGE_NAME_LOWERCASE}-${VERSION}")
else(DPKG_PROGRAM)
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_VERSION ${VERSION})
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME_LOWERCASE}-${VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/lib /lib/udev /lib/udev/rules.d")
endif(DPKG_PROGRAM)
include(CPack)
+1 -1
View File
@@ -740,7 +740,7 @@ void AppData::init()
// Load and store all variables. Use default values if setting values are missing
QString _tempString; // Do not touch. Do not change the settings version before a new verson update!
getset( _tempString, "settings_version" ,"220" ); // This is a version marker. Will be used to upgrade the settings later on.
getset( _tempString, "settings_version" ,"210" ); // This is a version marker. Will be used to upgrade the settings later on.
getset( _recentFiles, "recentFileList" ,"" );
getset( _mainWinGeo, "mainWindowGeometry" ,"" );
+1 -6
View File
@@ -109,14 +109,9 @@ void AppPreferencesDialog::initSettings()
ui->snapshotPath->setDisabled(true);
ui->snapshotPathButton->setDisabled(true);
}
#if defined(ALLOW_NIGHTLY_BUILDS)
ui->useCompanionNightlyBuilds->setChecked(g.useCompanionNightlyBuilds());
ui->useFirmwareNightlyBuilds->setChecked(g.useFirmwareNightlyBuilds());
#else
ui->useCompanionNightlyBuilds->hide();
ui->useFirmwareNightlyBuilds->hide();
#endif
ui->autoCheckCompanion->setChecked(g.autoCheckApp());
ui->useFirmwareNightlyBuilds->setChecked(g.useFirmwareNightlyBuilds());
ui->autoCheckFirmware->setChecked(g.autoCheckFw());
ui->showSplash->setChecked(g.showSplash());
ui->historySize->setValue(g.historySize());
+3 -3
View File
@@ -21,7 +21,7 @@ burnConfigDialog::burnConfigDialog(QWidget *parent) :
getSettings();
populateProgrammers();
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
setWindowTitle(tr("DFU-UTIL Configuration"));
ui->avrArgs->hide();
ui->avrdude_location->hide();
@@ -310,7 +310,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (checked) {
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
ui->label_dfu2->show();
ui->dfuArgs->show();
}
@@ -327,7 +327,7 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked)
}
}
else {
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
ui->label_dfu2->hide();
ui->dfuArgs->hide();
}
+4 -1
View File
@@ -134,7 +134,10 @@ int main(int argc, char *argv[])
}
QString splashScreen;
splashScreen = ":/images/splash.png";
if ( g.profile[g.id()].fwType().contains("taranis")) splashScreen = ":/images/splash-taranis.png";
else if ( g.profile[g.id()].fwType().contains("9xrpro")) splashScreen = ":/images/splash-9xrpro.png";
else if ( g.profile[g.id()].fwType().contains("9xr")) splashScreen = ":/images/splash-9xr.png";
else splashScreen = ":/images/splash-9x.png";
QPixmap pixmap = QPixmap(splashScreen);
QSplashScreen *splash = new QSplashScreen(pixmap);
+4 -1
View File
@@ -54,7 +54,10 @@
<file>images/simulator/9X/9xcursdown.png</file>
<file>images/simulator/9X/9xcursphoto.png</file>
<file>images/screenshot.png</file>
<file>images/splash.png</file>
<file>images/splash-9x.png</file>
<file>images/splash-9xrpro.png</file>
<file>images/splash-9xr.png</file>
<file>images/splash-taranis.png</file>
<file>images/companion-title.png</file>
<file>images/maps.png</file>
<file>images/track.png</file>
+1 -1
View File
@@ -3,7 +3,7 @@
#include "helpers.h"
ContributorsDialog::ContributorsDialog(QWidget * parent):
QDialog(parent),
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::HtmlDialog)
{
ui->setupUi(this);
+7 -73
View File
@@ -1380,9 +1380,9 @@ void ModelData::clear()
moduleData[0].channelsCount = 8;
moduleData[1].channelsStart = 0;
moduleData[1].channelsCount = 8;
moduleData[0].ppm.delay = 300;
moduleData[1].ppm.delay = 300;
moduleData[2].ppm.delay = 300;
moduleData[0].ppmDelay = 300;
moduleData[1].ppmDelay = 300;
moduleData[2].ppmDelay = 300;
int board = GetEepromInterface()->getBoard();
if (IS_TARANIS(board)) {
moduleData[0].protocol = PULSES_PXX_XJT_X16;
@@ -1397,7 +1397,7 @@ void ModelData::clear()
moduleData[1].protocol = PULSES_OFF;
}
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
flightModeData[i].clear(i);
flightModeData[i].clear();
}
clearInputs();
clearMixes();
@@ -1510,7 +1510,9 @@ int ModelData::getTrimValue(int phaseIdx, int trimIdx)
}
else {
phaseIdx = phase.trimRef[trimIdx];
if (phase.trimMode[trimIdx] != 0)
if (phase.trimMode[trimIdx] == 0)
result = 0;
else
result += phase.trim[trimIdx];
}
}
@@ -1765,33 +1767,6 @@ QString getBoardName(BoardEnum board)
}
}
const int Firmware::getFlashSize()
{
switch (board) {
case BOARD_STOCK:
return FSIZE_STOCK;
case BOARD_M128:
return FSIZE_M128;
case BOARD_MEGA2560:
case BOARD_GRUVIN9X:
return FSIZE_GRUVIN9X;
case BOARD_SKY9X:
return FSIZE_SKY9X;
case BOARD_9XRPRO:
case BOARD_AR9X:
return FSIZE_9XRPRO;
case BOARD_TARANIS:
case BOARD_TARANIS_PLUS:
case BOARD_TARANIS_X9E:
case BOARD_FLAMENCO:
return FSIZE_TARANIS;
case BOARD_HORUS:
return FSIZE_HORUS;
default:
return 0;
}
}
Firmware * GetFirmware(QString id)
{
foreach(Firmware * firmware, firmwares) {
@@ -1855,44 +1830,3 @@ SimulatorInterface *GetCurrentFirmwareSimulator()
else
return NULL;
}
unsigned int getNumSubtypes(MultiModuleRFProtocols type) {
switch (type) {
case MM_RF_PROTO_HISKY:
case MM_RF_PROTO_DSM2:
case MM_RF_PROTO_SYMAX:
case MM_RF_PROTO_KN:
return 2;
case MM_RF_PROTO_CG023:
case MM_RF_PROTO_MT99XX:
return 3;
case MM_RF_PROTO_FRSKY:
case MM_RF_PROTO_FLYSKY:
return 4;
case MM_RF_PROTO_MJXQ:
case MM_RF_PROTO_YD717:
return 5;
case MM_RF_PROTO_CX10:
return 8;
default:
return 1;
}
}
void FlightModeData::clear(const int phase)
{
memset(this, 0, sizeof(FlightModeData));
if (phase != 0) {
for (int idx=0; idx<C9X_MAX_GVARS; idx++) {
gvars[idx] = 1025;
}
for (int idx=0; idx<C9X_MAX_ENCODERS; idx++) {
rotaryEncoders[idx] = 1025;
}
}
}
+27 -77
View File
@@ -26,7 +26,6 @@
#include <iostream>
#include <bitset>
#include "constants.h"
#include "../../radio/src/definitions.h"
#include "simulatorinterface.h"
#define EESIZE_STOCK 2048
@@ -37,15 +36,6 @@
#define EESIZE_9XRPRO (128*4096)
#define EESIZE_MAX EESIZE_9XRPRO
#define FSIZE_STOCK (64*1024)
#define FSIZE_M128 (128*1024)
#define FSIZE_GRUVIN9X (256*1024)
#define FSIZE_TARANIS (512*1024)
#define FSIZE_SKY9X (256*1024)
#define FSIZE_9XRPRO (512*1024)
#define FSIZE_HORUS (2048*1024)
#define FSIZE_MAX FSIZE_HORUS
QString getBoardName(BoardEnum board);
#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128)
@@ -145,11 +135,7 @@ enum FailsafeModes {
#define TRIM_RV_UP 5
#define TRIM_RH_L 6
#define TRIM_RH_R 7
#define TRIM_T5_DN 8
#define TRIM_T5_UP 9
#define TRIM_T6_DN 10
#define TRIM_T6_UP 11
#define TRIM_NONE 12
#define TRIM_NONE 8
// Beep center bits
#define BC_BIT_RUD (0x01)
@@ -163,6 +149,23 @@ enum FailsafeModes {
#define BC_BIT_REA (0x80)
#define BC_BIT_REB (0x100)
// TODO remove this enum!
enum EnumKeys {
KEY_MENU,
KEY_EXIT,
#if defined(PCBTARANIS)
KEY_ENTER,
KEY_PAGE,
KEY_PLUS,
KEY_MINUS,
#else
KEY_DOWN,
KEY_UP,
KEY_RIGHT,
KEY_LEFT,
#endif
};
#define CHAR_FOR_NAMES " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-."
#define CHAR_FOR_NAMES_REGEX "[ A-Za-z0-9_.-,]*"
@@ -632,7 +635,7 @@ class CustomFunctionData { // Function Switches data
class FlightModeData {
public:
FlightModeData() { clear(0); }
FlightModeData() { clear(); }
int trimMode[NUM_STICKS];
int trimRef[NUM_STICKS];
int trim[NUM_STICKS];
@@ -640,9 +643,9 @@ class FlightModeData {
char name[10+1];
unsigned int fadeIn;
unsigned int fadeOut;
int rotaryEncoders[C9X_MAX_ENCODERS];
int rotaryEncoders[2];
int gvars[C9X_MAX_GVARS];
void clear(const int phase);
void clear() { memset(this, 0, sizeof(FlightModeData)); }
};
class SwashRingData { // Swash Ring data
@@ -842,42 +845,9 @@ enum PulsesProtocol {
PULSES_PXX_XJT_LR12,
PULSES_PXX_DJT,
PULSES_CROSSFIRE,
PULSES_MULTIMODULE,
PULSES_PROTOCOL_LAST
};
enum MultiModuleRFProtocols {
MM_RF_PROTO_FLYSKY=0,
MM_RF_PROTO_FIRST=MM_RF_PROTO_FLYSKY,
MM_RF_PROTO_HUBSAN,
MM_RF_PROTO_FRSKY,
MM_RF_PROTO_HISKY,
MM_RF_PROTO_V2X2,
MM_RF_PROTO_DSM2,
MM_RF_PROTO_DEVO,
MM_RF_PROTO_YD717,
MM_RF_PROTO_KN,
MM_RF_PROTO_SYMAX,
MM_RF_PROTO_SLT,
MM_RF_PROTO_CX10,
MM_RF_PROTO_CG023,
MM_RF_PROTO_BAYANG,
MM_RF_PROTO_ESky,
MM_RF_PROTO_MT99XX,
MM_RF_PROTO_MJXQ,
MM_RF_PROTO_SHENQI,
MM_RF_PROTO_FY326,
MM_RF_PROTO_SFHSS,
MM_RF_PROTO_J6PRO,
MM_RF_PROTO_FQ777,
MM_RF_PROTO_ASSAN,
MM_RF_PROTO_HONTAI,
MM_RF_PROTO_OLRS,
MM_RF_PROTO_LAST= MM_RF_PROTO_OLRS
};
unsigned int getNumSubtypes(MultiModuleRFProtocols type);
enum TrainerProtocol {
TRAINER_MASTER_JACK,
TRAINER_SLAVE_JACK,
@@ -891,33 +861,17 @@ class ModuleData {
ModuleData() { clear(); }
unsigned int modelId;
int protocol;
unsigned int subType;
bool invertedSerial;
int subprotocol;
unsigned int channelsStart;
int channelsCount; // 0=8 channels
unsigned int failsafeMode;
int failsafeChannels[C9X_NUM_CHNOUT];
struct {
int delay;
bool pulsePol; // false = positive
bool outputType; // false = open drain, true = push pull
int frameLength;
} ppm;
struct {
unsigned int rfProtocol;
bool autoBindMode;
bool lowPowerMode;
bool customProto;
int optionValue;
} multi;
int ppmDelay;
bool ppmPulsePol; // false = positive
bool ppmOutputType; // false = open drain, true = push pull
int ppmFrameLength;
void clear() { memset(this, 0, sizeof(ModuleData)); }
QString polarityToString() const { return ppm.pulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
QString polarityToString() const { return ppmPulsePol ? QObject::tr("Positive") : QObject::tr("Negative"); } // TODO ModelPrinter
};
#define C9X_MAX_SCRIPTS 7
@@ -1673,13 +1627,9 @@ class Firmware {
virtual int getCapability(const Capability) = 0;
virtual QTime getMaxTimerStart() = 0;
virtual bool isTelemetrySourceAvailable(int source) = 0;
virtual int isAvailable(PulsesProtocol proto, int port=0) = 0;
const int getFlashSize();
public:
QList<const char *> languages;
+1 -1
View File
@@ -125,7 +125,7 @@ bool RleFile::searchFat()
uint32_t bestFatIndex = 0;
for (int i=0; i<EEPROM_ZONE_SIZE/EEPROM_FAT_SIZE; i++) {
EepromHeader * header = (EepromHeader *)(eeprom+i*EEPROM_FAT_SIZE);
if (header->mark == EEPROM_MARK && header->index >= bestFatIndex) {
if (header->mark == EEPROM_MARK && (int)header->index >= bestFatIndex) {
eepromFatHeader = header;
bestFatIndex = header->index;
}
+9 -17
View File
@@ -44,7 +44,7 @@ int getFileType(const QString &fullFileName)
}
FirmwareInterface::FirmwareInterface(const QString &filename):
flash(FSIZE_MAX, 0),
flash(MAX_FSIZE, 0),
flashSize(0),
versionId(0),
eepromVersion(0),
@@ -59,11 +59,11 @@ FirmwareInterface::FirmwareInterface(const QString &filename):
QFile file(filename);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { // reading HEX TEXT file
QTextStream inputStream(&file);
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), FSIZE_MAX);
flashSize = HexInterface(inputStream).load((uint8_t *)flash.data(), MAX_FSIZE);
file.close();
if (flashSize == 0) {
file.open(QIODevice::ReadOnly);
flashSize = file.read((char *)flash.data(), FSIZE_MAX);
flashSize = file.read((char *)flash.data(), MAX_FSIZE);
}
}
}
@@ -130,12 +130,10 @@ QString FirmwareInterface::seekLabel(const QString & label)
QString FirmwareInterface::getFlavour() const
{
if (flavour == "opentx-taranis-x9e")
return "opentx-x9e";
else if (flavour == "opentx-x9dp" || flavour == "opentx-taranis-plus")
return "opentx-x9d+";
else if (flavour == "opentx-taranis")
return "opentx-x9d";
if (flavour == "opentx-x9dp")
return "opentx-taranis-plus";
else if (flavour == "opentx-x9d")
return "opentx-taranis";
else
return flavour;
}
@@ -342,18 +340,14 @@ bool FirmwareInterface::isValid()
unsigned int FirmwareInterface::save(QString fileName)
{
uint8_t *binflash = (uint8_t*)malloc(FSIZE_MAX);
if (binflash == NULL) {
return -1;
}
memcpy(binflash, flash.constData(), flashSize);
uint8_t binflash[MAX_FSIZE];
memcpy(&binflash, flash.constData(), flashSize);
QFile file(fileName);
int fileType = getFileType(fileName);
if (fileType == FILE_TYPE_HEX) {
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text)) { //reading HEX TEXT file
free(binflash);
return -1;
}
QTextStream outputStream(&file);
@@ -362,7 +356,6 @@ unsigned int FirmwareInterface::save(QString fileName)
}
else {
if (!file.open(QIODevice::ReadWrite | QIODevice::Truncate)) { //reading HEX TEXT file
free(binflash);
return -1;
}
file.write((char*)binflash, flashSize);
@@ -370,6 +363,5 @@ unsigned int FirmwareInterface::save(QString fileName)
file.close();
free(binflash);
return flashSize;
}
+1
View File
@@ -19,6 +19,7 @@
#include <QImage>
#include <QByteArray>
#define MAX_FSIZE (512*1024)
#define SPLASH_WIDTH (128)
#define SPLASH_HEIGHT (64)
#define SPLASHX9D_WIDTH (212)
+3 -3
View File
@@ -373,17 +373,17 @@ t_Er9xModelData::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -19,14 +19,13 @@
#define SIMU
#define SIMU_EXCEPTIONS
#define TELEMETRY_FRSKY
#define FRSKY
#define PHASES
#undef min
#undef max
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define SWSRC_SW1 DSW_SW1
#define NUM_POTS 3
#define SWSRC_SW1 DSW_SW1
#include <exception>
@@ -48,7 +47,7 @@ namespace Er9x {
uint8_t pxxFlag = 0;
int16_t g_anas[7];
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
uint16_t anaIn(uint8_t chan)
{
@@ -152,7 +151,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
}
@@ -505,17 +505,17 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -620,17 +620,17 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.moduleData[0].protocol = PULSES_PPM;
break;
}
c9x.moduleData[0].ppm.frameLength=ppmFrameLength;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncInstantTrim;
if (trimSw) {
c9x.customFn[0].swtch = er9xToSwitch(trimSw);
}
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.swashRingData.elevatorWeight = swashInvertELE ? -100 : 100;
c9x.swashRingData.aileronWeight = swashInvertAIL ? -100 : 100;
@@ -22,7 +22,7 @@
#define PCBSKY9X
#define PCBSKY
#define STAMP
#define TELEMETRY_FRSKY
#define FRSKY
#define FRSKY_HUB
#define WS_HOW_HIGH
#define TEMPLATES
@@ -31,9 +31,8 @@
#define AUDIO
#define REVB
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define SWSRC_SW1 DSW_SW1
#define NUM_POTS 3
#define SWSRC_SW1 DSW_SW1
#undef min
#undef max
@@ -59,7 +58,7 @@ namespace Ersky9x {
#include "../ersky9x/sound.cpp"
#include "../ersky9x/diskio.cpp"
#define isBacklightEnabled() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
#define isBacklightEnable() (PWM->PWM_CH_NUM[0].PWM_CDTY != 100)
//uint8_t pxxFlag = 0;
int16_t g_anas[7];
@@ -447,9 +447,9 @@ t_Gruvin9xModelData_v102::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -517,9 +517,9 @@ t_Gruvin9xModelData_v103::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
c9x.flightModeData[i] = flightModeData[i];
@@ -587,9 +587,9 @@ t_Gruvin9xModelData_v105::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -677,9 +677,9 @@ t_Gruvin9xModelData_v106::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc-2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
@@ -455,9 +455,9 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -499,7 +499,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -533,9 +533,9 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -578,7 +578,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -615,9 +615,9 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -661,7 +661,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -698,9 +698,9 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -744,7 +744,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -785,9 +785,9 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -831,7 +831,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -735,9 +735,9 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -780,7 +780,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
c9x.frsky.varioSource = varioSource;
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -818,9 +818,9 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -864,7 +864,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -902,9 +902,9 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -948,7 +948,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -986,9 +986,9 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1032,7 +1032,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
for (int i=0; i<16; i++) {
@@ -1073,9 +1073,9 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<9; i++) {
@@ -1119,7 +1119,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -932,9 +932,9 @@ t_Open9xModelData_v201::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1006,9 +1006,9 @@ t_Open9xModelData_v202::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter,
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1052,7 +1052,7 @@ t_Open9xModelData_v202::operator ModelData ()
// c9x.safetySw[i] = safetySw[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1082,9 +1082,9 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1126,7 +1126,7 @@ t_Open9xModelData_v203::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1156,9 +1156,9 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1202,7 +1202,7 @@ t_Open9xModelData_v204::operator ModelData ()
c9x.frsky = frsky;
c9x.frsky.rssiAlarms[0] = frskyRssiAlarms[0].get(0);
c9x.frsky.rssiAlarms[1] = frskyRssiAlarms[1].get(1);
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
return c9x;
@@ -1235,9 +1235,9 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH);
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1279,7 +1279,7 @@ t_Open9xModelData_v205::operator ModelData ()
c9x.customFn[i] = customFn[i];
c9x.swashRingData = swashR;
c9x.frsky = frsky;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0]. modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1314,9 +1314,9 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1362,7 +1362,7 @@ t_Open9xModelData_v208::operator ModelData ()
c9x.frsky.varioCenterMax = varioSpeedUpMin;
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1400,9 +1400,9 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1449,7 +1449,7 @@ t_Open9xModelData_v209::operator ModelData ()
c9x.frsky.varioCenterMin = varioSpeedDownMin;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
c9x.frsky.screens[1].type = 0;
@@ -1487,9 +1487,9 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1536,7 +1536,7 @@ t_Open9xModelData_v210::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
@@ -1575,9 +1575,9 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.thrTrim = thrTrim;
c9x.disableThrottleWarning=disableThrottleWarning;
c9x.trimInc = trimInc - 2;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.beepANACenter = beepANACenter;
c9x.moduleData[0].ppm.pulsePol = pulsePol;
c9x.moduleData[0].ppmPulsePol = pulsePol;
c9x.extendedLimits = extendedLimits;
c9x.extendedTrims = extendedTrims;
for (int i=0; i<5; i++) {
@@ -1624,7 +1624,7 @@ t_Open9xModelData_v211::operator ModelData ()
c9x.frsky = frsky;
c9x.switchWarningStates = switchWarningStates;
c9x.moduleData[0].ppm.frameLength = ppmFrameLength;
c9x.moduleData[0].ppmFrameLength = ppmFrameLength;
c9x.thrTraceSrc = thrTraceSrc;
c9x.moduleData[0].modelId = modelId;
+28 -50
View File
@@ -26,7 +26,7 @@
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16))
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : 8)
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
#define MAX_TELEMETRY_SENSORS(board, version) (32)
#define MAX_SENSORS(board, version) (32)
#define NUM_PPM_INPUTS(board, version) ((IS_ARM(board) && version >= 216) ? 16 : 8)
#define ROTENC_COUNT(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 218) ? 0 : 1) : (IS_2560(board) ? 2 : 0))
@@ -742,14 +742,6 @@ class CurveReferenceField: public TransformedField {
int _curve_value;
};
static int exportHeliInversionWeight(int source) {
return (source < 0) ? 1 : 0;
}
static int importHeliInversionWeight(int source) {
return source ? -100: 100;
}
class HeliField: public StructField {
public:
HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant)
@@ -765,15 +757,22 @@ class HeliField: public StructField {
Append(new SignedField<8>(heli.elevatorWeight));
}
else {
Append(new ConversionField< SignedField<1> >(heli.elevatorWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new ConversionField< SignedField<1> >(heli.aileronWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new ConversionField< SignedField<1> >(heli.collectiveWeight, exportHeliInversionWeight, importHeliInversionWeight));
Append(new BoolField<1>(invertELE));
Append(new BoolField<1>(invertAIL));
Append(new BoolField<1>(invertCOL));
Append(new UnsignedField<5>(heli.type));
Append(new SourceField<8>(heli.collectiveSource, board, version, variant));
//, FLAG_NOSWITCHES)); Fix shift in collective
Append(new UnsignedField<8>(heli.value));
}
}
// TODO before + after
protected:
bool invertELE;
bool invertAIL;
bool invertCOL;
};
class FlightModeField: public TransformedField {
@@ -3056,14 +3055,14 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
internalField.Append(new BoolField<1>(modelData.displayChecklist));
else
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.extendedLimits));
internalField.Append(new BoolField<1>(modelData.extendedTrims));
internalField.Append(new BoolField<1>(modelData.throttleReversed));
if (!IS_ARM(board) || version < 216) {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay));
}
if (IS_ARM(board) || IS_2560(board))
@@ -3092,7 +3091,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (!IS_ARM(board) || version < 216) {
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppm.frameLength));
internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength));
}
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc, "Throttle Source"));
@@ -3171,33 +3170,31 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
if (IS_ARM(board) && version >= 215) {
for (int module=0; module<modulesCount; module++) {
if (version >= 217) {
internalField.Append(new ConversionField<SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[module].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this radio protocol")));
internalField.Append(new SignedField<4>(subprotocols[module]));
}
else {
internalField.Append(new SignedField<8>(subprotocols[module]));
}
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].channelsStart));
internalField.Append(new ConversionField<SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217) {
internalField.Append(new UnsignedField<4>(modelData.moduleData[module].failsafeMode));
internalField.Append(new UnsignedField<3>(modelData.moduleData[module].subType));
internalField.Append(new BoolField<1>(modelData.moduleData[module].invertedSerial));
} else
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].channelsCount, -8));
if (version >= 217)
internalField.Append(new UnsignedField<8>(modelData.moduleData[module].failsafeMode));
else
internalField.Append(new ConversionField< UnsignedField<8> >(modelData.moduleData[module].failsafeMode, -1));
for (int i=0; i<32; i++) {
internalField.Append(new SignedField<16>(modelData.moduleData[module].failsafeChannels[i]));
}
if (version >= 217) {
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.pulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppm.outputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
internalField.Append(new ConversionField< SignedField<6> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmPulsePol));
internalField.Append(new BoolField<1>(modelData.moduleData[module].ppmOutputType));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
}
else {
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppm.delay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppm.frameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppm.pulsePol));
internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[module].ppmDelay, exportPpmDelay, importPpmDelay));
internalField.Append(new SignedField<8>(modelData.moduleData[module].ppmFrameLength));
internalField.Append(new BoolField<8>(modelData.moduleData[module].ppmPulsePol));
}
}
}
@@ -3271,7 +3268,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (IS_ARM(board) && version >= 217) {
for (int i=0; i<MAX_TELEMETRY_SENSORS(board, version); ++i) {
for (int i=0; i<MAX_SENSORS(board, version); ++i) {
internalField.Append(new SensorField(modelData.sensorData[i], board, version));
}
}
@@ -3290,17 +3287,7 @@ void OpenTxModelData::beforeExport()
subprotocols[module] = modelData.moduleData[module].protocol - PULSES_PXX_XJT_X16;
else if (modelData.moduleData[module].protocol >= PULSES_LP45 && modelData.moduleData[module].protocol <= PULSES_DSMX)
subprotocols[module] = modelData.moduleData[module].protocol - PULSES_LP45;
else if (modelData.moduleData[module].protocol == PULSES_MULTIMODULE) {
// copy multi settings to ppm settings to get them written to the eeprom
// (reverse the int => ms logic of the ppm delay) since only ppm is written
subprotocols[module] = modelData.moduleData[module].multi.rfProtocol & (0x1f);
int multiByte = ((modelData.moduleData[module].multi.rfProtocol >> 4) & 0x03) | (modelData.moduleData[module].multi.customProto << 7);
modelData.moduleData[module].ppm.delay = 300 + 50 * multiByte;
modelData.moduleData[module].ppm.frameLength = modelData.moduleData[module].multi.optionValue;
modelData.moduleData[module].ppm.outputType = modelData.moduleData[module].multi.lowPowerMode;
modelData.moduleData[module].ppm.pulsePol = modelData.moduleData[module].multi.autoBindMode;
} else
else
subprotocols[module] = (module==0 ? -1 : 0);
}
}
@@ -3334,15 +3321,6 @@ void OpenTxModelData::afterImport()
modelData.moduleData[module].protocol += subprotocols[module];
else
modelData.moduleData[module].protocol = PULSES_OFF;
} else if (modelData.moduleData[module].protocol == PULSES_MULTIMODULE) {
// Copy data from ppm struct to multi struct
unsigned int multiByte = (unsigned int)((modelData.moduleData[module].ppm.delay - 300) / 50);
modelData.moduleData[module].multi.rfProtocol = subprotocols[module] | ((multiByte & 0x3) << 4);
modelData.moduleData[module].multi.customProto = (multiByte & 0x80) == 0x80;
modelData.moduleData[module].multi.optionValue = modelData.moduleData[module].ppm.frameLength;
modelData.moduleData[module].multi.lowPowerMode = modelData.moduleData[module].ppm.outputType;
modelData.moduleData[module].multi.autoBindMode = modelData.moduleData[module].ppm.pulsePol;
}
}
@@ -83,7 +83,6 @@ class ProtocolsConversionTable: public ConversionTable
}
if (IS_TARANIS(board)) {
addConversion(PULSES_CROSSFIRE, val++);
addConversion(PULSES_MULTIMODULE, val++);
}
}
};
+136 -160
View File
@@ -597,7 +597,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case OffsetWeight:
return (IS_ARM(board) ? 500 : 245);
case Timers:
return (IS_ARM(board) ? 3 : 2);
return ((IS_ARM(board) && id.contains("timer3")) ? 3 : 2);
case TimersName:
return (IS_TARANIS(board) ? 8 : (IS_ARM(board) ? 3 : 0));
case PermTimers:
@@ -813,16 +813,6 @@ int OpenTxFirmware::getCapability(const Capability capability)
}
}
QTime OpenTxFirmware::getMaxTimerStart()
{
if (IS_TARANIS(board) || IS_HORUS(board))
return QTime(23, 59, 59);
else if (IS_ARM(board))
return QTime(8, 59, 59);
else
return QTime(0, 59, 59);
}
bool OpenTxFirmware::isTelemetrySourceAvailable(int source)
{
if (IS_TARANIS(board) && (source == TELEMETRY_SOURCE_RSSI_TX))
@@ -865,8 +855,6 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
case PULSES_DSMX:
case PULSES_CROSSFIRE:
return 1;
case PULSES_MULTIMODULE:
return id.contains("multimodule") ? 1 : 0;
default:
return 0;
}
@@ -1109,12 +1097,10 @@ QString OpenTxFirmware::getFirmwareBaseUrl()
QString OpenTxFirmware::getFirmwareUrl()
{
QString url = getFirmwareBaseUrl();
QByteArray data = QUrl::toPercentEncoding(id);
if (IS_ARM(board))
url.append(QString("/getfw.php?fw=%1.bin").arg((QString)data));
url.append(QString("/getfw.php?fw=%1.bin").arg(id));
else
url.append(QString("/getfw.php?fw=%1.hex").arg((QString)data));
url.append(QString("/getfw.php?fw=%1.hex").arg(id));
return url;
}
@@ -1135,6 +1121,7 @@ QString OpenTxFirmware::getStampUrl()
void addOpenTxCommonOptions(OpenTxFirmware * firmware)
{
firmware->addOption("ppmus", QObject::tr("Channel values displayed in us"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
firmware->addOption("nooverridech", QObject::tr("No OverrideCH functions available"));
Option fai_options[] = { { "faichoice", QObject::tr("Possibility to enable FAI MODE (no telemetry) at field") }, { "faimode", QObject::tr("FAI MODE (no telemetry) always enabled") }, { NULL } };
firmware->addOptions(fai_options);
@@ -1142,16 +1129,15 @@ void addOpenTxCommonOptions(OpenTxFirmware * firmware)
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
{
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options);
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
firmware->addOption("eu", QObject::tr("Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015"));
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
}
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
@@ -1161,7 +1147,6 @@ void addOpenTxLcdOptions(OpenTxFirmware * firmware)
{ "ST7565R", QObject::tr("ST7565R LCD or compatible") },
{ "ERC12864FSF", QObject::tr("ERC12864FSF LCD") },
{ "ST7920", QObject::tr("ST7920 LCD") },
{ "KS108", QObject::tr("KS108 LCD") },
{ NULL }
};
firmware->addOptions(lcd_options);
@@ -1176,123 +1161,8 @@ void registerOpenTxFirmwares()
Option nav_options[] = { { "rotenc", QObject::tr("Rotary Encoder use in menus navigation") }, { "potscroll", QObject::tr("Pots use in menus navigation") }, { NULL } };
Option dsm2_options[] = { { "DSM2", QObject::tr("Support for DSM2 modules"), 0 }, { "DSM2PPM", QObject::tr("Support for DSM2 modules using ppm instead of true serial"), 0 }, { NULL } };
/* Taranis Plus board */
firmware = new OpenTxFirmware("opentx-x9d+", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis board */
firmware = new OpenTxFirmware("opentx-x9d", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis X9E board */
firmware = new OpenTxFirmware("opentx-x9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Horus board */
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
Option usb_options[] = { { "massstorage", QObject::tr("Instead of Joystick emulation, USB connection is Mass Storage (as in the Bootloader)") }, { "cli", QObject::tr("Instead of Joystick emulation, USB connection is Command Line Interface") }, { NULL } };
firmware->addOptions(usb_options);
firmware->addOption("multimodule", QObject::tr("Support for the DIY-Multiprotocol-TX-Module"));
addOpenTxCommonOptions(firmware);
firmware->addOption("pcbdev", QObject::tr("Use ONLY with first DEV pcb version"));
firmwares.push_back(firmware);
/* 9XR-Pro */
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("Turnigy 9XR-PRO"), BOARD_9XRPRO);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board with M128 chip */
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("Turnigy 9XR with m128 chip"), BOARD_M128);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR board */
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("Turnigy 9XR"), BOARD_STOCK);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
firmware->addOption("novario", QObject::tr("No vario support"));
firmware->addOption("nogps", QObject::tr("No GPS support"));
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9x board */
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X with stock board"), BOARD_STOCK);
firmware = new OpenTxFirmware("opentx-9x", QObject::tr("9X board"), BOARD_STOCK);
firmware->addOptions(ext_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
@@ -1324,12 +1194,11 @@ void registerOpenTxFirmwares()
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9x board with M128 chip */
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("9X with stock board and m128 chip"), BOARD_M128);
firmware = new OpenTxFirmware("opentx-9x128", QObject::tr("M128 / 9X board"), BOARD_M128);
firmware->addOptions(ext_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
@@ -1355,56 +1224,72 @@ void registerOpenTxFirmwares()
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* ar9x board */
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("9X with AR9X board"), BOARD_AR9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
/* 9XR board */
firmware = new OpenTxFirmware("opentx-9xr", QObject::tr("9XR"), BOARD_STOCK);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("nowshh", QObject::tr("No Winged Shadow How High support"));
firmware->addOption("novario", QObject::tr("No vario support"));
firmware->addOption("nogps", QObject::tr("No GPS support"));
firmware->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
firmware->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Sky9x board */
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("9X with Sky9x board"), BOARD_SKY9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
/* 9XR board with M128 chip */
firmware = new OpenTxFirmware("opentx-9xr128", QObject::tr("9XR with M128 chip"), BOARD_M128);
firmware->addOptions(extr_options);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nosplash", QObject::tr("No splash screen"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
// NOT TESTED firmware->addOption("PXX", QObject::tr("Support of FrSky PXX protocol"));
firmware->addOption("DSM2", QObject::tr("Support for DSM2 modules"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
firmware->addOption("thrtrace", QObject::tr("Enable the throttle trace in Statistics"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Gruvin9x board */
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("9X with Gruvin9x board"), BOARD_GRUVIN9X);
firmware = new OpenTxFirmware("opentx-gruvin9x", QObject::tr("Gruvin9x board / 9X"), BOARD_GRUVIN9X);
firmware->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
@@ -1425,12 +1310,11 @@ void registerOpenTxFirmwares()
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* MEGA2560 board */
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("DIY MEGA2560 radio"), BOARD_MEGA2560);
firmware = new OpenTxFirmware("opentx-mega2560", QObject::tr("MEGA2560 board"), BOARD_MEGA2560);
addOpenTxLcdOptions(firmware);
firmware->addOption("PWR", QObject::tr("Power management by soft-off circuitry"));
firmware->addOptions(ext_options);
@@ -1442,7 +1326,7 @@ void registerOpenTxFirmwares()
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("sdcard", QObject::tr("Support for SD memory card"));
firmware->addOption("audio", QObject::tr("Support for radio modified with regular speaker"));
firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
//firmware->addOption("voice", QObject::tr("Used if you have modified your radio with voice mode"));
firmware->addOption("haptic", QObject::tr("Used if you have modified your radio with haptic mode"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
@@ -1456,11 +1340,103 @@ void registerOpenTxFirmwares()
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("pgbar", QObject::tr("EEprom write Progress bar"));
firmware->addOption("imperial", QObject::tr("Imperial units"));
firmware->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
default_firmware_variant = GetFirmware("opentx-x9d+");
/* Sky9x board */
firmware = new OpenTxFirmware("opentx-sky9x", QObject::tr("Sky9x board / 9X"), BOARD_SKY9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* ar9x board */
firmware = new OpenTxFirmware("opentx-ar9x", QObject::tr("ar9x board / 9X"), BOARD_AR9X);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
// firmware->addOption("rtc", QObject::tr("Optional RTC added"));
// firmware->addOption("volume", QObject::tr("i2c volume control added"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* 9XR-Pro */
firmware = new OpenTxFirmware("opentx-9xrpro", QObject::tr("9XR-PRO"), BOARD_9XRPRO);
firmware->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
firmware->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
firmware->addOption("nofp", QObject::tr("No flight modes"));
firmware->addOption("nocurves", QObject::tr("Disable curves menus"));
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
firmware->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
firmware->addOption("battgraph", QObject::tr("Battery graph"));
firmware->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
firmware->addOption("bluetooth", QObject::tr("Bluetooth interface"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis board */
firmware = new OpenTxFirmware("opentx-taranis", QObject::tr("FrSky Taranis"), BOARD_TARANIS);
firmware->addOption("haptic", QObject::tr("Haptic module installed"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis Plus board */
firmware = new OpenTxFirmware("opentx-taranisplus", QObject::tr("FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Taranis X9E board */
firmware = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("FrSky Taranis X9E"), BOARD_TARANIS_X9E);
firmware->addOption("shutdownconfirm", QObject::tr("Confirmation before radio shutdown"));
firmware->addOption("horussticks", QObject::tr("Horus magnetic sticks"));
addOpenTxTaranisOptions(firmware);
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
/* Horus board */
firmware = new OpenTxFirmware("opentx-horus", QObject::tr("FrSky Horus"), BOARD_HORUS);
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
addOpenTxCommonOptions(firmware);
firmwares.push_back(firmware);
default_firmware_variant = GetFirmware("opentx-taranisplus-en");
current_firmware_variant = default_firmware_variant;
}
@@ -118,8 +118,6 @@ class OpenTxFirmware: public Firmware {
virtual QString getFirmwareUrl();
virtual int getCapability(const Capability);
virtual QTime getMaxTimerStart();
virtual bool isTelemetrySourceAvailable(int source);
@@ -24,10 +24,9 @@
#undef min
#undef max
#define NUM_POTS 3
#define NUM_SLIDERS 0
#define NUM_CSW 12
#define SWSRC_SW1 10
#define NUM_POTS 3
#define NUM_CSW 12
#define SWSRC_SW1 10
#include <exception>
#include <algorithm>
@@ -157,7 +156,7 @@ void simuSetKey(uint8_t key, bool state)
}
}
#define isBacklightEnabled() (PORTB & (1<<OUT_B_LIGHT))
#define isBacklightEnable() (PORTB & (1<<OUT_B_LIGHT))
}
+1 -1
View File
@@ -273,7 +273,7 @@ t_Th9xModelData::operator ModelData ()
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
c9x.trimInc = trimInc;
c9x.moduleData[0].ppm.delay = 300 + 50 * ppmDelay;
c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay;
c9x.customFn[0].func = FuncTrims2Offsets;
if (trimSw) {
c9x.customFn[0].swtch = trimSw;
+2 -3
View File
@@ -37,7 +37,7 @@ fwName(g.profile[g.id()].fwName())
ui->useProfileSplash->setDisabled(true);
}
if (IS_STM32(GetEepromInterface()->getBoard())) {
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
// No backup on Taranis ... could be done if in massstorage
ui->backupEEprom->hide();
ui->backupEEprom->setCheckState(Qt::Unchecked);
@@ -124,7 +124,7 @@ void FlashFirmwareDialog::on_firmwareLoad_clicked()
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
if (!fileName.isEmpty()) {
fwName = fileName;
if (!fwName.isEmpty() && !fwName.endsWith(".dfu") && !FirmwareInterface(fwName).isValid()) {
if (!fwName.isEmpty() && !FirmwareInterface(fwName).isValid()) {
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fwName));
}
updateUI();
@@ -203,7 +203,6 @@ void FlashFirmwareDialog::on_useLibrarySplash_clicked()
void FlashFirmwareDialog::on_burnButton_clicked()
{
g.flashDir(QFileInfo(fwName).dir().absolutePath());
g.profile[g.id()].fwName(fwName);
g.checkHardwareCompatibility(ui->checkHardwareCompatibility->isChecked());
g.backupOnFlash(ui->backupEEprom->isChecked());
+1 -2
View File
@@ -8,10 +8,9 @@
#define HEX_FILES_FILTER "HEX files (*.hex);;"
#define BIN_FILES_FILTER "BIN files (*.bin);;"
#define DFU_FILES_FILTER "DFU files (*.dfu);;"
#define EEPE_FILES_FILTER "EEPE EEPROM files (*.eepe);;"
#define EEPROM_FILES_FILTER "EEPE files (*.eepe *.bin *.hex);;" EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex *.dfu);;" BIN_FILES_FILTER HEX_FILES_FILTER DFU_FILES_FILTER
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
#define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
+37 -23
View File
@@ -108,18 +108,22 @@ void GeneralEdit::on_calretrieve_PB_clicked()
for (int i=0; i<(NUM_STICKS+potsnum); i++) {
Byte=calib.mid(i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok) generalSettings.calibMid[i]=byte16;
if (ok)
generalSettings.calibMid[i]=byte16;
Byte=calib.mid(4+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok) generalSettings.calibSpanNeg[i]=byte16;
if (ok)
generalSettings.calibSpanNeg[i]=byte16;
Byte=calib.mid(8+i*12,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok) generalSettings.calibSpanPos[i]=byte16;
if (ok)
generalSettings.calibSpanPos[i]=byte16;
}
for (int i=0; i<4; i++) {
Byte=trainercalib.mid(i*4,4);
byte16=(int16_t)Byte.toInt(&ok,16);
if (ok) generalSettings.trainer.calib[i]=byte16;
if (ok)
generalSettings.trainer.calib[i]=byte16;
}
generalSettings.txCurrentCalibration=txCurrentCalibration;
generalSettings.txVoltageCalibration=txVoltageCalibration;
@@ -146,30 +150,27 @@ void GeneralEdit::on_calretrieve_PB_clicked()
Byte=hwtypes.mid(i,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS),3).toLatin1();
if (ok) {
if (ok)
generalSettings.switchConfig[i]=byte16;
strcpy(generalSettings.switchName[i], qba.data());
}
}
offset = GetCurrentFirmware()->getCapability(Switches);
for (int i=0; i<(GetCurrentFirmware()->getCapability(Pots)); i++) {
Byte=hwtypes.mid(i+offset,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
if (ok) {
if (ok)
generalSettings.potConfig[i]=byte16;
strcpy(generalSettings.potName[i], qba.data());
}
}
offset += GetCurrentFirmware()->getCapability(Pots);
for (int i=0; i<(GetCurrentFirmware()->getCapability(Sliders)); i++) {
Byte=hwtypes.mid(i+offset,1);
byte16=(int16_t)Byte.toInt(&ok,16);
qba=controlNames.mid(3*(i+NUM_STICKS+offset),3).toLatin1();
if (ok) {
if (ok)
generalSettings.sliderConfig[i]=byte16;
strcpy(generalSettings.sliderName[i], qba.data());
}
}
} else {
QMessageBox::critical(this, tr("Warning"), tr("Wrong data in profile, Switch/pot config not retrieved"));
@@ -181,32 +182,45 @@ void GeneralEdit::on_calretrieve_PB_clicked()
QString chars;
bool ok;
byte8=(int8_t)DisplaySet.mid(0,2).toInt(&ok,16);
if (ok) generalSettings.optrexDisplay=(byte8==1 ? true : false);
if (ok)
generalSettings.optrexDisplay=(byte8==1 ? true : false);
byte8u=(uint8_t)DisplaySet.mid(2,2).toUInt(&ok,16);
if (ok) generalSettings.contrast=byte8u;
if (ok)
generalSettings.contrast=byte8u;
byte8u=(uint8_t)DisplaySet.mid(4,2).toUInt(&ok,16);
if (ok) generalSettings.backlightBright=byte8u;
if (ok)
generalSettings.backlightBright=byte8u;
byte8=(int8_t)BeeperSet.mid(0,2).toUInt(&ok,16);
if (ok) generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
if (ok)
generalSettings.beeperMode = (GeneralSettings::BeeperMode)byte8;
byte8=(int8_t)BeeperSet.mid(2,2).toInt(&ok,16);
if (ok) generalSettings.beeperLength=byte8;
if (ok)
generalSettings.beeperLength=byte8;
byte8=(int8_t)HapticSet.mid(0,2).toUInt(&ok,16);
if (ok) generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
if (ok)
generalSettings.hapticMode=(GeneralSettings::BeeperMode)byte8;
byte8=(int8_t)HapticSet.mid(2,2).toInt(&ok,16);
if (ok) generalSettings.hapticStrength=byte8;
if (ok)
generalSettings.hapticStrength=byte8;
byte8=(int8_t)HapticSet.mid(4,2).toInt(&ok,16);
if (ok) generalSettings.hapticLength=byte8;
if (ok)
generalSettings.hapticLength=byte8;
byte8u=(uint8_t)SpeakerSet.mid(0,2).toUInt(&ok,16);
if (ok) generalSettings.speakerMode=byte8u;
if (ok)
generalSettings.speakerMode=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(2,2).toUInt(&ok,16);
if (ok) generalSettings.speakerPitch=byte8u;
if (ok)
generalSettings.speakerPitch=byte8u;
byte8u=(uint8_t)SpeakerSet.mid(4,2).toUInt(&ok,16);
if (ok) generalSettings.speakerVolume=byte8u;
if (ok)
generalSettings.speakerVolume=byte8u;
if (CountrySet.length()==6) {
byte8u=(uint8_t)CountrySet.mid(0,2).toUInt(&ok,16);
if (ok) generalSettings.countryCode=byte8u;
if (ok)
generalSettings.countryCode=byte8u;
byte8u=(uint8_t)CountrySet.mid(2,2).toUInt(&ok,16);
if (ok) generalSettings.imperial=byte8u;
if (ok)
generalSettings.imperial=byte8u;
chars=CountrySet.mid(4,2);
generalSettings.ttsLanguage[0]=chars[0].toLatin1();
generalSettings.ttsLanguage[1]=chars[1].toLatin1();
+38 -55
View File
@@ -103,7 +103,7 @@ void populatePhasesCB(QComboBox *b, int value)
b->setCurrentIndex(value + GetCurrentFirmware()->getCapability(FlightModes));
}
GVarGroup::GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
GVarGroup::GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step, bool allowGvars):
QObject(),
weightGV(weightGV),
weightSB(weightSB),
@@ -115,7 +115,7 @@ GVarGroup::GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBo
lock(true)
{
if (allowGvars && GetCurrentFirmware()->getCapability(Gvars)) {
populateGVCB(*weightCB, weight, model);
populateGVCB(weightCB, weight);
connect(weightGV, SIGNAL(stateChanged(int)), this, SLOT(gvarCBChanged(int)));
connect(weightCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
}
@@ -179,14 +179,13 @@ void GVarGroup::valuesChanged()
}
}
CurveGroup::CurveGroup(QComboBox * curveTypeCB, QCheckBox * curveGVarCB, QComboBox * curveValueCB, QSpinBox * curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags):
CurveGroup::CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags):
QObject(),
curveTypeCB(curveTypeCB),
curveGVarCB(curveGVarCB),
curveValueCB(curveValueCB),
curveValueSB(curveValueSB),
curve(curve),
model(model),
flags(flags),
lock(false),
lastType(-1)
@@ -220,7 +219,7 @@ void CurveGroup::update()
curveGVarCB->setChecked(true);
if (lastType != CurveReference::CURVE_REF_DIFF && lastType != CurveReference::CURVE_REF_EXPO) {
lastType = curve.type;
populateGVCB(*curveValueCB, curve.value, model);
populateGVCB(curveValueCB, curve.value);
}
curveValueCB->show();
curveValueSB->hide();
@@ -277,7 +276,6 @@ void CurveGroup::gvarCBChanged(int state)
if (!lock) {
if (state) {
curve.value = 10000+1; // TODO constant in EEpromInterface ...
lastType = -1; // quickfix for issue #3518: force refresh of curveValueCB at next update() to set current index to GV1
}
else {
curve.value = 0; // TODO could be better
@@ -480,39 +478,33 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
b->setMaxVisibleItems(10);
}
void populateGVCB(QComboBox & b, int value, const ModelData & model)
void populateGVCB(QComboBox *b, int value)
{
bool selected = false;
b.clear();
b->clear();
int count = GetCurrentFirmware()->getCapability(Gvars);
for (int i=-count; i<=-1; i++) {
int pgvars = GetCurrentFirmware()->getCapability(Gvars);
for (int i=-pgvars; i<=-1; i++) {
int16_t gval = (int16_t)(-10000+i);
if (strlen(model.gvars_names[-i-1]) > 0)
b.addItem(QObject::tr("-GV%1 (%2)").arg(-i).arg(model.gvars_names[-i-1]), gval);
else
b.addItem(QObject::tr("-GV%1").arg(-i), gval);
b->addItem(QObject::tr("-GV%1").arg(-i), gval);
if (value == gval) {
b.setCurrentIndex(b.count()-1);
b->setCurrentIndex(b->count()-1);
selected = true;
}
}
for (int i=1; i<=count; i++) {
for (int i=1; i<=pgvars; i++) {
int16_t gval = (int16_t)(10000+i);
if (strlen(model.gvars_names[i-1]) > 0)
b.addItem(QObject::tr("GV%1 (%2)").arg(i).arg(model.gvars_names[i-1]), gval);
else
b.addItem(QObject::tr("GV%1").arg(i), gval);
b->addItem(QObject::tr("GV%1").arg(i), gval);
if (value == gval) {
b.setCurrentIndex(b.count()-1);
b->setCurrentIndex(b->count()-1);
selected = true;
}
}
if (!selected) {
b.setCurrentIndex(count);
b->setCurrentIndex(pgvars);
}
}
@@ -945,43 +937,43 @@ bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
return s1.toLower() < s2.toLower();
}
bool GpsGlitchFilter::isGlitch(GpsCoord coord)
bool GpsGlitchFilter::isGlitch(double latitude, double longitude)
{
if ((fabs(coord.latitude) < 0.1) && (fabs(coord.longitude) < 0.1)) {
if ((fabs(latitude) < 0.1) && (fabs(longitude) < 0.1)) {
return true;
}
if (lastValid) {
if (fabs(coord.latitude - lastLat) > 0.01) {
// qDebug() << "GpsGlitchFilter(): latitude glitch " << coord.latitude << lastLat;
if (fabs(latitude - lastLat) > 0.01) {
// qDebug() << "GpsGlitchFilter(): latitude glitch " << latitude << lastLat;
if ( ++glitchCount < 10) {
return true;
return true;
}
}
if (fabs(coord.longitude - lastLon) > 0.01) {
// qDebug() << "GpsGlitchFilter(): longitude glitch " << coord.longitude << lastLon;
if (fabs(longitude - lastLon) > 0.01) {
// qDebug() << "GpsGlitchFilter(): longitude glitch " << longitude << lastLon;
if ( ++glitchCount < 10) {
return true;
return true;
}
}
}
lastLat = coord.latitude;
lastLon = coord.longitude;
lastLat = latitude;
lastLon = longitude;
lastValid = true;
glitchCount = 0;
return false;
}
bool GpsLatLonFilter::isValid(GpsCoord coord)
bool GpsLatLonFilter::isValid(const QString & latitude, const QString & longitude)
{
if (lastLat == coord.latitude) {
if (lastLat == latitude) {
return false;
}
if (lastLon == coord.longitude) {
if (lastLon == longitude) {
return false;
}
lastLat = coord.latitude;
lastLon = coord.longitude;
lastLat = latitude;
lastLon = longitude;
return true;
}
@@ -997,26 +989,17 @@ double toDecimalCoordinate(const QString & value)
return result;
}
GpsCoord extractGpsCoordinates(const QString & position)
QStringList extractLatLon(const QString & position)
{
GpsCoord result;
QStringList result;
QStringList parts = position.split(' ');
if (parts.size() == 2) {
QString value = parts.at(0).trimmed();
QChar direction = value.at(value.size()-1);
if (direction == 'E' || direction == 'W') {
// OpenTX 2.1 format: "NNN.MMM[E|W] NNN.MMM[N|S]" <longitude> <latitude>
result.latitude = toDecimalCoordinate(parts.at(1).trimmed());
result.longitude = toDecimalCoordinate(parts.at(0).trimmed());
}
else {
// OpenTX 2.2 format: "DD.DDDDDD DD.DDDDDD" <latitude> <longitude> both in Signed degrees format (DDD.dddd)
// Precede South latitudes and West longitudes with a minus sign.
// Latitudes range from -90 to 90.
// Longitudes range from -180 to 180.
result.latitude = parts.at(0).trimmed().toDouble();
result.longitude = parts.at(1).trimmed().toDouble();
}
if (parts.size() != 2) {
result.append("");
result.append("");
}
else {
result.append(parts.at(1).trimmed());
result.append(parts.at(0).trimmed());
}
return result;
}
+11 -20
View File
@@ -46,7 +46,7 @@ class GVarGroup: public QObject {
Q_OBJECT
public:
GVarGroup(QCheckBox * weightGV, QAbstractSpinBox * weightSB, QComboBox * weightCB, int & weight, const ModelData & model, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
GVarGroup(QCheckBox *weightGV, QAbstractSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const double step=1.0, bool allowGVars=true);
protected slots:
void gvarCBChanged(int);
@@ -72,7 +72,7 @@ class CurveGroup : public QObject {
Q_OBJECT
public:
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, const ModelData & model, unsigned int flags=0);
CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags=0);
void update();
protected slots:
@@ -86,7 +86,6 @@ class CurveGroup : public QObject {
QComboBox *curveValueCB;
QSpinBox *curveValueSB;
CurveReference & curve;
const ModelData & model;
unsigned int flags;
bool lock;
int lastType;
@@ -119,7 +118,8 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase);
#define GVARS_VARIANT 0x0001
#define FRSKY_VARIANT 0x0002
void populateGVCB(QComboBox & b, int value, const ModelData & model);
// void populateGVarCB(QComboBox *b, int value, int min, int max,int pgvars=5); //TODO: Clean Up
void populateGVCB(QComboBox *b, int value);
void populateSourceCB(QComboBox *b, const RawSource &source, const GeneralSettings generalSettings, const ModelData * model, unsigned int flags);
QString image2qstring(QImage image);
int findmult(float value, float base);
@@ -178,19 +178,11 @@ QSet<QString> getFilesSet(const QString &path, const QStringList &filter, int ma
bool caseInsensitiveLessThan(const QString &s1, const QString &s2);
class GpsCoord
{
public:
GpsCoord(): latitude(0), longitude(0) {};
double latitude; // Precede South latitudes and West longitudes with a minus sign. Latitudes range from -90 to 90.
double longitude; // Longitudes range from -180 to 180.
};
class GpsGlitchFilter
{
public:
GpsGlitchFilter() : lastValid(false), glitchCount(0) {};
bool isGlitch(GpsCoord coord);
bool isGlitch(double latitude, double longitude);
private:
bool lastValid;
@@ -203,16 +195,15 @@ class GpsLatLonFilter
{
public:
GpsLatLonFilter() {};
bool isValid(GpsCoord coord);
bool isValid(const QString & latitude, const QString & longitude);
private:
double lastLat;
double lastLon;
QString lastLat;
QString lastLon;
};
GpsCoord extractGpsCoordinates(const QString & position);
double toDecimalCoordinate(const QString & value);
QStringList extractLatLon(const QString & position);
class TableLayout
{
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 866 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 960 KiB

@@ -1,948 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="800"
height="500"
id="svg2"
inkscape:label="Pozadí"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="splash22_3_dmg.svg"
inkscape:export-filename="/home/martin/Dokumenty/MojeDokumenty/OpenTXwip/Grafika/splash/splash22_3_dmg.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs3">
<inkscape:path-effect
effect="spiro"
id="path-effect4023"
is_visible="true" />
<linearGradient
inkscape:collect="always"
id="linearGradient3977">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979" />
<stop
style="stop-color:#6b6e7a;stop-opacity:1"
offset="1"
id="stop3981" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3959">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3961" />
<stop
style="stop-color:#adb0b6;stop-opacity:1"
offset="1"
id="stop3963" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4110"
id="linearGradient8590"
gradientUnits="userSpaceOnUse"
x1="32.03112"
y1="919.08826"
x2="13.698381"
y2="917.573" />
<linearGradient
id="linearGradient4110"
inkscape:collect="always">
<stop
id="stop4112"
offset="0"
style="stop-color:#787878;stop-opacity:1;" />
<stop
id="stop4114"
offset="1"
style="stop-color:#787878;stop-opacity:0;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4087"
id="radialGradient8592"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1208029,0.28390177,-0.22234482,0.87778509,-104.71658,-31.467902)"
cx="-112.21627"
cy="-531.93341"
fx="-112.21627"
fy="-531.93341"
r="23.035715" />
<linearGradient
id="linearGradient4087"
inkscape:collect="always">
<stop
id="stop4089"
offset="0"
style="stop-color:#ff8080;stop-opacity:1" />
<stop
id="stop4091"
offset="1"
style="stop-color:#c80000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4100"
id="linearGradient8594"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.89739834,0,0,0.87587127,4.0183202,712.56816)"
x1="34.241589"
y1="83.140976"
x2="49.625"
y2="83.140976" />
<linearGradient
id="linearGradient4100"
inkscape:collect="always">
<stop
id="stop4102"
offset="0"
style="stop-color:#ff8080;stop-opacity:1;" />
<stop
id="stop4104"
offset="1"
style="stop-color:#ff8080;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient8596"
gradientUnits="userSpaceOnUse"
x1="98.229652"
y1="132.15594"
x2="103.66933"
y2="160.80135" />
<linearGradient
id="linearGradient4123"
inkscape:collect="always">
<stop
id="stop4125"
offset="0"
style="stop-color:#928c8c;stop-opacity:1;" />
<stop
id="stop4127"
offset="1"
style="stop-color:#ffffff;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4135"
id="linearGradient8598"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.63134529,702.36218)"
x1="121.7157"
y1="133.16609"
x2="137.76198"
y2="147.41682" />
<linearGradient
inkscape:collect="always"
id="linearGradient4135">
<stop
style="stop-color:#928c8c;stop-opacity:0"
offset="0"
id="stop4137" />
<stop
style="stop-color:#ffffff;stop-opacity:0.40282686"
offset="1"
id="stop4139" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977"
id="linearGradient3921"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959"
id="linearGradient3923"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<linearGradient
inkscape:collect="always"
id="linearGradient3977-5">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979-5" />
<stop
style="stop-color:#6b6e7a;stop-opacity:1"
offset="1"
id="stop3981-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3959-3">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3961-7" />
<stop
style="stop-color:#adb0b6;stop-opacity:1"
offset="1"
id="stop3963-1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977"
id="linearGradient4188"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959"
id="linearGradient4190"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4312">
<rect
y="545.63458"
x="131.18359"
height="133.1575"
width="261.93893"
id="rect4314"
style="fill:none;stroke:#d62929;stroke-opacity:1" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-5"
id="linearGradient4444"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959-3"
id="linearGradient4446"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-5"
id="linearGradient4505"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(123.50835,-63.991344)"
x1="747.14288"
y1="873.79077"
x2="773.57141"
y2="994.505" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3959-3"
id="linearGradient4507"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-291.32112,-51.262515)"
x1="81.822357"
y1="878.61597"
x2="107.07617"
y2="837.19971" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3274">
<rect
style="fill:none;stroke:#d62929;stroke-opacity:1"
id="rect3276"
width="420.34811"
height="133.34306"
x="130.51035"
y="521.02094" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3274-3">
<rect
style="fill:none;stroke:#d62929;stroke-opacity:1"
id="rect3276-2"
width="420.34811"
height="133.34306"
x="130.51035"
y="521.02094" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4312-9">
<rect
y="545.63458"
x="131.18359"
height="133.1575"
width="261.93893"
id="rect4314-5"
style="fill:none;stroke:#d62929;stroke-opacity:1" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3883">
<rect
style="fill:#d89119;fill-opacity:1;stroke:none"
id="rect3885"
width="241.35912"
height="37.132172"
x="211.64659"
y="1009.2491" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4891-2">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4893-0"
width="640"
height="210"
x="0"
y="842.36218" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591"
id="linearGradient12262"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
id="linearGradient5591"
inkscape:collect="always">
<stop
id="stop5593"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop5595"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-0"
id="linearGradient3965"
x1="532.14532"
y1="869.62433"
x2="494.59061"
y2="997.27747"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3977-0">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3979-1" />
<stop
style="stop-color:#c3b7a1;stop-opacity:1;"
offset="1"
id="stop3981-4" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter4196"
x="-0.080580361"
width="1.1611607"
y="-0.18846314"
height="1.3769263"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="30.294119"
id="feGaussianBlur4198" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3977-0"
id="radialGradient4178"
cx="321.13412"
cy="1244.5212"
fx="321.13412"
fy="1244.5212"
r="469.35312"
gradientTransform="matrix(1.9217668,0.29348951,-0.18210814,1.1924423,-68.177703,-526.12911)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3333">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3335" />
<stop
style="stop-color:#c3b7a1;stop-opacity:1;"
offset="1"
id="stop3337" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter4204"
x="-0.087714754"
width="1.1754295"
y="-0.15834162"
height="1.3166832"
style="color-interpolation-filters:sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="33.153964"
id="feGaussianBlur4206" />
</filter>
<linearGradient
id="linearGradient4347">
<stop
style="stop-color:#f0e47c;stop-opacity:1;"
offset="0"
id="stop4349" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop4351" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4291"
id="radialGradient4297"
cx="232.55463"
cy="997.94202"
fx="232.55463"
fy="997.94202"
r="247.41025"
gradientTransform="matrix(1.7432285,-1.5632483,1.7076977,1.4428782,-1700.9789,-1057.0931)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4291">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4293" />
<stop
style="stop-color:#8296d6;stop-opacity:0;"
offset="1"
id="stop4295" />
</linearGradient>
<linearGradient
id="linearGradient5611">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop5613" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop5615" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient4003-4"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
id="linearGradient5591-6"
inkscape:collect="always">
<stop
id="stop5593-1"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop5595-0"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient5018"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591-6"
id="linearGradient5046"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-91.923881,-6.3134535)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
<filter
inkscape:collect="always"
id="filter8684">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8686" />
</filter>
<filter
inkscape:collect="always"
id="filter8696">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8698" />
</filter>
<filter
inkscape:collect="always"
id="filter8708">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.37919011"
id="feGaussianBlur8710" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5591"
id="linearGradient9450"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.7604321,0,0,3.7554825,-1099.283,-1774.0469)"
x1="146.07436"
y1="846.03851"
x2="218.59071"
y2="846.03851" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.39482968"
inkscape:cx="240.13866"
inkscape:cy="72.917006"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
borderlayer="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1215"
inkscape:window-height="1000"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<sodipodi:guide
orientation="0,1"
position="225.44567,-819.73138"
id="guide3904" />
<sodipodi:guide
orientation="0,1"
position="228.337,-793.0061"
id="guide3906" />
<sodipodi:guide
orientation="0,1"
position="143.37385,50.789259"
id="guide4005" />
</sodipodi:namedview>
<metadata
id="metadata6">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Vrstva#1"
style="display:inline"
transform="translate(0,290)">
<rect
style="display:inline;fill:#234ca2;fill-opacity:1;stroke:none"
id="rect3846-4"
width="804.09418"
height="503.88089"
x="-2.954421"
y="-291.07556" />
<path
style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:19;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 253.27378,-420.65169 416.16531,-138.51528 176.19537,277.12476"
id="path5011"
inkscape:connector-curvature="0" />
<path
style="fill:#ffeb0e;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 245.67556,-416.85258 159.66351,276.54531 -280.60799,486.02728 -218.442373,0 0,-768.90443 z"
id="path5014"
inkscape:connector-curvature="0" />
<rect
y="-292.86649"
x="-23.549952"
height="457.31708"
width="868.56714"
id="rect4289"
style="display:inline;fill:url(#radialGradient4297);fill-opacity:1;stroke:none" />
<path
style="display:inline;fill:#fff9f9;fill-opacity:1;stroke:none"
d="m 877.13158,56.928644 -30.07273,-72.66535 -10.647,4.40919 c -0.17223,-0.79215 -0.39809,-1.58039 -0.71897,-2.3558 -2.90654,-7.02343 -10.9547,-10.3598 -17.9757,-7.45219 -5.55461,2.30021 -8.78643,7.82963 -8.46164,13.51264 -2.92241,-3.09113 -7.55211,-4.22774 -11.71605,-2.50328 -5.39129,2.23251 -7.95886,8.43043 -5.72708,13.82349 0.0122,0.022 0.0159,0.0391 0.0244,0.0599 -1.57291,-0.23301 -3.23597,-0.0794 -4.81206,0.57295 -3.0569,1.26588 -5.03792,4.02051 -5.49659,7.07108 l -12.49426,5.17422 c -0.1136,-0.96652 -0.33908,-1.94342 -0.72935,-2.88684 -2.28382,-5.5183 -8.61127,-8.14158 -14.12788,-5.85701 -4.94387,2.0474 -7.54039,7.34869 -6.38693,12.39754 -1.54666,-0.14772 -3.15108,0.0709 -4.68662,0.70723 -3.09904,1.28336 -5.19109,3.95869 -5.84874,7.00742 -3.84696,-1.78322 -9.65796,-1.65651 -15.4063,0.7241 -0.23587,0.0965 -0.45647,0.20479 -0.68709,0.30779 -3.08255,-4.50596 -8.99982,-6.39782 -14.24392,-4.22615 -6.01804,2.49217 -8.87047,9.37666 -6.37899,15.3968 0.5978,1.44452 1.45638,2.71382 2.48854,3.76415 l -8.99823,3.7264 c -2.34795,-4.67312 -7.93713,-6.8146 -12.84532,-4.78211 -1.25691,0.52065 -2.35259,1.28311 -3.25955,2.1878 -3.04566,-4.9439 -9.31325,-7.08257 -14.84966,-4.78994 -3.65055,1.51173 -6.14483,4.59908 -7.04861,8.15612 -2.30129,-0.34518 -4.71386,-0.0965 -7.02052,0.85887 -5.02399,2.08063 -8.09763,6.89684 -8.20023,12.00789 -1.69946,-0.36914 -3.51985,-0.24035 -5.24838,0.47446 -2.59152,1.0733 -4.39505,3.24625 -5.11328,5.74856 -3.11297,-6.10621 -10.44729,-8.8942 -16.88711,-6.2273 -5.2253,2.16391 -8.31884,7.28974 -8.17678,12.62659 -2.04295,-0.2798 -4.19216,-0.056 -6.23474,0.78975 -5.91433,2.4493 -8.81782,9.0684 -6.7585,15.0418 l -18.55274,7.6831 c -1.99787,-3.7365 -6.54926,-5.4343 -10.54562,-3.7793 -0.36363,0.1511 -0.70968,0.3298 -1.03973,0.5237 -2.71342,-4.6598 -8.51012,-6.7171 -13.62964,-4.597 -5.58514,2.313 -8.23712,8.7139 -5.92484,14.300996 0.13058,0.3158 0.28999,0.6127 0.44621,0.9091 -2.1166,-0.8527 -4.552,-0.908 -6.82666,0.034 -3.926,1.626 -6.08584,5.713 -5.46471,9.7346 -0.12215,-0.4249 -0.25749,-0.8465 -0.43033,-1.2647 -2.49575,-6.0305 -9.41953,-8.9008 -15.44795,-6.4043 -3.6812,1.5245 -6.16132,4.704 -6.98289,8.3149 -4.00881,-4.9547 -10.94053,-6.8976 -17.12799,-4.3353 -6.64857,2.7534 -10.21044,9.7934 -8.81599,16.5922 -1.06086,0.089 -2.13248,0.3473 -3.16879,0.7769 -4.53466,1.878 -7.06376,6.54154 -6.44519,11.18824 l -22.86313,9.4682 c -0.0122,-1.2886 -0.26238,-2.6006 -0.78506,-3.8647 -2.16545,-5.2322 -8.16688,-7.7204 -13.39743,-5.5543 -3.66019,1.5158 -5.96222,4.9132 -6.28078,8.6061 -1.19181,0.034 -2.4133,0.2544 -3.58043,0.738 -4.88743,2.0238 -7.30965,7.4482 -5.71231,12.3975 l -6.21738,2.5746 c -2.45178,-4.4168 -7.86237,-6.38 -12.64097,-4.4011 -1.04681,0.4334 -1.98663,1.0314 -2.79391,1.7388 -3.19884,-4.0115 -8.7758,-5.6061 -13.75264,-3.5451 -5.26145,2.1789 -8.11204,7.7246 -7.09308,13.109 -0.73485,0.3458 -1.40972,0.7753 -2.00886,1.2741 -2.75397,-2.0639 -6.50627,-2.6591 -9.91631,-1.2468 -3.99561,1.6546 -6.33465,5.5806 -6.19222,9.6634 -1.14368,0.02 -2.30422,0.2555 -3.42482,0.7201 -3.72823,1.5439 -5.90407,5.209 -5.76091,9.0193 l -8.28318,3.4303 c -2.18683,-4.8632 -7.83415,-7.1601 -12.79316,-5.1063 -2.10377,0.8711 -3.73263,2.4051 -4.78421,4.239 -1.44563,0.1236 -2.97909,0.4891 -4.5139,1.1245 -0.49152,0.2032 -0.96485,0.4397 -1.41717,0.6798 -2.25292,-0.9814 -4.86141,-1.0822 -7.31099,-0.067 -1.50585,0.6234 -2.76154,1.5858 -3.71577,2.7722 -3.41346,-2.9002 -8.29344,-3.8273 -12.71609,-1.9959 -5.59748,2.318 -8.57034,8.2778 -7.3298,13.9985 -1.71265,-0.2724 -3.51923,-0.1027 -5.23897,0.6098 -4.37868,1.8135 -6.72577,6.4472 -5.80965,10.9252 l -4.74733,1.9659 30.07274,72.6653 597.06608,-77.3299 z"
id="rect3848-0-85"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccsccccccccscccccssccccccccsccccccccscccccccscccccccsccccscccccccccccccsccccccc" />
<path
inkscape:connector-curvature="0"
id="path3975-80"
d="m 1193.5465,858.03124 -29.4521,-110.4209 -16.1842,4.3168 c -0.097,-1.174 -0.2718,-2.3525 -0.586,-3.5308 -2.8466,-10.6726 -13.8062,-17.0168 -24.4788,-14.1701 -8.4433,2.2521 -14.1567,9.5997 -14.7743,17.848 -3.6206,-5.0114 -10.0747,-7.5331 -16.4041,-5.8449 -8.1951,2.1858 -13.0791,10.623 -10.8932,18.8181 0.01,0.032 0.016,0.06 0.024,0.09 -2.222,-0.6369 -4.6479,-0.7332 -7.0436,-0.094 -4.6467,1.2394 -8.0276,4.8289 -9.2713,9.1355 l -18.9922,5.0658 c 0.021,-1.4139 -0.1174,-2.8641 -0.4995,-4.2978 -2.2367,-8.3856 -10.8531,-13.3735 -19.2388,-11.1368 -7.5151,2.0044 -12.2694,9.1448 -11.5717,16.638 -2.2004,-0.5087 -4.5543,-0.4994 -6.8884,0.1232 -4.7108,1.2564 -8.23652,4.7104 -9.76662,8.9765 -5.2026,-3.304 -13.6002,-4.2318 -22.3382,-1.9011 -0.3585,0.096 -0.6969,0.2076 -1.0488,0.3121 -3.581,-7.08 -11.7462,-10.9359 -19.7177,-8.8097 -9.1479,2.4399 -14.5732,11.8119 -12.1332,20.9599 0.5855,2.195 1.5801,4.1876 2.8669,5.8978 l -13.6781,3.6483 c -2.4906,-7.1803 -10.1353,-11.3332 -17.5961,-9.3433 -1.9107,0.5097 -3.6352,1.3986 -5.1148,2.5286 -3.4444,-7.7036 -12.0671,-11.9823 -20.4828,-9.7376 -5.5491,1.48 -9.7331,5.4506 -11.715,10.4017 -3.2501,-0.9368 -6.7741,-1.0393 -10.2803,-0.1041 -7.6369,2.037 -12.9861,8.3873 -14.1102,15.7302 -2.3784,-0.8566 -5.0258,-1.0204 -7.6534,-0.3196 -3.9394,1.0508 -6.9532,3.8363 -8.4663,7.3036 -3.3191,-9.3907 -13.355,-14.8083 -23.144,-12.1975 -7.9429,2.1187 -13.3799,8.9113 -14.1947,16.6261 -2.8902,-0.7934 -6.02995,-0.882 -9.13489,-0.054 -8.99025,2.398 -14.43842,11.3779 -12.61231,20.3763 l -28.20158,7.5221 c -2.16498,-5.7643 -8.39914,-9.0797 -14.47374,-7.4594 -0.55283,0.1479 -1.0856,0.3396 -1.59838,0.5557 -3.01962,-7.2309 -10.9796,-11.3022 -18.76147,-9.2265 -8.48998,2.2645 -13.53415,10.9783 -11.26966,19.4682 0.12794,0.4798 0.3009,0.938 0.46937,1.3949 -2.88702,-1.6328 -6.38577,-2.1779 -9.84361,-1.2556 -5.96773,1.5918 -9.86057,7.0664 -9.73405,12.9783 -0.0947,-0.6354 -0.20909,-1.2688 -0.37854,-1.9042 -2.44421,-9.1638 -11.87275,-14.6217 -21.03641,-12.1774 -5.59564,1.4924 -9.7769,5.5986 -11.65065,10.6432 -4.82999,-7.9033 -14.44707,-12.0266 -23.85245,-9.5181 -10.10638,2.6957 -16.58369,12.1562 -15.87323,22.2162 -1.5458,-0.073 -3.13924,0.093 -4.7144,0.5137 -6.89322,1.8386 -11.42848,8.073 -11.42493,14.8847 l -34.7537,9.2697 c 0.2357,-1.8574 0.11937,-3.7962 -0.39288,-5.7168 -2.12072,-7.951 -10.29329,-12.682 -18.24422,-10.5613 -5.5638,1.484 -9.52984,5.9381 -10.69443,11.1969 -1.72402,-0.1789 -3.52593,-0.095 -5.30017,0.3788 -7.42927,1.9815 -11.95597,9.332 -10.59952,16.7667 l -9.45087,2.5208 c -2.68926,-6.8309 -10.11075,-10.693 -17.37455,-8.7555 -1.5911,0.4243 -3.05966,1.106 -4.35807,1.9709 -3.84299,-6.3899 -11.5747,-9.7527 -19.13992,-7.7348 -7.99785,2.1332 -13.16481,9.5769 -12.72512,17.52777 -1.12488,0.3576 -2.17944,0.8474 -3.13812,1.4515 -3.57408,-3.49947 -8.86743,-5.07357 -14.05092,-3.69107 -6.07344,1.61997 -10.19397,6.82827 -10.76873,12.73677 -1.65177,-0.1901 -3.369,-0.072 -5.07271,0.3827 -5.66704,1.5116 -9.50243,6.3754 -10.02407,11.8914 l -12.59113,3.3584 c -2.22216,-7.4232 -9.92099,-11.811 -17.4591,-9.8004 -3.19785,0.853 -5.83796,2.7513 -7.70353,5.192 -2.10667,-0.098 -4.38619,0.135 -6.71932,0.7572 -0.74697,0.1989 -1.47434,0.4492 -2.17189,0.7087 -3.0588,-1.8442 -6.79851,-2.4883 -10.52203,-1.495 -2.28891,0.6105 -4.28205,1.7566 -5.88374,3.2834 -4.36467,-4.8302 -11.21945,-7.0983 -17.94211,-5.3052 -8.50871,2.2695 -13.93086,10.2864 -13.23639,18.7638 -2.41578,-0.7193 -5.05157,-0.8196 -7.66547,-0.1224 -6.6561,1.7754 -10.92344,8.0017 -10.4587,14.627 l -7.21641,1.9248 29.45211,110.42089 875.12416,-11.811 z"
style="display:inline;fill:url(#radialGradient4178);fill-opacity:1;stroke:none;filter:url(#filter4204)"
transform="matrix(0.85505879,0.09386503,-0.09382668,0.85540827,-193.08489,-633.44617)"
sodipodi:nodetypes="ccccscsccccccccccccscccccccsccccccccccsccscccccccccssccccccccccccccccccccscsccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none"
d="m 624.36947,366.03444 35.80221,-91.5894 -13.41855,-5.2496 c 0.53058,-0.8637 1.00939,-1.7702 1.39152,-2.7474 3.4604,-8.8525 -0.90784,-18.8354 -9.7567,-22.297 -7.00054,-2.739 -14.70287,-0.5526 -19.33073,4.8536 0.0413,-5.3201 -3.14945,-10.3566 -8.39726,-12.4099 -6.7948,-2.6581 -14.47681,0.7063 -17.13386,7.5037 -0.0153,0.026 -0.0199,0.049 -0.029,0.075 -1.21635,-1.5734 -2.84919,-2.876 -4.83544,-3.6532 -3.85277,-1.5072 -8.02444,-0.739 -11.07934,1.6137 l -15.74692,-6.1604 c 0.73417,-0.97 1.37716,-2.046 1.84192,-3.2353 2.71889,-6.9554 -0.71539,-14.8038 -7.66811,-17.5239 -6.23094,-2.4378 -13.16274,0.093 -16.49424,5.6458 -1.26659,-1.4737 -2.90324,-2.6662 -4.83849,-3.4234 -3.90576,-1.5281 -8.10874,-0.9285 -11.34172,1.2512 -1.92486,-4.9414 -7.27469,-9.8626 -14.51959,-12.6969 -0.29721,-0.1161 -0.58877,-0.2116 -0.88599,-0.3177 1.12211,-6.7347 -2.57579,-13.5683 -9.18503,-16.1539 -7.58473,-2.9674 -16.11806,0.7696 -19.08407,8.3574 -0.71173,1.8207 -1.03673,3.7094 -1.01535,5.5509 l -11.34082,-4.4365 c 1.92929,-6.249 -1.25636,-13.0233 -7.44223,-15.4434 -1.58426,-0.6197 -3.23253,-0.8816 -4.8336,-0.8516 1.53433,-7.0978 -2.26545,-14.4574 -9.24306,-17.1873 -4.60085,-1.7999 -9.52333,-1.1771 -13.41841,1.2475 -1.77624,-2.3054 -4.16724,-4.1715 -7.07445,-5.3088 -6.33189,-2.4771 -13.27376,-0.7972 -17.79197,3.7232 -1.21283,-1.8057 -2.96481,-3.2677 -5.14349,-4.1201 -3.26613,-1.2778 -6.77405,-0.8803 -9.5884,0.7533 2.48019,-8.204 -1.71943,-17.07374 -9.83566,-20.24894 -6.58556,-2.5766 -13.81367,-0.6345 -18.30668,4.3015 -1.59985,-2.0227 -3.73165,-3.6833 -6.30607,-4.6904 -7.45398,-2.9162 -15.80344,0.5371 -19.11889,7.70854 l -23.38251,-9.14734 c 1.43398,-5.101 -1.20031,-10.5759 -6.23688,-12.5463 -0.45835,-0.1795 -0.92555,-0.3174 -1.39107,-0.4287 1.58808,-6.5535 -1.8578,-13.4318 -8.30989,-15.956 -7.03917,-2.7538 -14.97304,0.7206 -17.72584,7.7628 -0.15549,0.3978 -0.26896,0.8037 -0.38474,1.2063 -1.17037,-2.6028 -3.31851,-4.763 -6.18556,-5.8846 -4.94784,-1.9358 -10.43436,-0.1222 -13.3567,4.0434 0.25766,-0.4891 0.50111,-0.9866 0.70715,-1.5136 2.9712,-7.6011 -0.78688,-16.1893 -8.38458,-19.1615 -4.63948,-1.8152 -9.62902,-1.0977 -13.49676,1.4476 0.67538,-7.9419 -3.89278,-15.70065 -11.69102,-18.75147 -8.37938,-3.2781 -17.68705,-0.0159 -22.31675,7.32392 -1.03445,-0.83825 -2.22406,-1.53423 -3.53005,-2.04511 -5.71531,-2.23606 -12.03405,-0.22189 -15.49981,4.50446 L 159.20103,78.45548 c 1.10913,-1.16821 2.01557,-2.57223 2.63841,-4.16539 2.57793,-6.59482 -0.67934,-14.03907 -7.27163,-16.61821 -4.61306,-1.80464 -9.6307,-0.73554 -13.11554,2.31878 -1.10438,-1.00217 -2.39649,-1.86162 -3.86758,-2.43704 -6.15976,-2.40985 -13.0407,0.38275 -15.88575,6.23031 l -7.83598,-3.06552 c 1.6136,-6.10772 -1.56547,-12.56672 -7.58808,-14.92293 -1.31913,-0.51614 -2.68439,-0.79132 -4.02504,-0.85273 0.58907,-6.38964 -3.059189,-12.66023 -9.331659,-15.11424 -6.63122,-2.59426 -14.00351,-0.0627 -17.74692,5.67547 -0.96205,-0.32482 -1.94258,-0.52223 -2.91485,-0.5916 -0.69615,-4.24779 -3.56456,-8.03597 -7.86223,-9.7173 -5.03567,-1.96995 -10.54434,-0.45639 -13.95128,3.3489 -1.04835,-0.97313 -2.2992,-1.76566 -3.711808,-2.31831 -4.69873,-1.83825 -9.83428,-0.41835 -13.0045,3.14187 l -10.43955,-4.08429 c 2.23903,-6.28055 -0.8646,-13.24543 -7.11462,-15.69057 -2.6514,-1.03715 -5.44849,-1.06527 -7.9845699,-0.3227 -1.41077,-1.14089 -3.10973,-2.14062 -5.04406,-2.8974 -0.61932,-0.24233 -1.25102,-0.43943 -1.86667,-0.61484 -1.18183005,-2.83705 -3.44666,-5.18867001 -6.53394,-6.39650001 C -7.1544869,-1.38118 -9.1199769,-1.6015 -11.007877,-1.35826 c -0.56678,-5.57357 -4.16434,-10.63833 -9.73837,-12.81897 -7.054599,-2.7599 -14.895919,0.0382 -18.730659,6.27242 -1.30874,-1.72945 -3.08499,-3.14156 -5.25223,-3.98941 -5.51875,-2.1591 -11.6475,-0.0153 -14.69874,4.81786 l -5.9832,-2.34078 -53.009694,246.06918 742.7907,129.383 z"
id="rect3848-52"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccccscccccscccscccccccscccccccccccsccsccccssccccccsccscsccscccscscsccccc" />
<path
inkscape:connector-curvature="0"
id="path3957-2"
d="m 784.03557,1142.9676 29.5781,-110.3871 -16.1792,-4.3352 c 0.5019,-1.0657 0.9384,-2.1743 1.2541,-3.3522 2.8588,-10.6693 -3.4729,-21.6361 -14.1422,-24.4949 -8.4408,-2.26169 -17.0585,1.2547 -21.7097,8.0944 -0.6369,-6.1495 -4.9716,-11.55547 -11.2991,-13.25092 -8.1926,-2.1952 -16.6353,2.67926 -18.8305,10.87182 -0.01,0.031 -0.016,0.06 -0.024,0.09 -1.6077,-1.6607 -3.6619,-2.9547 -6.0569,-3.5965 -4.6453,-1.2447 -9.3663,0.1788 -12.5932,3.2903 l -18.9864,-5.0874 c 0.7234,-1.215 1.3277,-2.54036 1.7118,-3.97363 2.2462,-8.38304 -2.7318,-17.00523 -11.1149,-19.25147 -7.5128,-2.01304 -15.196,1.80223 -18.3305,8.644 -1.6531,-1.53882 -3.6976,-2.70544 -6.031,-3.33067 -4.7093,-1.26185 -9.4882,-0.0282 -12.943,2.90536 -2.8599,-5.45936 -9.6742,-10.45382 -18.4096,-12.79448 -0.3584,-0.096 -0.7075,-0.16773 -1.0646,-0.25284 0.4297,-7.9224 -4.7221,-15.33856 -12.6911,-17.47387 -9.1451,-2.45042 -18.5234,2.96407 -20.9738,12.1092 -0.588,2.1944 -0.7204,4.41748 -0.4587,6.54167 l -13.6739,-3.66389 c 1.4247,-7.4653 -3.1278,-14.87902 -10.5863,-16.87752 -1.9101,-0.51182 -3.8481,-0.602 -5.6942,-0.36109 0.8593,-8.39474 -4.478,-16.40548 -12.8911,-18.65977 -5.5474,-1.48642 -11.1546,-0.13339 -15.3428,3.1682 -2.349,-2.43368 -5.3517,-4.281 -8.8569,-5.22021 -7.6346,-2.04568 -15.439,0.78829 -20.0774,6.59066 -1.6336,-1.92926 -3.8461,-3.3923 -6.4729,-4.09613 -3.9382,-1.05523 -7.94,-0.14518 -10.9814,2.10452 1.8097,-9.79428 -4.1839,-19.49723 -13.9698,-22.11938 -7.9405,-2.12764 -16.0418,1.04575 -20.5977,7.32478 -2.1087,-2.12989 -4.7854,-3.77339 -7.8894,-4.6051 -8.9875,-2.40819 -18.1899,2.65497 -21.0977,11.36424 l -28.193,-7.55428 c 1.0003,-6.07563 -2.7478,-12.05962 -8.8206,-13.68681 -0.5527,-0.1481 -1.1102,-0.24747 -1.6624,-0.31602 0.9915,-7.77313 -3.875,-15.27335 -11.6545,-17.35788 -8.4874,-2.27419 -17.2069,2.76003 -19.4811,11.24743 -0.1285,0.47963 -0.2073,0.96298 -0.2893,1.44303 -1.6871,-2.85561 -4.4471,-5.07388 -7.9039,-6.00012 -5.9659,-1.59857 -12.0713,1.20312 -14.9118,6.3895 0.2348,-0.598 0.452,-1.20392 0.6222,-1.83913 2.4547,-9.16099 -2.9925,-18.59564 -12.1534,-21.0503 -5.5939,-1.49887 -11.2664,-0.0273 -15.4075,3.40968 -0.2418,-9.25926 -6.5183,-17.6316 -15.9208,-20.15099 -10.1033,-2.70717 -20.4374,2.25898 -24.8418,11.33158 -1.303,-0.83492 -2.7671,-1.48554 -4.3418,-1.90747 -6.8911,-1.84647 -13.9324,1.29314 -17.3284,7.19784 l -34.7431,-9.30938 c 1.1311,-1.49197 1.9978,-3.23022 2.5123,-5.15026 2.1298,-7.94851 -2.5917,-16.12655 -10.5402,-18.25634 -5.5621,-1.49036 -11.2217,0.39044 -14.8551,4.36649 -1.4048,-1.01526 -3.0084,-1.84135 -4.7821,-2.31662 -7.427,-1.99006 -15.0178,2.12099 -17.5523,9.24076 l -9.448,-2.53159 c 1.0782,-7.26161 -3.426,-14.31189 -10.6876,-16.25761 -1.5906,-0.4262 -3.2034,-0.56831 -4.7602,-0.46669 -0.1417,-7.45513 -5.1639,-14.22755 -12.7268,-16.25403 -7.9954,-2.14237 -16.1876,1.73002 -19.7741,8.83953 -1.1533,-0.25135 -2.3116,-0.3531 -3.4438,-0.30807 -1.351,-4.81613 -5.152699,-8.8217 -10.334599,-10.21018 -6.0716,-1.62689 -12.2414,0.83038 -15.6879,5.66389 -1.3366,-0.98895 -2.8838,-1.74327 -4.587,-2.19965 -5.6653,-1.518 -11.4161,0.78299 -14.6207,5.30283 l -12.5873,-3.37274 c 1.7785,-7.54171 -2.7037,-15.18597 -10.2395,-17.2052 -3.1969,-0.85659 -6.4321,-0.52891 -9.2667,0.65519 -1.7769,-1.13587 -3.8684,-2.07181 -6.2008,-2.69678 -0.7467,-0.20009 -1.5018,-0.3465 -2.2358,-0.46967 -1.7305,-3.12447 -4.6499,-5.54881 -8.3722996,-6.54622 -2.2882,-0.61312 -4.5874,-0.61445 -6.7373,-0.0906 -1.3721,-6.36384 -6.1806,-11.75002 -12.9012004,-13.55081 -8.5061,-2.27921 -17.2055,1.96262 -20.83394,9.65554 -1.73458,-1.8288 -3.96869,-3.23102 -6.5818,-3.9312 -6.65407,-1.78296 -13.4591,1.48324 -16.36247,7.45666 l -7.21421,-1.93304 -36.017883,370.02255 881.296802,-25.2181 z"
style="display:inline;opacity:0.76678443;fill:url(#linearGradient3965);fill-opacity:1;stroke:none;filter:url(#filter4196)"
transform="matrix(0.85837445,-0.05590027,0.05587743,0.85872528,-281.62956,-689.27743)"
sodipodi:nodetypes="ccccscsccccccscscccssccscscscscscsccscsccscsscscscccscsccscsccscsccscccscscsccccc" />
<rect
style="opacity:0.459;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:7.8415556;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5016"
width="490.40955"
height="183.9483"
x="154.96779"
y="-232.75832"
ry="38.450249" />
</g>
<g
inkscape:label="Vrstva 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-552.36218)"
style="display:inline">
<g
id="g9429"
transform="translate(715.89458,-484.76097)">
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path5521"
d="m -541.16139,1401.9765 -133.15983,-126.4507 c -2.67796,-3.1869 4.36168,-10.2653 7.69711,-8.84 l 42.71889,22.6766 53.49485,37.6661 46.95231,34.207 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.98724842;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5500"
d="m -550.63035,1394.3425 c 2.30616,13.423 7.07661,27.1453 16.86881,36.8888 14.06473,13.8692 32.5591,22.4132 51.78176,26.3534 10.03569,2.0175 20.53541,-0.2419 30.76131,0.022 26.27854,-1.1777 52.65257,-1.2221 78.8705,-3.1197 14.63631,-1.2671 28.79784,-5.3814 43.02494,-8.6398 13.37018,-5.5166 26.49631,-14.0331 32.57971,-27.6668 4.77003,-9.4263 10.66489,-18.5689 14.7418,-28.17 2.16574,-7.0809 -7.89007,-2.4276 -10.07958,0.7336 -8.05751,8.63 -16.11503,17.26 -24.17255,25.89 -16.06434,-8.8296 -31.45372,-19.0573 -48.95319,-24.9143 -13.03118,-5.448 -27.50414,-5.9791 -41.18036,-9.2276 -13.7795,-2.7366 -27.92117,-4.205 -40.70957,-10.4122 -17.83415,-6.5723 -35.33415,-14.2911 -53.37768,-20.1453 -8.53908,-2.1286 -18.7772,-3.1026 -26.3501,1.651 -7.93527,13.5854 -15.87053,27.1708 -23.8058,40.7562 z"
style="fill:#9ab3d9;fill-opacity:1;stroke:#000000;stroke-width:1.06395769;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
transform="matrix(0.94985292,0.31269703,-0.31269703,0.94985292,397.05926,247.01432)"
inkscape:connector-curvature="0"
inkscape:tile-y0="495.09051"
inkscape:tile-x0="-540.98978"
inkscape:tile-h="46.001777"
inkscape:tile-w="169.04809"
inkscape:tile-cy="535.18738"
inkscape:tile-cx="-541.1986"
id="path7694"
d="m -407.89167,1272.2747 c 5.14001,6.3357 -20.61438,35.9473 -57.52404,66.1395 -36.90965,30.1922 -70.99764,49.5317 -76.13765,43.1961 -5.14002,-6.3357 20.61437,-35.9474 57.52403,-66.1395 36.90966,-30.1922 70.99764,-49.5318 76.13766,-43.1961 z"
inkscape:transform-center-y="-30.293294"
inkscape:transform-center-x="-80.958308"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8696)" />
<g
style="fill:#ffffff;fill-opacity:1"
transform="matrix(1.0775939,0,0,1.0761756,-480.68834,1077.7838)"
id="g5514">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.892648,275.48747 6.25,-3.57143 5.26786,-2.05357 4.64286,-0.71429 7.85714,0.89286 5.17857,1.25 4.46429,2.14286 4.10714,3.57143 3.30357,2.85714 5.98214,3.21428 6.60715,2.67858 -0.0893,6.51785 c 0,0 -1.16071,3.66072 -1.16071,4.01786 0,0.35714 -1.69643,4.55357 -1.69643,4.55357 l -7.05357,-4.01786 -2.05357,-0.44642 -5,3.92857 -5.44643,1.78571 -5.44643,1.96429 -1.60714,0.17857 -4.375,-7.05357 -3.92858,-5.625 -3.21428,-4.28572 -2.94643,-3.66071 -4.01786,-3.39286 -4.01785,-3.125 z"
id="path5503"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 41.267648,283.79104 14.01786,-13.83929 0,0"
id="path5505"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 43.410508,286.02318 15.17857,-15.26785"
id="path5507"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 56.446218,303.88033 c 0,0 1.875,-22.14286 1.875,-22.58929 0,-0.44643 -0.0893,-7.41071 -0.0893,-7.41071 l 0.17857,-2.67858"
id="path5509"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 74.035508,296.46961 0,-16.25"
id="path5511"
inkscape:connector-curvature="0" />
</g>
<path
transform="matrix(0.79625178,0.45406311,-0.45381717,0.79676123,512.52081,521.26661)"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8684)"
inkscape:transform-center-x="17.57733"
inkscape:transform-center-y="55.045522"
d="m -512.87163,1507.2802 c -5.80542,1.2629 -16.61393,-25.2242 -24.14142,-59.1607 -7.52755,-33.9364 -8.92364,-62.4711 -3.11834,-63.7341 5.80542,-1.2628 16.61393,25.2243 24.14141,59.1608 7.52756,33.9364 8.92371,62.4711 3.11835,63.734 z"
id="path8280"
inkscape:tile-cx="-541.1986"
inkscape:tile-cy="535.18738"
inkscape:tile-w="169.04809"
inkscape:tile-h="46.001777"
inkscape:tile-x0="-540.98978"
inkscape:tile-y0="495.09051"
inkscape:connector-curvature="0" />
<circle
transform="matrix(1.0775939,0,0,1.0761756,-580.01711,1931.488)"
id="path5523"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.38783747;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="47.098362"
cy="-512.54401"
r="23.359777" />
<path
transform="matrix(1.0155585,0.26208382,-0.26208513,1.0155506,375.59085,113.89354)"
style="opacity:0.61100003;fill:#cecece;fill-opacity:1;stroke:none;filter:url(#filter8708)"
inkscape:transform-center-x="36.497207"
inkscape:transform-center-y="-42.010802"
d="m -627.24914,1324.3778 c 2.81378,-4.1267 24.76631,5.7977 49.03238,22.1666 24.26609,16.3688 41.65657,32.9837 38.84289,37.1104 -2.81386,4.1266 -24.76633,-5.7976 -49.03231,-22.1665 -24.26608,-16.3689 -41.65674,-32.9838 -38.84296,-37.1105 z"
id="path8282"
inkscape:tile-cx="-541.1986"
inkscape:tile-cy="535.18738"
inkscape:tile-w="169.04809"
inkscape:tile-h="46.001777"
inkscape:tile-x0="-540.98978"
inkscape:tile-y0="495.09051"
inkscape:connector-curvature="0" />
<circle
transform="matrix(1.0775939,0,0,1.0761756,-573.75806,1934.4775)"
id="path5525"
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.38783747;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="33.966381"
cy="-518.09985"
r="16.28871" />
<ellipse
inkscape:transform-center-y="-17.09598"
inkscape:transform-center-x="-84.732874"
transform="matrix(2.834602,-0.60010423,0.5942,2.8637499,-358.0305,2555.1763)"
id="path5529"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.14347301;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<ellipse
transform="matrix(-1.1277765,-1.744406,1.752265,-1.1244094,202.6751,961.09238)"
id="path5529-7"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.20083466;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<ellipse
inkscape:transform-center-y="-0.70656384"
inkscape:transform-center-x="-0.68115835"
transform="matrix(1.1338996,-2.0198832,2.0232381,1.1299859,199.61444,1989.4171)"
id="path5529-4"
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.18026559;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
cx="50.507626"
cy="-406.60425"
rx="29.7995"
ry="5.0507627" />
<path
inkscape:connector-curvature="0"
id="path5563"
d="m -312.42545,1421.5179 6.35009,-2.1139 46.9523,26.1357 12.12296,10.5696 -0.96214,1.5374 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.83382982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5500-4"
d="m -548.10009,1393.2764 c 2.30616,13.423 7.0766,27.1453 16.86881,36.8889 14.06473,13.8691 32.5591,22.4131 51.78175,26.3533 10.03569,2.0175 20.53542,-0.2418 30.76131,0.022 26.27854,-1.1776 52.65256,-1.2221 78.87053,-3.1197 14.63631,-1.267 28.79784,-5.3814 43.02494,-8.6397 13.37018,-5.5166 26.49631,-14.0332 32.57971,-27.6669 4.77003,-9.4263 10.66489,-18.5689 14.7418,-28.1699 2.16574,-7.081 -7.89007,-2.4277 -10.07958,0.7335 -8.05751,8.63 -16.11503,17.26 -24.17254,25.89 -16.06434,-8.8296 -31.45372,-19.0573 -48.9532,-24.9143 -13.03121,-5.448 -27.50419,-5.9791 -41.18039,-9.2275 -13.7795,-2.7367 -27.92117,-4.205 -40.70957,-10.4122 -17.83415,-6.5724 -35.33415,-14.2912 -53.37768,-20.1453 -8.53908,-2.1287 -18.77719,-3.1027 -26.3501,1.6509 -7.93527,13.5854 -15.87053,27.1708 -23.80579,40.7562 z"
style="opacity:0.49823321;fill:url(#linearGradient9450);fill-opacity:1;stroke:none" />
<path
sodipodi:nodetypes="ccccccsccccccccccc"
inkscape:connector-curvature="0"
id="path5496"
d="m -485.62932,1455.857 4.61826,-6.5339 3.84854,-2.6905 8.08196,-2.3061 8.85168,-3.0748 16.54876,-1.5373 c 0,0 8.08196,1.153 9.62136,1.153 1.53941,0 18.47305,2.6904 18.47305,2.6904 l 21.93676,3.4592 6.92736,3.0748 5.77282,4.6122 -12.70018,3.0747 -5.38798,3.0748 -3.46371,4.2279 -1.92429,2.6904 239.76468,161.042 c 5.82092,4.1638 1.20266,16.4949 -4.61826,14.2209 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.98724842;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7664"
transform="translate(318.31762,-3.8891046)"
style="opacity:0.858">
<g
transform="matrix(0.95511441,0,0,0.95385727,205.18996,51.838406)"
id="text7238"
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none">
<g
transform="matrix(0.68786515,0,0,0.68786515,161.92514,215.41774)"
id="g7273"
style="">
<path
d="m -154.78125,940.90625 c -16.83367,0.0841 -32.94231,5.79147 -48.3125,12.1875 0,11.85417 0,23.70833 0,35.5625 17.7207,-10.62322 38.58707,-22.68911 59.8125,-16.25 13.04398,5.00743 16.63873,22.94986 8.66918,33.81085 -11.30773,19.951 -29.75582,34.2821 -44.49033,51.4383 -8.37949,9.1645 -18.35443,17.5352 -24.99135,27.8758 0,8.1146 0,16.2292 0,24.3438 35.57292,0 71.14583,0 106.71875,0 0,-9.8542 0,-19.7083 0,-29.5625 -20.85373,-0.1908 -41.71203,0.331 -62.5625,-0.1875 18.72263,-20.4224 40.27979,-39.0816 55.0625,-62.75 11.305666,-20.54355 8.686275,-50.04312 -10.9375,-64.4375 -10.92302,-8.6146 -25.15049,-12.36911 -38.96875,-12.03125 z"
id="path7243"
inkscape:connector-curvature="0"
style="" />
<path
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:1.16349924;stroke-opacity:1"
d="m -155.61282,936.62569 c -18.35737,0.048 -35.64676,6.5447 -52.28125,13.5 0,15.0834 0,30.1667 0,45.25 18.18309,-10.4957 37.97826,-24.6759 60.0625,-20.0624 13.23334,2.403 16.32048,21.2393 7.9375,30.37501 -14.06333,22.1049 -34.68279,38.4853 -51.72671,58.1017 -6.37015,6.5604 -13.70611,12.9672 -17.27329,21.4607 0,9.448 0,18.8959 0,28.3438 38.23958,0 76.47917,0 114.718752,0 0,-12.5 0,-25 0,-37.5 -19.144232,-0.341 -38.293232,0.1821 -57.437502,-0.125 18.7872,-20.259 41.09596,-38.8741 52.906252,-64.4375 8.900061,-22.73901 2.040917,-52.61991 -19.875002,-65.18751 -10.99187,-6.9728 -24.10026,-10.0645 -37.03125,-9.7188 z"
id="path7243-3"
inkscape:connector-curvature="0" />
</g>
</g>
<g
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
id="g12221"
transform="matrix(0.95511441,0,0,0.95385727,308.812,51.838406)">
<g
id="g12223"
transform="matrix(0.68786515,0,0,0.68786515,161.92514,215.41774)"
style="">
<path
inkscape:connector-curvature="0"
id="path12225"
d="m -154.78125,940.90625 c -16.83367,0.0841 -32.94231,5.79147 -48.3125,12.1875 0,11.85417 0,23.70833 0,35.5625 17.7207,-10.62322 38.58707,-22.68911 59.8125,-16.25 13.04398,5.00743 16.63873,22.94986 8.66918,33.81085 -11.30773,19.951 -29.75582,34.2821 -44.49033,51.4383 -8.37949,9.1645 -18.35443,17.5352 -24.99135,27.8758 0,8.1146 0,16.2292 0,24.3438 35.57292,0 71.14583,0 106.71875,0 0,-9.8542 0,-19.7083 0,-29.5625 -20.85373,-0.1908 -41.71203,0.331 -62.5625,-0.1875 18.72263,-20.4224 40.27979,-39.0816 55.0625,-62.75 11.305666,-20.54355 8.686275,-50.04312 -10.9375,-64.4375 -10.92302,-8.6146 -25.15049,-12.36911 -38.96875,-12.03125 z"
style="" />
<path
inkscape:connector-curvature="0"
id="path12227"
d="m -155.61282,936.62569 c -18.35737,0.048 -35.64676,6.5447 -52.28125,13.5 0,15.0834 0,30.1667 0,45.25 18.18309,-10.4957 37.97826,-24.6759 60.0625,-20.0624 13.23334,2.403 16.32048,21.2393 7.9375,30.37501 -14.06333,22.1049 -34.68279,38.4853 -51.72671,58.1017 -6.37015,6.5604 -13.70611,12.9672 -17.27329,21.4607 0,9.448 0,18.8959 0,28.3438 38.23958,0 76.47917,0 114.718752,0 0,-12.5 0,-25 0,-37.5 -19.144232,-0.341 -38.293232,0.1821 -57.437502,-0.125 18.7872,-20.259 41.09596,-38.8741 52.906252,-64.4375 8.900061,-22.73901 2.040917,-52.61991 -19.875002,-65.18751 -10.99187,-6.9728 -24.10026,-10.0645 -37.03125,-9.7188 z"
style="font-style:normal;font-weight:normal;font-size:110.7744751px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:none;stroke:#000000;stroke-width:1.16349924;stroke-opacity:1" />
</g>
</g>
<rect
y="965.94965"
x="302.44888"
height="19.519009"
width="19.544735"
id="rect12229"
style="display:inline;fill:#000000;fill-opacity:1;stroke:none" />
<rect
style="display:inline;fill:none;stroke:#000000;stroke-width:1.11054337;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect12231"
width="24.647095"
height="24.614655"
x="299.89771"
y="963.40186" />
</g>
<rect
y="992.5824"
x="346.09998"
height="54.969776"
width="373.92401"
id="rect9140"
style="fill:#009100;fill-opacity:1;stroke:none" />
<text
sodipodi:linespacing="125%"
id="text8636-8-3-41-8-8-3-1-7-0-2"
y="1221.6985"
x="49.664951"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24.44179535px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
xml:space="preserve"
transform="scale(0.99979574,1.0002043)"><tspan
y="1221.6985"
x="49.664951"
id="tspan8638-9-0-6-09-8-3-2-1-3-6"
sodipodi:role="line">Copyright (C) OpenTX www.open-tx.org</tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Vrstva"
style="display:inline"
transform="translate(0,290)">
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="rect9140-2-4-2"
d="m 78.807562,150.66824 43.329348,0 10.20977,25.6073 -10.20977,25.6075 -43.329348,0 z"
style="fill:#e5201e;fill-opacity:1;stroke:none" />
<g
transform="matrix(1.1462245,0,0,1.146693,-282.4675,-1143.4763)"
id="g4285">
<path
d="m 322.76938,1149.8874 13.1654,0 0,2.6087 -4.7361,0 0,10.7752 -3.68363,0 0,-10.7752 -4.74567,0 0,-2.6087"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
id="path7326-3-8"
inkscape:connector-curvature="0" />
<path
d="m 345.78969,1156.4405 4.95618,6.8308 -3.83672,0 -3.3392,-4.5719 -3.31049,4.5719 -3.85585,0 4.95617,-6.8308 -4.76482,-6.5531 3.84629,0 3.1287,4.3119 3.11913,-4.3119 3.86542,0 -4.76481,6.5531"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
id="path7328-5-2"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:10.44830608px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
x="320.66251"
y="1147.8616"
id="text7317-6-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan7319-0-7"
x="320.66251"
y="1147.8616">OPEN</tspan></text>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.37788773px;line-height:89.99999762%;font-family:Sans;-inkscape-font-specification:Sans;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
x="140.42691"
y="174.21489"
id="text3859-0-1"
sodipodi:linespacing="89.999998%"><tspan
sodipodi:role="line"
id="tspan3861-7-1"
x="140.42691"
y="174.21489">THE ULTIMATE</tspan><tspan
sodipodi:role="line"
x="140.42691"
y="198.85498"
id="tspan4223-9-4">TRANSMITTER</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:50.75551224px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
x="356.35379"
y="194.75381"
id="text3869-7-6"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3871-2-3"
x="356.35379"
y="194.75381">COMPANION</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

+23 -177
View File
@@ -1,4 +1,3 @@
#include <math.h>
#include "logsdialog.h"
#include "appdata.h"
#include "ui_logsdialog.h"
@@ -11,11 +10,7 @@
LogsDialog::LogsDialog(QWidget *parent) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::LogsDialog),
tracerMaxAlt(0),
cursorA(0),
cursorB(0),
cursorLine(0)
ui(new Ui::LogsDialog)
{
csvlog.clear();
@@ -83,7 +78,7 @@ LogsDialog::LogsDialog(QWidget *parent) :
// connect slot that ties some axis selections together (especially opposite axes):
connect(ui->customPlot, SIGNAL(selectionChangedByUser()), this, SLOT(selectionChanged()));
// connect slots that takes care that when an axis is selected, only that direction can be dragged and zoomed:
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress(QMouseEvent*)));
connect(ui->customPlot, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(mousePress()));
connect(ui->customPlot, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheel()));
// make left axes transfer its range to right axes:
@@ -229,7 +224,7 @@ QList<QStringList> LogsDialog::filterGePoints(const QList<QStringList> & input)
}
}
if (gpscol == 0) {
QMessageBox::critical(this, tr("Error: no GPS data not found"),
QMessageBox::critical(this, tr("Error: no GPS data not found"),
tr("The column containing GPS coordinates must be named \"GPS\".\n\n\
The columns for altitude \"GAlt\" and for speed \"GSpd\" are optional"));
return result;
@@ -244,17 +239,21 @@ The columns for altitude \"GAlt\" and for speed \"GSpd\" are optional"));
for (int i = 1; i < n; i++) {
if ((ui->logTable->item(i-1, 1)->isSelected() && rangeSelected) || !rangeSelected) {
GpsCoord coord = extractGpsCoordinates(input.at(i).at(gpscol));
QStringList latlon = extractLatLon(input.at(i).at(gpscol));
QString latitude = latlon[0];
QString longitude = latlon[1];
double flatitude = toDecimalCoordinate(latitude);
double flongitude = toDecimalCoordinate(longitude);
// glitch filter
if ( glitchFilter.isGlitch(coord) ) {
// qDebug() << "filterGePoints(): GPS glitch detected at" << i << coord.latitude << coord.longitude;
if ( glitchFilter.isGlitch(flatitude, flongitude) ) {
// qDebug() << "filterGePoints(): GPS glitch detected at" << i << flatitude << flongitude;
continue;
}
// lat long pair filter
if ( !latLonFilter.isValid(coord) ) {
// qDebug() << "filterGePoints(): Lat-Lon pair wrong, skipping at" << i << coord.latitude << coord.longitude;
if ( !latLonFilter.isValid(latitude, longitude) ) {
// qDebug() << "filterGePoints(): Lat-Lon pair wrong, skipping at" << i << latitude << longitude;
continue;
}
@@ -329,7 +328,7 @@ void LogsDialog::exportToGoogleEarth()
// declare additional fields
for (int i=0; i<dataPoints.at(0).count()-2; i++) {
if (ui->FieldsTW->item(i, 0) && ui->FieldsTW->item(i, 0)->isSelected() && !nondataCols.contains(i+2)) {
if (ui->FieldsTW->item(0,i)->isSelected() && !nondataCols.contains(i+2)) {
QString origName = dataPoints.at(0).at(i+2);
QString safeName = origName;
safeName.replace(" ","_");
@@ -359,12 +358,14 @@ void LogsDialog::exportToGoogleEarth()
}
// coordinate data points
outputStream.setRealNumberNotation(QTextStream::FixedNotation);
outputStream.setRealNumberPrecision(8);
for (int i=1; i<n; i++) {
GpsCoord coord = extractGpsCoordinates(dataPoints.at(i).at(gpscol));
QStringList latlon = extractLatLon(dataPoints.at(i).at(gpscol));
QString latitude = latlon[0];
QString longitude = latlon[1];
int altitude = altcol ? dataPoints.at(i).at(altcol).toFloat() : 0;
outputStream << "\t\t\t\t\t<gx:coord>" << coord.longitude << " " << coord.latitude << " " << altitude << " </gx:coord>\n" ;
latitude.sprintf("%3.8f", toDecimalCoordinate(latitude));
longitude.sprintf("%3.8f", toDecimalCoordinate(longitude));
outputStream << "\t\t\t\t\t<gx:coord>" << longitude << " " << latitude << " " << altitude << " </gx:coord>\n" ;
}
// additional data for data points
@@ -381,7 +382,7 @@ void LogsDialog::exportToGoogleEarth()
// add values for additional fields
for (int i=0; i<dataPoints.at(0).count()-2; i++) {
if (ui->FieldsTW->item(i, 0) && ui->FieldsTW->item(i, 0)->isSelected() && !nondataCols.contains(i+2)) {
if (ui->FieldsTW->item(0,i)->isSelected() && !nondataCols.contains(i+2)) {
QString safeName = dataPoints.at(0).at(i+2);;
safeName.replace(" ","_");
outputStream << "\t\t\t\t\t\t\t<gx:SimpleArrayData name=\""<< safeName <<"\">\n";
@@ -418,7 +419,7 @@ void LogsDialog::on_mapsButton_clicked()
ui->logTable->setDisabled(false);
}
void LogsDialog::mousePress(QMouseEvent * event)
void LogsDialog::mousePress()
{
// if an axis is selected, only allow the direction of that axis to be dragged
// if no axis is selected, both directions may be dragged
@@ -429,74 +430,6 @@ void LogsDialog::mousePress(QMouseEvent * event)
axisRect->setRangeDrag(axisRect->axis(QCPAxis::atLeft)->orientation());
else
axisRect->setRangeDrag(Qt::Horizontal | Qt::Vertical);
if (event->button() == Qt::RightButton) {
double x = axisRect->axis(QCPAxis::atBottom)->pixelToCoord(event->pos().x());
placeCursor(x, event->modifiers() & Qt::ShiftModifier);
}
}
void LogsDialog::placeCursor(double x, bool second)
{
QCPItemTracer * cursor = second ? cursorB : cursorA;
if (cursor) {
cursor->setGraphKey(x);
cursor->updatePosition();
cursor->setVisible(true);
}
if (cursorA && cursorB) {
updateCursorsLabel();
}
}
void LogsDialog::updateCursorsLabel()
{
QString text = QString("Max Altitude: %1 m\n").arg(tracerMaxAlt->position->value(), 0, 'f', 1);
if (cursorA->visible() ) {
text += tr("Cursor A: %1 m").arg(cursorA->position->value(), 0, 'f', 1) + "\n";
}
if (cursorB->visible() ) {
text += tr("Cursor B: %1 m").arg(cursorB->position->value(), 0, 'f', 1) + "\n";
}
if (cursorA->visible() && cursorB->visible()) {
cursorLine->setVisible(true);
// calc deltas
double deltaX = cursorB->position->key() - cursorA->position->key();
double deltaY = cursorB->position->value() - cursorA->position->value();
double slope = 0;
if (deltaX != 0) {
slope = deltaY / deltaX;
}
qDebug() << "Cursors: dt:" << formatTimeDelta(deltaX) << "dy:" << deltaY << "rate:" << slope;
text += tr("Time delta: %1").arg(formatTimeDelta(deltaX)) + "\n";
text += tr("Climb rate: %1 m/s").arg(slope, 0, 'f', fabs(slope)<1.0 ? 2 : 1) + "\n";
}
ui->labelCursors->setText(text);
}
QString LogsDialog::formatTimeDelta(double timeDelta)
{
if (abs(int(timeDelta)) < 10) {
return QString("%1 s").arg(timeDelta, 1, 'f', 1);
}
int seconds = (int)round(abs(timeDelta));
int hours = seconds / 3600;
seconds %= 3600;
int minutes = seconds / 60;
seconds %= 60;
if (hours) {
return QString("%1h:%2:%3").arg(hours).arg(minutes, 2, 10, QChar('0')).arg(seconds, 2, 10, QChar('0'));
}
else if (minutes) {
return QString("%1m:%2").arg(minutes).arg(seconds, 2, 10, QChar('0'));
}
else {
return QString("%1 s").arg(seconds);
}
}
void LogsDialog::mouseWheel()
@@ -520,7 +453,6 @@ void LogsDialog::mouseWheel()
void LogsDialog::removeAllGraphs()
{
ui->customPlot->clearGraphs();
ui->customPlot->clearItems();
ui->customPlot->legend->setVisible(false);
rightLegend->clearItems();
rightLegend->setVisible(false);
@@ -534,11 +466,6 @@ void LogsDialog::removeAllGraphs()
axisRect->axis(QCPAxis::atRight, 1)->setSelectedParts(QCPAxis::spNone);
axisRect->axis(QCPAxis::atBottom)->setSelectedParts(QCPAxis::spNone);
ui->customPlot->replot();
tracerMaxAlt = 0;
cursorA = 0;
cursorB = 0;
cursorLine = 0;
ui->labelCursors->setText("");
}
void LogsDialog::on_fileOpen_BT_clicked()
@@ -558,7 +485,7 @@ void LogsDialog::on_fileOpen_BT_clicked()
ui->logTable->setSelectionBehavior(QAbstractItemView::SelectRows);
for (int i=2; i<csvlog.at(0).count(); i++) {
QTableWidgetItem* item= new QTableWidgetItem(csvlog.at(0).at(i));
ui->FieldsTW->setItem(i-2, 0, item);
ui->FieldsTW->setItem(0,i-2,item);
}
ui->FieldsTW->resizeRowsToContents();
ui->logTable->setColumnCount(csvlog.at(0).count());
@@ -681,7 +608,7 @@ void LogsDialog::setFlightSessions()
QDateTime lastvalue;
for (int i = 1; i < n; i++) {
QDateTime tmp = getRecordTimeStamp(i);
if (!lastvalue.isValid() || lastvalue.secsTo(tmp) > 60) {
if (lastvalue.secsTo(tmp) > 60) {
sessions.push_back(i-1);
// qDebug() << "session index" << i-1;
}
@@ -977,17 +904,6 @@ void LogsDialog::plotLogs()
plots.coords.at(i).y);
pen.setColor(colors.at(i % colors.size()));
ui->customPlot->graph(i)->setPen(pen);
if (!tracerMaxAlt && (plots.coords.at(i).name.endsWith("(m)") ||
plots.coords.at(i).name.endsWith(" Alt") ||
plots.coords.at(i).name.endsWith("(ft)"))) {
addMaxAltitudeMarker(plots.coords.at(i), ui->customPlot->graph(i));
countNumberOfThrows(plots.coords.at(i), ui->customPlot->graph(i));
addCursor(&cursorA, ui->customPlot->graph(i), Qt::blue);
addCursor(&cursorB, ui->customPlot->graph(i), Qt::red);
addCursorLine(&cursorLine, ui->customPlot->graph(i), Qt::black);
updateCursorsLabel();
}
}
ui->customPlot->legend->setVisible(true);
@@ -1035,73 +951,3 @@ void LogsDialog::yAxisChangeRanges(QCPRange range)
yAxesRanges[firstLeft].max = range.upper;
}
}
void LogsDialog::addMaxAltitudeMarker(const coords & c, QCPGraph * graph) {
// find max altitude
int positionIndex = 0;
double maxAlt = -100000;
for(int i=0; i<c.x.count(); ++i) {
double alt = c.y.at(i);
if (alt > maxAlt) {
maxAlt = alt;
positionIndex = i;
// qDebug() << "max alt: " << maxAlt << "@" << result;
}
}
// qDebug() << "max alt: " << maxAlt << "@" << positionIndex;
// add max altitude marker
tracerMaxAlt = new QCPItemTracer(ui->customPlot);
ui->customPlot->addItem(tracerMaxAlt);
tracerMaxAlt->setGraph(graph);
tracerMaxAlt->setInterpolating(true);
tracerMaxAlt->setStyle(QCPItemTracer::tsSquare);
tracerMaxAlt->setPen(QPen(Qt::blue));
tracerMaxAlt->setBrush(Qt::NoBrush);
tracerMaxAlt->setSize(7);
tracerMaxAlt->setGraphKey(c.x.at(positionIndex));
tracerMaxAlt->updatePosition();
}
void LogsDialog::countNumberOfThrows(const coords & c, QCPGraph * graph)
{
#if 0
// find all launches
// TODO
double startTime = c.x.at(0);
for(int i=0; i<c.x.count(); ++i) {
double alt = c.y.at(i);
double time = c.x.at(i);
}
#endif
}
void LogsDialog::addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color) {
QCPItemTracer * c = new QCPItemTracer(ui->customPlot);
ui->customPlot->addItem(c);
c->setGraph(graph);
c->setInterpolating(false);
c->setStyle(QCPItemTracer::tsCrosshair);
QPen pen(color);
pen.setStyle(Qt::DashLine);
c->setPen(pen);
c->setBrush(color);
c->setSize(7);
c->setVisible(false);
*cursor = c;
}
void LogsDialog::addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color) {
QCPItemStraightLine * l = new QCPItemStraightLine(ui->customPlot);
ui->customPlot->addItem(l);
l->point1->setParentAnchor(cursorA->position);
l->point2->setParentAnchor(cursorB->position);
QPen pen(color);
pen.setStyle(Qt::DashLine);
l->setPen(pen);
l->setVisible(false);
*line = l;
}
+1 -15
View File
@@ -53,7 +53,7 @@ private slots:
void axisLabelDoubleClick(QCPAxis* axis, QCPAxis::SelectablePart part);
void legendDoubleClick(QCPLegend* legend, QCPAbstractLegendItem* item);
void selectionChanged();
void mousePress(QMouseEvent * event);
void mousePress();
void mouseWheel();
void removeAllGraphs();
void plotLogs();
@@ -76,11 +76,6 @@ private:
double yAxesRatios[AXES_LIMIT];
minMax yAxesRanges[AXES_LIMIT];
QCPItemTracer * tracerMaxAlt;
QCPItemTracer * cursorA;
QCPItemTracer * cursorB;
QCPItemStraightLine * cursorLine;
bool cvsFileParse();
QList<QStringList> filterGePoints(const QList<QStringList> & input);
void exportToGoogleEarth();
@@ -88,15 +83,6 @@ private:
QString generateDuration(const QDateTime & start, const QDateTime & end);
void setFlightSessions();
void addMaxAltitudeMarker(const coords & c, QCPGraph * graph);
void countNumberOfThrows(const coords & c, QCPGraph * graph);
void addCursor(QCPItemTracer ** cursor, QCPGraph * graph, const QColor & color);
void addCursorLine(QCPItemStraightLine ** line, QCPGraph * graph, const QColor & color);
void placeCursor(double x, bool second);
QString formatTimeDelta(double timeDelta);
void updateCursorsLabel();
};
#endif // _LOGSDIALOG_H_
+129 -159
View File
@@ -16,78 +16,32 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0">
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,0,0,0,0,0,0">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label">
<property name="text">
<string>Fly sessions</string>
<string>Filename</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="sessions_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QLineEdit" name="FileName_LE">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QPushButton" name="fileOpen_BT">
<property name="text">
<string>Open LogFile</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" rowspan="12">
<widget class="QTableWidget" name="FieldsTW">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="autoScrollMargin">
<number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frame_2">
<property name="sizePolicy">
@@ -173,7 +127,121 @@
</item>
</layout>
</item>
<item row="13" column="0">
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Fly sessions</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="sessions_CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="1" rowspan="4">
<widget class="QTableWidget" name="logTable">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>18</number>
</attribute>
<attribute name="verticalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="1" column="0" rowspan="6">
<widget class="QTableWidget" name="FieldsTW">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="autoScrollMargin">
<number>0</number>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>false</bool>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="7" column="0">
<widget class="QPushButton" name="mapsButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
@@ -208,106 +276,6 @@
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="FileName_LE">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fileOpen_BT">
<property name="text">
<string>Open LogFile</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="1" rowspan="8">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="5,1">
<item>
<widget class="QTableWidget" name="logTable">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<property name="columnCount">
<number>0</number>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>18</number>
</attribute>
<attribute name="verticalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<widget class="QLabel" name="labelCursors">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
@@ -321,12 +289,14 @@
</customwidgets>
<tabstops>
<tabstop>FileName_LE</tabstop>
<tabstop>fileOpen_BT</tabstop>
<tabstop>FieldsTW</tabstop>
<tabstop>mapsButton</tabstop>
<tabstop>ZoomX_ChkB</tabstop>
<tabstop>ZoomY_ChkB</tabstop>
<tabstop>Reset_PB</tabstop>
<tabstop>sessions_CB</tabstop>
<tabstop>logTable</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+11 -46
View File
@@ -360,25 +360,16 @@ void MainWindow::firmwareDownloadAccepted()
int errnum = hline.mid(6).toInt();
switch(errnum) {
case 1:
errormsg = tr("Not enough flash available on this board for all the selected options");
errormsg = tr("Not enough memory for all the selected firmware options");
break;
case 2:
errormsg = tr("Compilation server temporary failure, try later");
errormsg = tr("Compilation server termporary failure, try later");
break;
case 3:
errormsg = tr("Compilation server too busy, try later");
break;
case 4:
errormsg = tr("Compilation error");
break;
case 5:
errormsg = tr("Invalid firmware");
break;
case 6:
errormsg = tr("Invalid board");
break;
case 7:
errormsg = tr("Invalid language");
errormsg = tr("Compilation server requires registration, please check OpenTX web site");
break;
default:
errormsg = tr("Unknown server failure, try later");
@@ -502,7 +493,6 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
}
}
else if (download == true) {
firmwareVersionString = versionString;
startFirmwareDownload();
}
@@ -920,38 +910,15 @@ void MainWindow::about()
void MainWindow::updateMenus()
{
bool hasMdiChild = (activeMdiChild() != 0);
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
if(GetCurrentFirmware()->getBoard() == BOARD_HORUS) {
newAct->setEnabled(false);
openAct->setEnabled(false);
saveAct->setEnabled(false);
saveAsAct->setEnabled(false);
writeEepromAct->setEnabled(false);
readEepromAct->setEnabled(false);
writeBackupToRadioAct->setEnabled(false);
readBackupToFileAct->setEnabled(false);
cutAct->setEnabled(false);
copyAct->setEnabled(false);
pasteAct->setEnabled(false);
for (int i=0; i<MAX_RECENT; ++i)
recentFileActs[i]->setEnabled(false);
} else {
newAct->setEnabled(true);
openAct->setEnabled(true);
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
cutAct->setEnabled(hasSelection);
copyAct->setEnabled(hasSelection);
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
writeEepromAct->setEnabled(hasMdiChild);
readEepromAct->setEnabled(true);
writeBackupToRadioAct->setEnabled(true);
readBackupToFileAct->setEnabled(true);
for (int i=0; i<MAX_RECENT; ++i)
recentFileActs[i]->setEnabled(true);
}
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
writeEepromAct->setEnabled(hasMdiChild);
separatorAct->setVisible(hasMdiChild);
bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection());
cutAct->setEnabled(hasSelection);
copyAct->setEnabled(hasSelection);
simulateAct->setEnabled(hasSelection);
printAct->setEnabled(hasSelection);
loadbackupAct->setEnabled(hasMdiChild);
@@ -1471,8 +1438,6 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
void MainWindow::dropEvent(QDropEvent *event)
{
if(GetCurrentFirmware()->getBoard()== BOARD_HORUS)
return;
QList<QUrl> urls = event->mimeData()->urls();
if (urls.isEmpty())
return;
+9 -9
View File
@@ -1,14 +1,13 @@
#include "channels.h"
#include "helpers.h"
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt):
LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt):
firmware(firmware),
spinbox(new QDoubleSpinBox()),
value(value),
displayStep(0.1)
{
BoardEnum board = firmware->getBoard();
bool allowGVars = (IS_TARANIS(board) || IS_HORUS(board));
bool allowGVars = false;
int internalStep = 1;
spinbox->setProperty("index", row);
@@ -25,13 +24,14 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row
spinbox->setSuffix("%");
}
if (IS_TARANIS(board) || deflt == 0 /*it's the offset*/) {
if (IS_TARANIS(firmware->getBoard()) || deflt == 0 /*it's the offset*/) {
spinbox->setDecimals(1);
allowGVars = true;
}
else {
internalStep *= 10;
}
spinbox->setSingleStep(displayStep*internalStep);
spinbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
@@ -44,7 +44,7 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row
horizontalLayout->addWidget(cb);
horizontalLayout->addWidget(spinbox);
tableLayout->addLayout(row, col, horizontalLayout);
gvarGroup = new GVarGroup(gv, spinbox, cb, value, model, deflt, min, max, displayStep, allowGVars);
gvarGroup = new GVarGroup(gv, spinbox, cb, value, deflt, min, max, displayStep, allowGVars);
}
LimitsGroup::~LimitsGroup()
@@ -113,13 +113,13 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
}
// Channel offset
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, model, -1000, 1000, 0);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].offset, -1000, 1000, 0);
// Channel min
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, model, -model.getChannelsMax()*10, 0, -1000);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].min, -model.getChannelsMax()*10, 0, -1000);
// Channel max
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, model, 0, model.getChannelsMax()*10, 1000);
limitsGroups << new LimitsGroup(firmware, tableLayout, i, col++, model.limitData[i].max, 0, model.getChannelsMax()*10, 1000);
// Channel inversion
QComboBox * invCB = new QComboBox(this);
+1 -1
View File
@@ -9,7 +9,7 @@ class GVarGroup;
class LimitsGroup
{
public:
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, const ModelData & model, int min, int max, int deflt);
LimitsGroup(Firmware * firmware, TableLayout *tableLayout, int row, int col, int & value, int min, int max, int deflt);
~LimitsGroup();
void updateMinMax(int max);
+9 -8
View File
@@ -134,7 +134,7 @@ Curves::Curves(QWidget * parent, ModelData & model, GeneralSettings & generalSet
if (i<limit) {
ui->curvesLayout->addWidget(edit, i, 1, 1, 1);
} else {
ui->curvesLayout2->addWidget(edit, i-limit, 2, 1, 1);
ui->curvesLayout2->addWidget(edit, i-limit, 1, 1, 1);
}
// The curve plot checkbox
@@ -145,7 +145,7 @@ Curves::Curves(QWidget * parent, ModelData & model, GeneralSettings & generalSet
if (i<limit) {
ui->curvesLayout->addWidget(plot, i, 2, 1, 1);
} else {
ui->curvesLayout2->addWidget(plot, i-limit, 1, 1, 1);
ui->curvesLayout2->addWidget(plot, i-limit, 2, 1, 1);
}
}
QSpacerItem * item = new QSpacerItem(1,1, QSizePolicy::Fixed, QSizePolicy::Expanding);
@@ -498,8 +498,9 @@ void Curves::resizeEvent(QResizeEvent *event)
ModelPanel::resizeEvent(event);
}
void Curves::on_curveType_currentIndexChanged(int index)
void Curves::on_curveType_currentIndexChanged()
{
int index = ui->curveType->currentIndex();
unsigned int flags = templates[index].flags;
ui->curveCoeffLabel->setVisible(flags & CURVE_COEFF_ENABLE);
ui->curveCoeff->setVisible(flags & CURVE_COEFF_ENABLE);
@@ -570,13 +571,13 @@ void Curves::ShowContextMenu(const QPoint& pos) // this is a slot
QAction *action;
action = myMenu.addAction(CompanionIcon("copy.png"),tr("Copy"));
action->setProperty("index", CURVE_COPY);
action = myMenu.addAction(CompanionIcon("paste.png"),tr("Paste"));
if (!mimeData->hasFormat("application/x-companion-curve-item")) {
action->setEnabled(false);
}
action->setProperty("index", CURVE_PASTE);
action = myMenu.addAction(CompanionIcon("clear.png"),tr("Clear"));
action->setProperty("index", CURVE_RESET);
action = myMenu.addAction(CompanionIcon("clear.png"),tr("Clear all curves"));
@@ -591,14 +592,14 @@ void Curves::ShowContextMenu(const QPoint& pos) // this is a slot
curveData.append((char*)&model->curves[index], sizeof(CurveData));
mimeData2->setData("application/x-companion-curve-item", curveData);
QApplication::clipboard()->setMimeData(mimeData2, QClipboard::Clipboard);
}
}
else if (action==CURVE_PASTE) {
QByteArray curveData = mimeData->data("application/x-companion-curve-item");
CurveData *curve = &model->curves[index];
memcpy(curve, curveData.constData(), sizeof(CurveData));
update();
emit modified();
}
}
else if (action==CURVE_RESET) {
int res = QMessageBox::question(this, "companion", tr("Are you sure you want to reset curve %1?").arg(index+1), QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::Yes) {
@@ -606,7 +607,7 @@ void Curves::ShowContextMenu(const QPoint& pos) // this is a slot
update();
emit modified();
}
}
}
else if (action==CURVE_RESETALL) {
int res = QMessageBox::question(this, "companion", tr("Are you sure you want to reset all curves?"), QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::Yes) {
+1 -1
View File
@@ -45,7 +45,7 @@ class Curves : public ModelPanel
void onNodeMoved(int x, int y);
void onNodeFocus();
void onNodeUnfocus();
void on_curveType_currentIndexChanged(int index);
void on_curveType_currentIndexChanged();
void on_curveApply_clicked();
protected:
+2 -2
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>672</width>
<width>624</width>
<height>539</height>
</rect>
</property>
@@ -20,7 +20,7 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_1">
<property name="rightMargin">
<number>0</number>
<number>10</number>
</property>
<item>
<widget class="QGraphicsView" name="curvePreview">
+1 -1
View File
@@ -397,7 +397,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
else if (func>=FuncSetTimer1 && func<=FuncSetTimer3) {
if (modified) cfn.param = QTimeS(fswtchParamTime[i]->time()).seconds();
fswtchParamTime[i]->setMinimumTime(QTime(0, 0, 0));
fswtchParamTime[i]->setMaximumTime(firmware->getMaxTimerStart());
fswtchParamTime[i]->setMaximumTime(QTime(0, 59, 59));
fswtchParamTime[i]->setTime(QTimeS(cfn.param));
widgetsMask |= CUSTOM_FUNCTION_TIME_PARAM + CUSTOM_FUNCTION_ENABLE;
}
+2
View File
@@ -46,6 +46,8 @@
#include <math.h>
static const double Pi = 3.14159265358979323846264338327950288419717;
Edge::Edge(Node *sourceNode, Node *destNode)
: arrowSize(10)
{
+4 -4
View File
@@ -21,11 +21,11 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
QRegExp rx(CHAR_FOR_NAMES_REGEX);
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, -100, 100);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, model, 0, -100, 100);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, -100, 100);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, ed->offset, 0, -100, 100);
}
else {
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, model, 100, 0, 100);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, 0, 100);
gvOffsetGroup = NULL;
ui->offsetLabel->hide();
ui->offsetGV->hide();
@@ -33,7 +33,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
ui->offsetCB->hide();
}
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve, model,
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve,
firmware->getCapability(HasInputDiff) ? 0 : (HIDE_DIFF | HIDE_NEGATIVE_CURVES));
populateSwitchCB(ui->switchesCB, ed->swtch, generalSettings, MixesContext);
+19 -49
View File
@@ -107,14 +107,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
reLayout->addWidget(label, i, 0, 1, 1);
if (phaseIdx > 0) {
// RE link to another RE
reUse[i] = new QComboBox(ui->reGB);
reUse[i]->setProperty("index", i);
populateGvarUseCB(reUse[i], phaseIdx);
QComboBox *link = new QComboBox(ui->gvGB);
link->setProperty("index", i);
populateGvarUseCB(link, phaseIdx);
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
if (phase.rotaryEncoders[i] > 1024) {
reUse[i]->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
link->setCurrentIndex(phase.rotaryEncoders[i] - 1024);
}
connect(reUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int)));
reLayout->addWidget(reUse[i], i, 1, 1, 1);
reLayout->addWidget(link, i, 1, 1, 1);
}
// RE value
reValues[i] = new QSpinBox(ui->reGB);
@@ -149,14 +149,14 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
}
if (phaseIdx > 0) {
// GVar link to another GVar
gvUse[i] = new QComboBox(ui->gvGB);
gvUse[i]->setProperty("index", i);
populateGvarUseCB(gvUse[i], phaseIdx);
QComboBox *link = new QComboBox(ui->gvGB);
link->setProperty("index", i);
populateGvarUseCB(link, phaseIdx);
if (phase.gvars[i] > 1024) {
gvUse[i]->setCurrentIndex(phase.gvars[i] - 1024);
link->setCurrentIndex(phase.gvars[i] - 1024);
}
connect(gvUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
gvLayout->addWidget(gvUse[i], i, col++, 1, 1);
connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int)));
gvLayout->addWidget(link, i, col++, 1, 1);
}
// GVar value
gvValues[i] = new QSpinBox(ui->gvGB);
@@ -229,9 +229,8 @@ void FlightModePanel::update()
int idx = phase.rotaryEncoders[i];
FlightModeData *phasere = &phase;
while (idx > 1024) {
int nextPhase = idx - 1025;
if (nextPhase >= phaseIdx) nextPhase += 1;
phasere = &model->flightModeData[nextPhase];
idx -= 1025;
phasere = &model->flightModeData[idx];
idx = phasere->rotaryEncoders[i];
reValues[i]->setDisabled(true);
}
@@ -249,11 +248,9 @@ void FlightModePanel::phaseName_editingFinished()
void FlightModePanel::phaseSwitch_currentIndexChanged(int index)
{
if (!lock) {
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
phase.swtch = RawSwitch(comboBox->itemData(index).toInt());
emit modified();
}
}
void FlightModePanel::phaseFadeIn_editingFinished()
@@ -290,14 +287,8 @@ void FlightModePanel::trimUpdate(unsigned int trim)
trimsUse[trim]->setCurrentIndex(1 + 2*phase.trimRef[chn] + phase.trimMode[chn] - (phase.trimRef[chn] > phaseIdx ? 1 : 0));
else
trimsUse[trim]->setCurrentIndex(phase.trimRef[chn]);
if (phaseIdx == 0 || phase.trimRef[chn] == phaseIdx || (IS_TARANIS(board) && phase.trimMode[chn] != 0)) {
trimsValue[trim]->setEnabled(true);
trimsSlider[trim]->setEnabled(true);
}
else {
trimsValue[trim]->setEnabled(false);
trimsSlider[trim]->setEnabled(false);
}
trimsValue[trim]->setEnabled(true);
trimsSlider[trim]->setEnabled(true);
}
lock = false;
}
@@ -346,7 +337,6 @@ void FlightModePanel::phaseGVPopupToggled(bool checked)
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
int gvar = cb->property("index").toInt();
model->gvars_popups[gvar] = checked;
emit modified();
}
void FlightModePanel::phaseREValue_editingFinished()
@@ -449,29 +439,9 @@ void FlightModePanel::fmClear()
{
int res = QMessageBox::question(this, "Companion", tr("Clear all current Flight Mode properties?"), QMessageBox::Yes | QMessageBox::No);
if (res == QMessageBox::Yes) {
phase.clear(phaseIdx);
if (phaseIdx == 0) {
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
for (int i=0; i < gvCount; ++i) {
memset(&model->gvars_names[i], 0, sizeof(model->gvars_names[i]));
model->gvars_popups[i] = 0;
}
}
}
else {
lock = true;
QComboBox * pswtch = ui->swtch;
RawSwitch item = RawSwitch(SWITCH_TYPE_NONE);
pswtch->setCurrentIndex(pswtch->findText(item.toString()));
if (gvCount > 0 && (firmware->getCapability(GvarsFlightModes))) {
for (int i=0; i<gvCount; i++) {
gvUse[i]->setCurrentIndex((phase.gvars[i] > 1024 ? (phase.gvars[i] - 1024) : 0));
}
}
for (int i=0; i<reCount; i++) {
reUse[i]->setCurrentIndex((phase.rotaryEncoders[i] > 1024 ? (phase.rotaryEncoders[i] - 1024) : 0));
}
lock = false;
phase.clear();
for(int i=0; i < 4; ++i) {
model->setTrimValue(phaseIdx, i, 0);
}
update();
emit modified();
-2
View File
@@ -48,9 +48,7 @@ class FlightModePanel : public ModelPanel
QLineEdit * gvNames[C9X_MAX_GVARS];
QSpinBox * gvValues[C9X_MAX_GVARS];
QCheckBox * gvPopups[C9X_MAX_GVARS];
QComboBox * gvUse[C9X_MAX_GVARS];
QSpinBox * reValues[C9X_MAX_ENCODERS];
QComboBox * reUse[C9X_MAX_ENCODERS];
QVector<QComboBox *> trimsUse;
QVector<QSpinBox *> trimsValue;
QVector<QSlider *> trimsSlider;
+3 -3
View File
@@ -48,11 +48,11 @@ void HeliPanel::update()
lock = true;
ui->swashType->setCurrentIndex(model->swashRingData.type);
populateSourceCB(ui->swashCollectiveSource, model->swashRingData.collectiveSource, generalSettings, model, POPULATE_NONE | POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
populateSourceCB(ui->swashCollectiveSource, model->swashRingData.collectiveSource, generalSettings, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashRingVal->setValue(model->swashRingData.value);
if (firmware->getCapability(VirtualInputs)) {
populateSourceCB(ui->swashElevatorSource, model->swashRingData.elevatorSource, generalSettings, model, POPULATE_NONE | POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
populateSourceCB(ui->swashAileronSource, model->swashRingData.aileronSource, generalSettings, model, POPULATE_NONE | POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
populateSourceCB(ui->swashElevatorSource, model->swashRingData.elevatorSource, generalSettings, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
populateSourceCB(ui->swashAileronSource, model->swashRingData.aileronSource, generalSettings, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->swashElevatorWeight->setValue(model->swashRingData.elevatorWeight);
ui->swashAileronWeight->setValue(model->swashRingData.aileronWeight);
ui->swashCollectiveWeight->setValue(model->swashRingData.collectiveWeight);
+8 -15
View File
@@ -17,7 +17,7 @@ InputsPanel::InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & g
QPushButton * qbUp = new QPushButton(this);
QPushButton * qbDown = new QPushButton(this);
QPushButton * qbClear = new QPushButton(this);
qbUp->setText(tr("Move Up"));
qbUp->setIcon(CompanionIcon("moveup.png"));
qbUp->setShortcut(QKeySequence(tr("Ctrl+Up")));
@@ -89,14 +89,14 @@ void InputsPanel::update()
@note Input lines are now HTML formated because they use same widget as mixers.
@param[in] dest defines which input line to create.
@param[in] dest defines which input line to create.
If dest < 0 then create empty input slot for input -dest ( dest=-6 -> Input05)
if dest >=0 then create used input based on model input data from slot dest (dest=4 -> model expoData[4])
@retval true created input number is different from the previous list item
false created input number is the same as previous list item
*/
bool InputsPanel::AddInputLine(int dest)
bool InputsPanel::AddInputLine(int dest)
{
bool new_ch;
QString str = getInputText(dest, &new_ch);
@@ -107,11 +107,11 @@ bool InputsPanel::AddInputLine(int dest)
ExpoData *md = &model->expoData[dest];
qba.append((const char*)md, sizeof(ExpoData));
}
itm->setData(Qt::UserRole, qba);
itm->setData(Qt::UserRole, qba);
#if MIX_ROW_HEIGHT_INCREASE > 0
if (new_ch && !firstLine) {
//increase size of this row
itm->setData(GroupHeaderRole, 1);
itm->setData(GroupHeaderRole, 1);
}
#endif
ExposlistWidget->addItem(itm);
@@ -124,11 +124,11 @@ bool InputsPanel::AddInputLine(int dest)
/**
@brief Returns HTML formated input representation
@param[in] dest defines which input line to create.
@param[in] dest defines which input line to create.
If dest < 0 then create empty input slot for input -dest ( dest=-6 -> Input05)
if dest >=0 then create used input based on model input data from slot dest (dest=4 -> model expoData[4])
@retval string input line in HTML
@retval string input line in HTML
*/
QString InputsPanel::getInputText(int dest, bool * new_ch)
{
@@ -281,17 +281,10 @@ void InputsPanel::exposCopy()
QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard);
}
void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction action)
void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction /*action*/)
{
int idx = ExposlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0);
if (action==Qt::CopyAction) {
pasteExpoMimeData(data, idx);
}
else if (action==Qt::MoveAction) {
QList<int> list = createExpoListFromSelected();
exposDeleteList(list);
pasteExpoMimeData(data, idx);
}
}
void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx)
+3 -3
View File
@@ -25,10 +25,10 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
int limit = firmware->getCapability(OffsetWeight);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, model, 100, -limit, limit);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, model, 0, -limit, limit);
gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, 100, -limit, limit);
gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, 0, -limit, limit);
curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB,
md->curve, model, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
md->curve, firmware->getCapability(HasMixerExpo) ? 0 : HIDE_EXPO);
ui->MixDR_CB->setChecked(md->noExpo == 0);
+6 -18
View File
@@ -26,24 +26,12 @@ QStringList MixersList::mimeTypes () const
{
QStringList types;
if (expo) types << "application/x-companion-expo-item";
else types << "application/x-companion-mix-item";
else types << "application/x-companion-mix-item";
return types;
}
void MixersList::dropEvent(QDropEvent *event)
{
QList<int> list;
foreach(QListWidgetItem *item, selectedItems()) {
int idx= item->data(Qt::UserRole).toByteArray().at(0);
if(idx >= 0) list << idx;
}
if (list.count()<1) return;
event->acceptProposedAction();
dropMimeData(indexAt(event->pos()).row(),event->mimeData(),event->dropAction());
}
bool MixersList::dropMimeData( int index, const QMimeData * data, Qt::DropAction action )
{
{
// qDebug() << "MixersList::dropMimeData() index:" << index << "formats" << data->formats();
QByteArray dropData = data->data(expo ? "application/x-companion-expo-item" : "application/x-companion-mix-item");
if (dropData.isNull() ) return false;
@@ -64,7 +52,7 @@ bool MixersList::dropMimeData( int index, const QMimeData * data, Qt::DropAction
QMimeData *mimeData = new QMimeData;
mimeData->setData(expo ? "application/x-companion-expo" : "application/x-companion-mix", qba);
emit mimeDropped(index, mimeData, action);
delete mimeData; //is this correct? is mimeData freed elswere??
delete mimeData; //is this correct? is mimeData freed elswere??
}
return true;
@@ -117,7 +105,7 @@ QSize MixersDelegate::sizeHint ( const QStyleOptionViewItem & option, const QMod
//qDebug() << "MixersDelegate::sizeHint() UserRole-> " << index.model()->data(index, Qt::UserRole + 2);
int height = doc.size().height();
if ( index.model()->data(index, Qt::UserRole + 2).toInt() > 0 ) {
//qDebug() << "MixersDelegate::sizeHint() detected channel head";
//qDebug() << "MixersDelegate::sizeHint() detected channel head";
height = doc.size().height() + MIX_ROW_HEIGHT_INCREASE;
}
//qDebug() << "MixersDelegate::sizeHint() options.rect " << options.rect;
@@ -133,7 +121,7 @@ void MixersDelegate::SetupDocument(QTextDocument & doc, const QStyleOptionViewIt
//minimize margins (default margins look ugly)
QTextFrame *tf = doc.rootFrame();
QTextFrameFormat tff = tf->frameFormat();
QTextFrameFormat tff = tf->frameFormat();
tff.setMargin(0);
tf->setFrameFormat(tff);
tf->setFrameFormat(tff);
}
-1
View File
@@ -13,7 +13,6 @@ class MixersList : public QListWidget
public:
explicit MixersList(QWidget *parent, bool expo);
void keyPressEvent(QKeyEvent *event);
void dropEvent(QDropEvent *event);
signals:
void mimeDropped(int index, const QMimeData *data, Qt::DropAction action);
+13 -20
View File
@@ -3,7 +3,7 @@
MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware):
ModelPanel(parent, model, generalSettings, firmware),
mixInserted(false),
mixInserted(false),
highlightedSource(0),
modelPrinter(firmware, generalSettings, model)
{
@@ -76,7 +76,7 @@ void MixesPanel::update()
@note Mixer lines are now HTML formated in order to support bold text.
@param[in] dest defines which mixer line to create.
@param[in] dest defines which mixer line to create.
If dest < 0 then create empty channel slotr fo channel -dest ( dest=-2 -> CH2)
if dest >=0 then create used channel based on model mix data from slot dest (dest=4 -> model mix[4])
@@ -94,11 +94,11 @@ bool MixesPanel::AddMixerLine(int dest)
MixData *md = &model->mixData[dest];
qba.append((const char*)md, sizeof(MixData));
}
itm->setData(Qt::UserRole, qba);
itm->setData(Qt::UserRole, qba);
#if MIX_ROW_HEIGHT_INCREASE > 0
if (new_ch && !firstLine) {
//increase size of this row
itm->setData(GroupHeaderRole, 1);
itm->setData(GroupHeaderRole, 1);
}
#endif
MixerlistWidget->addItem(itm);
@@ -110,11 +110,11 @@ bool MixesPanel::AddMixerLine(int dest)
/**
@brief Returns HTML formated mixer representation
@param[in] dest defines which mixer line to create.
@param[in] dest defines which mixer line to create.
If dest < 0 then create empty channel slot for channel -dest ( dest=-2 -> CH2)
if dest >=0 then create used channel based on model mix data from slot dest (dest=4 -> model mix[4])
@retval string mixer line in HTML
@retval string mixer line in HTML
*/
QString MixesPanel::getMixerText(int dest, bool * new_ch)
{
@@ -187,7 +187,7 @@ void MixesPanel::gm_openMix(int index)
model->mixData[index] = mixd;
emit modified();
update();
}
}
else {
if (mixInserted) {
gm_deleteMix(index);
@@ -215,7 +215,7 @@ void MixesPanel::mixerlistWidget_doubleClicked(QModelIndex index)
if (!gm_insertMix(idx)) return;
model->mixData[idx].destCh = i;
mixInserted = true;
}
}
else {
mixInserted = false;
}
@@ -355,7 +355,7 @@ void MixesPanel::mixerOpen()
if (!gm_insertMix(idx)) return;
model->mixData[idx].destCh = i;
mixInserted = true;
}
}
else {
mixInserted = false;
}
@@ -393,7 +393,7 @@ void MixesPanel::mixerAdd()
if (!gm_insertMix(index)) return;
model->mixData[index].destCh = i;
mixInserted = true;
}
}
else {
index++;
if (!gm_insertMix(index)) return;
@@ -428,18 +428,11 @@ void MixesPanel::mixerlistWidget_customContextMenuRequested(QPoint pos)
contextMenu.exec(globalPos);
}
void MixesPanel::mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction action)
void MixesPanel::mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction /*action*/)
{
int idx= MixerlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0);
//qDebug() << "MixesPanel::mimeMixerDropped()" << index << data;
if (action==Qt::CopyAction) {
pasteMixerMimeData(data, idx);
}
else if (action==Qt::MoveAction) {
QList<int> list = createMixListFromSelected();
mixersDeleteList(list);
pasteMixerMimeData(data, idx);
}
pasteMixerMimeData(data, idx);
}
void MixesPanel::mixesEdited()
@@ -476,7 +469,7 @@ int MixesPanel::gm_moveMix(int idx, bool dir) //true=inc=down false=dec=up
if (idx == 0 && !dir) {
//special case: topmost mixer moving up
if (src.destCh > 1) src.destCh--;
return idx;
return idx;
}
int tdx = dir ? idx+1 : idx-1;
+2 -2
View File
@@ -82,7 +82,7 @@ void Node::stepToCenter(qreal step)
if(centerX)
{
qreal x = qr.right() - qr.width()/2;
if(fabs(x-p.x())>xStep)
if(abs(x-p.x())>xStep)
p.rx() += p.x()>x ? -xStep : xStep;
else
p.rx() = x;
@@ -91,7 +91,7 @@ void Node::stepToCenter(qreal step)
if(centerY)
{
qreal y = qr.bottom() - qr.height()/2;
if(fabs(y-p.y())>yStep)
if(abs(y-p.y())>yStep)
p.ry() += p.y()>y ? -yStep : yStep;
else
p.ry() = y;
+14 -90
View File
@@ -42,8 +42,6 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
ui->countdownBeep->addItem(tr("Voice"), TimerData::COUNTDOWN_VOICE);
ui->countdownBeep->addItem(tr("Haptic"), TimerData::COUNTDOWN_HAPTIC);
}
ui->value->setMaximumTime(firmware->getMaxTimerStart());
ui->persistent->setField(timer.persistent, this);
ui->persistent->addItem(tr("Not persistent"), 0);
@@ -68,11 +66,9 @@ TimerPanel::~TimerPanel()
void TimerPanel::update()
{
int hour = timer.val / 3600;
int min = (timer.val - (hour * 3600)) / 60;
int sec = (timer.val - (hour * 3600)) % 60;
ui->value->setTime(QTime(hour, min, sec));
int min = timer.val / 60;
int sec = timer.val % 60;
ui->value->setTime(QTime(0, min, sec));
if (firmware->getCapability(PermTimers)) {
int sign = 1;
@@ -98,7 +94,7 @@ QWidget * TimerPanel::getLastFocus()
void TimerPanel::on_value_editingFinished()
{
timer.val = ui->value->time().hour()*3600 + ui->value->time().minute()*60 + ui->value->time().second();
timer.val = ui->value->time().minute()*60 + ui->value->time().second();
emit modified();
}
@@ -181,11 +177,6 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
}
}
for (int i=0; i<=MM_RF_PROTO_LAST; i++)
{
ui->multiProtocol->addItem(ModelPrinter::printMultiRfProtocol(i, false), (QVariant) i);
}
if (firmware->getCapability(HasFailsafe)) {
for (int i=0; i<maxChannels; i++) {
QLabel * label = new QLabel(this);
@@ -231,7 +222,6 @@ ModulePanel::~ModulePanel()
#define MASK_PPM_FIELDS 16
#define MASK_FAILSAFES 32
#define MASK_OPEN_DRAIN 64
#define MASK_MULTIMODULE 128
void ModulePanel::update()
{
@@ -267,9 +257,6 @@ void ModulePanel::update()
mask |= MASK_OPEN_DRAIN;
}
break;
case PULSES_MULTIMODULE:
mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER | MASK_MULTIMODULE;
break;
case PULSES_OFF:
default:
break;
@@ -302,46 +289,18 @@ void ModulePanel::update()
// PPM settings fields
ui->label_ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmPolarity->setCurrentIndex(module.ppm.pulsePol);
ui->ppmPolarity->setCurrentIndex(module.ppmPulsePol);
ui->label_ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setVisible(mask & MASK_OPEN_DRAIN);
ui->ppmOutputType->setCurrentIndex(module.ppm.outputType);
ui->ppmOutputType->setCurrentIndex(module.ppmOutputType);
ui->label_ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmDelay->setValue(module.ppm.delay);
ui->ppmDelay->setValue(module.ppmDelay);
ui->label_ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS);
ui->ppmFrameLength->setMinimum(module.channelsCount*(model->extendedLimits ? 2.250 : 2)+3.5);
ui->ppmFrameLength->setMaximum(firmware->getCapability(PPMFrameLength));
ui->ppmFrameLength->setValue(22.5+((double)module.ppm.frameLength)*0.5);
// Multi settings fields
ui->label_multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setVisible(mask & MASK_MULTIMODULE);
ui->multiProtocol->setCurrentIndex(module.multi.rfProtocol);
ui->label_multiSubType->setVisible(mask & MASK_MULTIMODULE);
ui->multiSubType->setVisible(mask & MASK_MULTIMODULE);
if (mask & MASK_MULTIMODULE) {
int numEntries = getNumSubtypes(static_cast<MultiModuleRFProtocols>(module.multi.rfProtocol));
if (module.multi.customProto)
numEntries=8;
// Removes extra items
ui->multiSubType->setMaxCount(numEntries);
for (int i=0; i < numEntries; i++) {
if (i < ui->multiSubType->count())
ui->multiSubType->setItemText(i, ModelPrinter::printMultiSubType(module.multi.rfProtocol, module.multi.customProto, i));
else
ui->multiSubType->addItem(ModelPrinter::printMultiSubType(module.multi.rfProtocol, module.multi.customProto, i), (QVariant) i);
}
}
ui->multiSubType->setCurrentIndex(module.subType);
ui->cb_autoBind->setVisible(mask & MASK_MULTIMODULE);
ui->cb_autoBind->setChecked(module.multi.autoBindMode ? Qt::Checked : Qt::Unchecked);
ui->cb_lowPower->setVisible(mask & MASK_MULTIMODULE);
ui->cb_lowPower->setChecked(module.multi.lowPowerMode ? Qt::Checked : Qt::Unchecked);
ui->ppmFrameLength->setValue(22.5+((double)module.ppmFrameLength)*0.5);
if (firmware->getCapability(HasFailsafe)) {
ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES);
@@ -368,8 +327,8 @@ void ModulePanel::update()
ui->failsafesFrame->setVisible(mask & MASK_FAILSAFES);
if (mask & MASK_CHANNELS_RANGE) {
ui->channelsStart->setMaximum(33 - ui->channelsCount->value());
ui->channelsCount->setMaximum(qMin(16, 33-ui->channelsStart->value()));
ui->channelsStart->setMaximum(32 - ui->channelsCount->value());
ui->channelsCount->setMaximum(qMin(16, 32-ui->channelsStart->value()));
}
}
@@ -393,13 +352,13 @@ void ModulePanel::on_protocol_currentIndexChanged(int index)
void ModulePanel::on_ppmPolarity_currentIndexChanged(int index)
{
module.ppm.pulsePol = index;
module.ppmPulsePol = index;
emit modified();
}
void ModulePanel::on_ppmOutputType_currentIndexChanged(int index)
{
module.ppm.outputType = index;
module.ppmOutputType = index;
emit modified();
}
@@ -425,7 +384,7 @@ void ModulePanel::on_ppmDelay_editingFinished()
{
if (!lock) {
// TODO only accept valid values
module.ppm.delay = ui->ppmDelay->value();
module.ppmDelay = ui->ppmDelay->value();
emit modified();
}
}
@@ -438,7 +397,7 @@ void ModulePanel::on_rxNumber_editingFinished()
void ModulePanel::on_ppmFrameLength_editingFinished()
{
module.ppm.frameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
module.ppmFrameLength = (ui->ppmFrameLength->value()-22.5) / 0.5;
emit modified();
}
@@ -472,41 +431,6 @@ void ModulePanel::onFailsafeComboIndexChanged(int index)
}
}
void ModulePanel::on_multiProtocol_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.multi.rfProtocol = index;
unsigned int maxSubTypes = getNumSubtypes(static_cast<MultiModuleRFProtocols>(index));
if (module.multi.customProto)
maxSubTypes=8;
module.subType = std::min(module.subType, maxSubTypes -1);
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_multiSubType_currentIndexChanged(int index)
{
if (!lock) {
lock=true;
module.subType = index;
update();
emit modified();
lock = false;
}
}
void ModulePanel::on_autoBind_stateChanged(int state)
{
module.multi.autoBindMode = (state == Qt::Checked);
}
void ModulePanel::on_lowPower_stateChanged(int state)
{
module.multi.lowPowerMode = (state == Qt::Checked);
}
void ModulePanel::updateFailsafe(int channel)
{
int failsafeValue = module.failsafeChannels[channel];
-4
View File
@@ -65,10 +65,6 @@ class ModulePanel : public ModelPanel
void on_failsafeMode_currentIndexChanged(int value);
void onFailsafeComboIndexChanged(int index);
void onFailsafeSpinChanged(double value);
void on_multiProtocol_currentIndexChanged(int index);
void on_multiSubType_currentIndexChanged(int index);
void on_autoBind_stateChanged(int state);
void on_lowPower_stateChanged(int state);
private:
ModuleData & module;
-51
View File
@@ -534,26 +534,6 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_multiProtocol">
<property name="text">
<string>Multi Radio Protocol</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="multiProtocol">
<property name="maximumSize">
<size>
<width>125</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QLabel" name="label_rxNumber">
<property name="maximumSize">
@@ -591,37 +571,6 @@
</item>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_multiSubType">
<property name="text">
<string>SubType</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QComboBox" name="multiSubType">
<property name="maximumSize">
<size>
<width>125</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QCheckBox" name="cb_autoBind">
<property name="text">
<string>Autobind</string>
</property>
</widget>
</item>
<item row="4" column="5">
<widget class="QCheckBox" name="cb_lowPower">
<property name="text">
<string>Low Power</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+3 -3
View File
@@ -18,7 +18,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>6</number>
<number>-1</number>
</property>
<property name="margin">
<number>0</number>
@@ -39,10 +39,10 @@
<bool>true</bool>
</property>
<property name="currentSection">
<enum>QDateTimeEdit::HourSection</enum>
<enum>QDateTimeEdit::MinuteSection</enum>
</property>
<property name="displayFormat">
<string notr="true">hh:mm:ss</string>
<string notr="true">mm:ss</string>
</property>
</widget>
</item>
+4 -5
View File
@@ -619,7 +619,7 @@ void TelemetrySensorPanel::update()
ui->source4->setVisible(sources34FieldsDisplayed);
ui->autoOffset->setVisible(sensor.unit != SensorData::UNIT_RPMS && isConfigurable);
ui->filter->setVisible(isConfigurable);
ui->persistent->setVisible(sensor.type == SensorData::TELEM_TYPE_CALCULATED);
ui->persistent->setVisible((sensor.type == SensorData::TELEM_TYPE_CALCULATED && sensor.formula == SensorData::TELEM_FORMULA_CONSUMPTION) || isConfigurable);
lock = false;
}
@@ -696,10 +696,10 @@ void TelemetrySensorPanel::on_unit_currentIndexChanged(int index)
}
}
void TelemetrySensorPanel::on_prec_valueChanged(double value)
void TelemetrySensorPanel::on_prec_valueChanged()
{
if (!lock) {
sensor.prec = value;
sensor.prec = ui->prec->value();
emit dataModified();
emit modified();
}
@@ -800,8 +800,7 @@ void TelemetryPanel::setup()
if (IS_ARM(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky S.PORT"), 0);
ui->telemetryProtocol->addItem(tr("FrSky D"), 1);
if (IS_9XRPRO(firmware->getBoard()) ||
(IS_TARANIS(firmware->getBoard()) && generalSettings.hw_uartMode == 2)) {
if (IS_9XRPRO(firmware->getBoard())) {
ui->telemetryProtocol->addItem(tr("FrSky D (cable)"), 2);
}
ui->telemetryProtocol->setCurrentIndex(model->telemetryProtocol);
+1 -1
View File
@@ -93,7 +93,7 @@ class TelemetrySensorPanel: public ModelPanel
void on_type_currentIndexChanged(int index);
void on_formula_currentIndexChanged(int index);
void on_unit_currentIndexChanged(int index);
void on_prec_valueChanged(double value);
void on_prec_valueChanged();
protected:
void updateSourcesComboBox(AutoComboBox * cb, bool negative);
+12 -94
View File
@@ -91,94 +91,31 @@ QString ModelPrinter::printThrottleTrimMode()
QString ModelPrinter::printModuleProtocol(unsigned int protocol)
{
static const char * strings[] = {
"OFF",
"PPM",
"Silverlit A", "Silverlit B", "Silverlit C",
"CTP1009",
"LP45", "DSM2", "DSMX",
"PPM16", "PPMsim",
"FrSky XJT (D16)", "FrSky XJT (D8)", "FrSky XJT (LR12)", "FrSky DJT",
"Crossfire",
"DIY Multiprotocol Module"
"OFF",
"PPM",
"Silverlit A", "Silverlit B", "Silverlit C",
"CTP1009",
"LP45", "DSM2", "DSMX",
"PPM16", "PPMsim",
"FrSky XJT (D16)", "FrSky XJT (D8)", "FrSky XJT (LR12)", "FrSky DJT",
"Crossfire"
};
return CHECK_IN_ARRAY(strings, protocol);
}
QString ModelPrinter::printMultiRfProtocol(int rfProtocol, bool custom)
QString ModelPrinter::printModule(int idx)
{
static const char *strings[] = {
"FlySky", "Hubsan", "FrSky", "Hisky", "V2x2", "DSM", "Devo", "YD717", "KN", "SymaX", "SLT", "CX10", "CG023",
"Bayang", "ESky", "MT99XX", "MJXQ", "Shenqi", "FY326", "SFHSS", "J6 PRO","FQ777","Assan","Hontai","OLRS","Custom"
};
if (custom)
return "Custom - proto " + QString::number(rfProtocol);
else
return CHECK_IN_ARRAY(strings, rfProtocol);
}
QString ModelPrinter::printMultiSubType(int rfProtocol, bool custom, 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", "V8"};
static const char *hisky_strings[] = { "HiSky", "HK310" };
static const char *dsm2_strings[] = {"DSM2 22ms", "DSM2 11ms", "DSMX 22ms", "DSMX 11ms"};
static const char *yd717_strings[] = {"YD717", "Skywalker", "Syma X2", "XINXUN", "NIHUI"};
static const char *symax_strings[] = {"Standard", "Syma X5C"};
static const char *cx10_strings[] = {"Green", "Blue", "DM007", "Q282", "JC3015a", "JC3015b", "MK33041", "Q242"};
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", "E010"};
static const char *hontai_strings[] = {"Standard","JJRC X1","X5C1 Clone"};
if (custom)
return CHECK_IN_ARRAY(custom_subtype_strings, subType);
switch (rfProtocol) {
case MM_RF_PROTO_FLYSKY:
return CHECK_IN_ARRAY(flysky_strings, subType);
case MM_RF_PROTO_FRSKY:
return CHECK_IN_ARRAY(frsky_strings, subType);
case MM_RF_PROTO_HISKY:
return CHECK_IN_ARRAY(hisky_strings, subType);
case MM_RF_PROTO_DSM2:
return CHECK_IN_ARRAY(dsm2_strings, subType);
case MM_RF_PROTO_YD717:
return CHECK_IN_ARRAY(yd717_strings, subType);
case MM_RF_PROTO_SYMAX:
return CHECK_IN_ARRAY(symax_strings, subType);
case MM_RF_PROTO_CX10:
return CHECK_IN_ARRAY(cx10_strings, subType);
case MM_RF_PROTO_CG023:
return CHECK_IN_ARRAY(cg023_strings, subType);
case MM_RF_PROTO_KN:
return CHECK_IN_ARRAY(kn_strings, subType);
case MM_RF_PROTO_MT99XX:
return CHECK_IN_ARRAY(mt99_strings, subType);
case MM_RF_PROTO_MJXQ:
return CHECK_IN_ARRAY(mjxq_strings, subType);
case MM_RF_PROTO_HONTAI:
return CHECK_IN_ARRAY(hontai_strings, subType);
default:
return "DEFAULT";
}
}
QString ModelPrinter::printModule(int idx) {
const ModuleData &module = model.moduleData[idx];
const ModuleData & module = model.moduleData[idx];
if (module.protocol == PULSES_OFF)
return printModuleProtocol(module.protocol);
else if (module.protocol == PULSES_PPM)
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart + 1).arg(module.channelsStart + module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
return tr("%1, Channels(%2-%3), PPM delay(%4usec), Pulse polarity(%5)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
else {
QString result = tr("%1, Channels(%2-%3)").arg(printModuleProtocol(module.protocol)).arg(module.channelsStart+1).arg(module.channelsStart+module.channelsCount);
if (module.protocol != PULSES_PXX_XJT_D8) {
result += " " + tr("Receiver number(%1)").arg(module.modelId);
}
if (module.protocol == PULSES_MULTIMODULE)
result += " " + tr("radio Protocol %1, subType %2, option value %3").arg(printMultiRfProtocol(module.multi.rfProtocol, module.multi.customProto)).arg(printMultiSubType(module.multi.rfProtocol, module.multi.customProto, module.subType)).arg(module.multi.optionValue);
return result;
}
}
@@ -188,7 +125,7 @@ QString ModelPrinter::printTrainerMode()
QString result;
switch (model.trainerMode) {
case 1:
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppm.delay).arg(module.polarityToString());
result = tr("Slave/Jack"); // TODO + tr(": Channel start: %1, %2 Channels, %3usec Delay, Pulse polarity %4").arg(module.channelsStart+1).arg(module.channelsCount).arg(module.ppmDelay).arg(module.polarityToString());
break;
case 2:
result = tr("Master/SBUS Module");
@@ -205,25 +142,6 @@ QString ModelPrinter::printTrainerMode()
return result;
}
QString ModelPrinter::printHeliSwashType ()
{
switch (model.swashRingData.type) {
case HELI_SWASH_TYPE_90:
return tr("90");
case HELI_SWASH_TYPE_120:
return tr("120");
case HELI_SWASH_TYPE_120X:
return tr("120X");
case HELI_SWASH_TYPE_140:
return tr("140");
case HELI_SWASH_TYPE_NONE:
return tr("Off");
default:
return "???";
}
}
QString ModelPrinter::printCenterBeep()
{
QStringList strl;
-3
View File
@@ -38,15 +38,12 @@ class ModelPrinter: public QObject
QString printTrimIncrementMode();
QString printThrottleTrimMode();
static QString printModuleProtocol(unsigned int protocol);
static QString printMultiRfProtocol(int rfProtocol, bool custom);
static QString printMultiSubType(int rfProtocol, bool custom, int subType);
QString printFlightModeSwitch(int index);
QString printFlightModeName(int index);
QString printFlightModes(unsigned int flightModes);
QString printModule(int idx);
QString printTrainerMode();
QString printCenterBeep();
QString printHeliSwashType();
QString printTrim(int flightModeIndex, int stickIndex);
QString printGlobalVar(int flightModeIndex, int gvarIndex);
QString printRotaryEncoder(int flightModeIndex, int reIndex);
-53
View File
@@ -128,8 +128,6 @@ QString MultiModelPrinter::print(QTextDocument * document)
QString str = "<table border='1' cellspacing='0' cellpadding='3' width='100%' style='font-family: monospace;'>";
str += printSetup();
if (firmware->getCapability(Heli))
str += printHeliSetup();
if (firmware->getCapability(FlightModes))
str += printFlightModes();
str += printInputs();
@@ -183,57 +181,6 @@ QString MultiModelPrinter::printSetup()
return str;
}
QString MultiModelPrinter::printHeliSetup()
{
bool heliEnabled = false;
for (int k=0; k<models.size(); k++) {
heliEnabled = heliEnabled || models[k]->swashRingData.type != HELI_SWASH_TYPE_NONE;
}
if (!heliEnabled)
return "";
QString str = printTitle(tr("Helicopter Setup"));
MultiColumns columns(models.size());
columns.appendTitle (tr("Swash Type:"));
COMPARE(modelPrinter->printHeliSwashType());
columns.append ("<br/>");
columns.appendTitle (tr("Swash Ring:"));
COMPARE(model->swashRingData.value);
columns.append ("<table cellspacing='0' cellpadding='1' width='100%' border='0' style='border-collapse:collapse'>");
columns.append("<tr>");
columns.append("<td></td><td><b>" + tr("Input") + "</b></td><td><b>" + tr("Weight") + "</b></td>");
columns.append("</tr>");
columns.append("<tr><td><b>" + tr("Long. cyc") + "</b></td><td>");
COMPARE(model->swashRingData.elevatorSource.toString(model));
columns.append("</td><td>");
COMPARE(model->swashRingData.elevatorWeight)
columns.append("</td></tr>");
columns.append("<tr><td><b>" + tr("Lateral cyc") + "</b></td><td>");
COMPARE(model->swashRingData.aileronSource.toString(model));
columns.append("</td><td>");
COMPARE(model->swashRingData.aileronWeight)
columns.append("</td></tr>");
columns.append("<tr><td><b>" + tr("Collective") + "</b></td><td>");
COMPARE(model->swashRingData.collectiveSource.toString(model));
columns.append("</td><td>");
COMPARE(model->swashRingData.collectiveWeight)
columns.append("</td></tr>");
columns.append("</table>");
str.append(columns.print());
return str;
}
QString MultiModelPrinter::printFlightModes()
{
QString str = printTitle(tr("Flight modes"));
-1
View File
@@ -43,7 +43,6 @@ class MultiModelPrinter: public QObject
QString printTitle(const QString & label);
QString printSetup();
QString printHeliSetup();
QString printFlightModes();
QString printLimits();
QString printInputs();
+1 -1
View File
@@ -108,7 +108,7 @@ QString SyncProcess::updateEntry(const QString & path, const QDir & source, cons
QString sourceContents = sourceFile.readAll();
sourceFile.close();
// try to retrieve destination contents
QFile destinationFile(destinationPath);
QFile destinationFile(path);
if (destinationFile.open(QFile::ReadOnly)) {
QString destinationContents = destinationFile.readAll();
destinationFile.close();
+17 -19
View File
@@ -60,22 +60,20 @@ QStringList getAvrdudeArgs(const QString &cmd, const QString &filename)
return args;
}
QStringList getDfuArgs(const QString & cmd, const QString & filename)
QStringList getDfuArgs(const QString &cmd, const QString &filename)
{
QStringList args;
QStringList arguments;
burnConfigDialog bcd;
QString memory = "0x08000000";
if (cmd == "-U") {
memory.append(QString(":%1").arg(GetCurrentFirmware()->getFlashSize()));
QString memory="0x08000000";
if (cmd=="-U") {
memory.append(QString(":%1").arg(MAX_FSIZE));
}
args << bcd.getDFUArgs();
if (!filename.endsWith(".dfu")) {
args << "--dfuse-address" << memory;
}
args << "-d" << "0483:df11";
arguments << bcd.getDFUArgs() << "--dfuse-address" << memory << "-d" << "0483:df11";
QString fullcmd = cmd + filename;
args << "" << fullcmd;
return args;
arguments << "" << fullcmd;
return arguments;
}
QStringList getSambaArgs(const QString &tcl)
@@ -104,7 +102,7 @@ QStringList getReadEEpromCmd(const QString &filename)
{
QStringList result;
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
// impossible
}
else if (IS_SKY9X(eepromInterface->getBoard())) {
@@ -119,7 +117,7 @@ QStringList getReadEEpromCmd(const QString &filename)
QStringList getWriteEEpromCmd(const QString &filename)
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
// impossible
return QStringList();
}
@@ -134,7 +132,7 @@ QStringList getWriteEEpromCmd(const QString &filename)
QStringList getWriteFirmwareArgs(const QString &filename)
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
return getDfuArgs("-D", filename);
}
else if (eepromInterface->getBoard() == BOARD_SKY9X) {
@@ -151,7 +149,7 @@ QStringList getWriteFirmwareArgs(const QString &filename)
QStringList getReadFirmwareArgs(const QString &filename)
{
EEPROMInterface *eepromInterface = GetEepromInterface();
if (IS_STM32(eepromInterface->getBoard())) {
if (IS_TARANIS(eepromInterface->getBoard())) {
return getDfuArgs("-U", filename);
}
else if (eepromInterface->getBoard() == BOARD_SKY9X) {
@@ -193,7 +191,7 @@ void resetAvrdudeFuses(bool eepromProtect, ProgressWidget *progress)
QStringList str;
if (bcd.getMCU() == "m2560") {
args << "-B8";
QString erStr = eepromProtect ? "hfuse:w:0x51:m" : "hfuse:w:0x59:m";
QString erStr = eepromProtect ? "hfuse:w:0x11:m" : "hfuse:w:0x19:m";
str << "-U" << "lfuse:w:0xD7:m" << "-U" << erStr << "-U" << "efuse:w:0xFC:m";
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
}
@@ -222,7 +220,7 @@ void resetAvrdudeFuses(bool eepromProtect, ProgressWidget *progress)
lfuses = "lfuse:w:0x3F:m";
}
QString erStr = eepromProtect ? "hfuse:w:0xC1:m" : "hfuse:w:0xC9:m";
QString erStr = eepromProtect ? "hfuse:w:0x81:m" : "hfuse:w:0x89:m";
str << "-U" << lfuses << "-U" << erStr << "-U" << "efuse:w:0xFF:m";
//use hfuse = 0x81 to prevent eeprom being erased with every flashing
}
@@ -315,7 +313,7 @@ bool readEeprom(const QString &filename, ProgressWidget *progress)
}
}
if (result == false && !IS_STM32(GetCurrentFirmware()->getBoard())) {
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
FlashProcess flashProcess(getRadioInterfaceCmd(), getReadEEpromCmd(filename), progress);
result = flashProcess.run();
}
+1 -1
View File
@@ -2,7 +2,7 @@
#include "ui_htmldialog.h"
ReleaseNotesDialog::ReleaseNotesDialog(QWidget * parent) :
QDialog(parent),
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::HtmlDialog)
{
ui->setupUi(this);
+1 -1
View File
@@ -3,7 +3,7 @@
#include "helpers.h"
ReleaseNotesFirmwareDialog::ReleaseNotesFirmwareDialog(QWidget * parent, const QString & rnurl):
QDialog(parent),
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui(new Ui::HtmlDialog)
{
ui->setupUi(this);
+2
View File
@@ -5,6 +5,8 @@
#include "modeledit/modeledit.h"
#if __GNUC__
#include <math.h>
#else
#include "../targets/windows/winbuild.h"
#endif
class AutoDoubleSpinBox: public QDoubleSpinBox
+3 -2
View File
@@ -5,7 +5,8 @@
VerticalScrollArea::VerticalScrollArea(QWidget * parent, GenericPanel * panel):
QScrollArea(parent),
panel(panel)
panel(panel),
parent(parent)
{
setWidgetResizable(true);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -13,7 +14,7 @@ VerticalScrollArea::VerticalScrollArea(QWidget * parent, GenericPanel * panel):
panel->installEventFilter(this);
}
bool VerticalScrollArea::eventFilter(QObject * o, QEvent * e)
bool VerticalScrollArea::eventFilter(QObject *o, QEvent *e)
{
if (o == panel && e->type() == QEvent::Resize) {
setMinimumWidth(panel->minimumSizeHint().width() + verticalScrollBar()->width());
+2 -1
View File
@@ -11,10 +11,11 @@ class VerticalScrollArea : public QScrollArea
VerticalScrollArea(QWidget * parent, GenericPanel * panel);
protected:
virtual bool eventFilter(QObject * o, QEvent * e);
virtual bool eventFilter(QObject *o, QEvent *e);
private:
GenericPanel * panel;
QWidget * parent;
};
#endif
+1 -10
View File
@@ -62,16 +62,7 @@ class LcdWidget : public QWidget
void makeScreenshot(const QString & fileName)
{
int width, height;
if (lcdDepth < 12) {
width = 2 * lcdWidth;
height = 2 * lcdHeight;
}
else {
width = lcdWidth;
height = lcdHeight;
}
QPixmap buffer(width, height);
QPixmap buffer(2*lcdWidth, 2*lcdHeight);
QPainter p(&buffer);
doPaint(p);
bool toclipboard = g.snapToClpbrd();
@@ -141,12 +141,7 @@ void SimulatorDialogHorus::getValues()
trimPressed == TRIM_RV_DN,
trimPressed == TRIM_RV_UP,
trimPressed == TRIM_RH_L,
trimPressed == TRIM_RH_R,
0,0,0,0
/*trimPressed == TRIM_T5_DN,
trimPressed == TRIM_T5_UP,
trimPressed == TRIM_T6_DN,
trimPressed == TRIM_T6_UP*/
trimPressed == TRIM_RH_R
}
};
@@ -120,7 +120,7 @@ void SimulatorDialogTaranis::getValues()
{
-pots[0]->value(),
pots[1]->value(),
((flags & SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0),
((flags && SIMULATOR_FLAGS_S3) ? pots[2]->value() : 0),
-sliders[0]->value(),
sliders[1]->value()
},
+9 -9
View File
@@ -16,14 +16,14 @@
#include <stdint.h>
#if !defined(MAX_LOGICAL_SWITCHES) && defined(NUM_CSW)
#define MAX_LOGICAL_SWITCHES NUM_CSW
#if !defined(NUM_LOGICAL_SWITCH) && defined(NUM_CSW)
#define NUM_LOGICAL_SWITCH NUM_CSW
#endif
#ifdef INIT_IMPORT
#undef INIT_IMPORT
#ifdef TELEMETRY_FRSKY
telemetryStreaming = 20;
#ifdef FRSKY
frskyStreaming = 20;
#endif
#endif
@@ -31,13 +31,13 @@ telemetryStreaming = 20;
#undef SETVALUES_IMPORT
for (int i=0; i<NUM_STICKS; i++)
g_anas[i] = inputs.sticks[i];
for (int i=0; i<NUM_POTS+NUM_SLIDERS; i++)
for (int i=0; i<NUM_POTS; i++)
g_anas[NUM_STICKS+i] = inputs.pots[i];
for (int i=0; i<C9X_NUM_SWITCHES; i++)
simuSetSwitch(i, inputs.switches[i]);
for (int i=0; i<C9X_NUM_KEYS; i++)
simuSetKey(i, inputs.keys[i]);
for (int i=0; i<(NUM_STICKS+NUM_AUX_TRIMS)*2; i++)
for (int i=0; i<NUM_STICKS*2; i++)
simuSetTrim(i, inputs.trims[i]);
#ifdef PCBGRUVIN9X
@@ -50,7 +50,7 @@ if (inputs.rotenc) pind |= 0x20;
if (inputs.rotenc) PIOB->PIO_PDSR &= ~0x40; else PIOB->PIO_PDSR |= 0x40;
#endif
#if defined(PCBFLAMENCO) || defined(PCBX9E)
#if defined(PCBFLAMENCO) || (defined(PCBTARANIS) && defined(REV9E))
if (inputs.rotenc) simuSetKey(KEY_ENTER, true);
#endif
#endif
@@ -60,7 +60,7 @@ if (inputs.rotenc) simuSetKey(KEY_ENTER, true);
memset(outputs.chans, 0, sizeof(outputs.chans));
for (unsigned int i=0; i<DIM(g_chans512); i++)
outputs.chans[i] = g_chans512[i];
for (int i=0; i<MAX_LOGICAL_SWITCHES; i++)
for (int i=0; i<NUM_LOGICAL_SWITCH; i++)
#if defined(BOLD_FONT)
outputs.vsw[i] = getSwitch(SWSRC_SW1+i);
#else
@@ -81,7 +81,7 @@ for (int fm=0; fm<MAX_FLIGHT_MODES; fm++) {
#ifdef LCDCHANGED_IMPORT
#undef LCDCHANGED_IMPORT
if (simuLcdRefresh) {
lightEnable = isBacklightEnabled();
lightEnable = isBacklightEnable();
simuLcdRefresh = false;
return true;
}
@@ -56,9 +56,9 @@ void registerSimulators()
#elif (!defined __GNUC__)
char name[MAX_PATH];
GetModuleFileName(NULL, name, MAX_PATH);
QString path(name);
path.truncate(path.lastIndexOf('\\'));
dir.setPath(path);
QString path(name);
path.truncate(path.lastIndexOf('\\'));
dir.setPath(path);
#else
dir = SIMULATOR_LIB_SEARCH_PATH;
#endif
@@ -69,7 +69,7 @@ void registerSimulators()
}
}
SimulatorFactory * getSimulatorFactory(const QString & name)
SimulatorFactory *getSimulatorFactory(const QString &name)
{
QString simuName = name;
while(1) {
@@ -85,8 +85,6 @@ SimulatorFactory * getSimulatorFactory(const QString & name)
if (pos <= 0)
break;
simuName = simuName.mid(0, pos);
if (simuName.count('-') == 0)
break;
}
return NULL;
}
@@ -24,7 +24,12 @@
#include <QMap>
#include <algorithm>
// TODO can be removed?
#if __GNUC__
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
#else
#include "../targets/windows/winbuild.h"
#endif
template<class t> t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma); }
struct TxInputs
@@ -34,7 +39,7 @@ struct TxInputs
int switches[C9X_NUM_SWITCHES];
bool keys[C9X_NUM_KEYS];
bool rotenc;
bool trims[12];
bool trims[8];
};
class TxOutputs
+28 -39
View File
@@ -147,32 +147,31 @@ void TelemetrySimulator::closeEvent(QCloseEvent *event)
void TelemetrySimulator::showEvent(QShowEvent *event)
{
SET_INSTANCE(rxbt_inst, BATT_ID, 0);
SET_INSTANCE(rssi_inst, RSSI_ID, 24);
SET_INSTANCE(swr_inst, SWR_ID, 24);
SET_INSTANCE(a1_inst, ADC1_ID, 0);
SET_INSTANCE(a2_inst, ADC2_ID, 0);
SET_INSTANCE(a3_inst, A3_FIRST_ID, 0);
SET_INSTANCE(a4_inst, A4_FIRST_ID, 0);
SET_INSTANCE(t1_inst, T1_FIRST_ID, 0);
SET_INSTANCE(t2_inst, T2_FIRST_ID, 0);
SET_INSTANCE(rpm_inst, RPM_FIRST_ID, DATA_ID_RPM);
SET_INSTANCE(fuel_inst, FUEL_FIRST_ID, 0);
SET_INSTANCE(fuel_qty_inst, FUEL_QTY_FIRST_ID, 0);
SET_INSTANCE(aspd_inst, AIR_SPEED_FIRST_ID, 0);
SET_INSTANCE(vvspd_inst, VARIO_FIRST_ID, DATA_ID_VARIO);
SET_INSTANCE(valt_inst, ALT_FIRST_ID, DATA_ID_VARIO);
SET_INSTANCE(fasv_inst, VFAS_FIRST_ID, DATA_ID_FAS);
SET_INSTANCE(fasc_inst, CURR_FIRST_ID, DATA_ID_FAS);
SET_INSTANCE(cells_inst, CELLS_FIRST_ID, DATA_ID_FLVSS);
SET_INSTANCE(gpsa_inst, GPS_ALT_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpss_inst, GPS_SPEED_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpsc_inst, GPS_COURS_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpst_inst, GPS_TIME_DATE_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpsll_inst, GPS_LONG_LATI_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(accx_inst, ACCX_FIRST_ID, 0);
SET_INSTANCE(accy_inst, ACCY_FIRST_ID, 0);
SET_INSTANCE(accz_inst, ACCZ_FIRST_ID, 0);
SET_INSTANCE(rxbt_inst, BATT_ID, 0);
SET_INSTANCE(rssi_inst, RSSI_ID, 24);
SET_INSTANCE(swr_inst, SWR_ID, 24);
SET_INSTANCE(a1_inst, ADC1_ID, 0);
SET_INSTANCE(a2_inst, ADC2_ID, 0);
SET_INSTANCE(a3_inst, A3_FIRST_ID, 0);
SET_INSTANCE(a4_inst, A4_FIRST_ID, 0);
SET_INSTANCE(t1_inst, T1_FIRST_ID, 0);
SET_INSTANCE(t2_inst, T2_FIRST_ID, 0);
SET_INSTANCE(rpm_inst, RPM_FIRST_ID, DATA_ID_RPM);
SET_INSTANCE(fuel_inst, FUEL_FIRST_ID, 0);
SET_INSTANCE(aspd_inst, AIR_SPEED_FIRST_ID, 0);
SET_INSTANCE(vvspd_inst, VARIO_FIRST_ID, DATA_ID_VARIO);
SET_INSTANCE(valt_inst, ALT_FIRST_ID, DATA_ID_VARIO);
SET_INSTANCE(fasv_inst, VFAS_FIRST_ID, DATA_ID_FAS);
SET_INSTANCE(fasc_inst, CURR_FIRST_ID, DATA_ID_FAS);
SET_INSTANCE(cells_inst, CELLS_FIRST_ID, DATA_ID_FLVSS);
SET_INSTANCE(gpsa_inst, GPS_ALT_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpss_inst, GPS_SPEED_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpsc_inst, GPS_COURS_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpst_inst, GPS_TIME_DATE_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(gpsll_inst, GPS_LONG_LATI_FIRST_ID, DATA_ID_GPS);
SET_INSTANCE(accx_inst, ACCX_FIRST_ID, 0);
SET_INSTANCE(accy_inst, ACCY_FIRST_ID, 0);
SET_INSTANCE(accz_inst, ACCZ_FIRST_ID, 0);
ui->rxbt_ratio->setValue(simulator->getSensorRatio(BATT_ID) / 10.0);
ui->A1_ratio->setValue(simulator->getSensorRatio(ADC1_ID) / 10.0);
@@ -284,7 +283,7 @@ void TelemetrySimulator::generateTelemetryFrame()
case 10:
if (ui->rpm->value() > 0)
generateSportPacket(buffer, ui->rpm_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, RPM_FIRST_ID, LIMIT<uint32_t>(0, ui->rpm->value(), 0x7FFFFFFF));
generateSportPacket(buffer, ui->rpm_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, RPM_FIRST_ID, LIMIT<uint32_t>(0, ui->rpm->value(), 0xFFFF));
break;
case 11:
@@ -384,11 +383,6 @@ void TelemetrySimulator::generateTelemetryFrame()
generateSportPacket(buffer, ui->accz_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, ACCZ_FIRST_ID, LIMIT<int32_t>(-0x7FFFFFFF, ui->accz->value() * 100.0, 0x7FFFFFFF));
break;
case 26:
if (ui->fuel_qty->value() > 0)
generateSportPacket(buffer, ui->fuel_qty_inst->text().toInt(&ok, 0) - 1, DATA_FRAME, FUEL_QTY_FIRST_ID, LIMIT<uint32_t>(0, ui->fuel_qty->value() * 100.0, 0xFFFFFF));
break;
default:
item = 0;
return;
@@ -602,7 +596,6 @@ TelemetrySimulator::LogPlaybackController::LogPlaybackController(Ui::TelemetrySi
colToFuncMap.insert("Tmp2(@F)", T2_DEGF);
colToFuncMap.insert("RPM(rpm)", RPM);
colToFuncMap.insert("Fuel(%)", FUEL);
colToFuncMap.insert("Fuel(ml)", FUEL_QTY);
colToFuncMap.insert("VSpd(m/s)", VSPD_MS);
colToFuncMap.insert("VSpd(f/s)", VSPD_FS);
colToFuncMap.insert("Alt(ft)", ALT_FEET);
@@ -651,15 +644,14 @@ QDateTime TelemetrySimulator::LogPlaybackController::parseTransmittterTimestamp(
void TelemetrySimulator::LogPlaybackController::calcLogFrequency()
{
// examine up to 20 rows to determine log frequency in seconds
// Skip the first entry which contains the file open time
logFrequency = 25.5; // default value
QDateTime lastTime;
for (int i = 2; (i < 21) && (i < csvRecords.count()); i++)
for (int i = 1; (i < 20) && (i < csvRecords.count()); i++)
{
QDateTime logTime = parseTransmittterTimestamp(csvRecords[i]);
// ugh - no timespan in this Qt version
double timeDiff = (logTime.toMSecsSinceEpoch() - lastTime.toMSecsSinceEpoch()) / 1000.0;
if ((timeDiff > 0.1) && (timeDiff < logFrequency)) {
if ((timeDiff > 0) && (timeDiff < logFrequency)) {
logFrequency = timeDiff;
}
lastTime = logTime;
@@ -898,9 +890,6 @@ void TelemetrySimulator::LogPlaybackController::setUiDataValues()
case FUEL:
ui->fuel->setValue(columnData[info.dataIndex].toDouble());
break;
case FUEL_QTY:
ui->fuel_qty->setValue(columnData[info.dataIndex].toDouble());
break;
case VSPD_MS:
ui->vspeed->setValue(columnData[info.dataIndex].toDouble());
break;
-1
View File
@@ -80,7 +80,6 @@ class TelemetrySimulator : public QDialog
ACCX,
ACCY,
ACCZ,
FUEL_QTY,
};
QMap<QString, CONVERT_TYPE> colToFuncMap; // contains all 'known' column headings and how they are to be processed
Ui::TelemetrySimulator * ui;
+28 -75
View File
@@ -1360,7 +1360,7 @@ Timestamp</string>
</font>
</property>
<property name="maximum">
<number>2147483647</number>
<number>65535</number>
</property>
</widget>
</item>
@@ -1520,20 +1520,23 @@ Timestamp</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_51">
<item row="11" column="0">
<widget class="QLabel" name="label_11">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Fuel Qty</string>
<string>VSpd</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="fuel_qty_inst">
<widget class="QLineEdit" name="vvspd_inst">
<property name="font">
<font>
<pointsize>8</pointsize>
@@ -1542,26 +1545,35 @@ Timestamp</string>
</widget>
</item>
<item row="11" column="2">
<widget class="QSpinBox" name="fuel_qty">
<widget class="QDoubleSpinBox" name="vspeed">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-16777215.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
<double>16777215.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="11" column="3">
<widget class="QLabel" name="label_52">
<widget class="QLabel" name="label_48">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>ml</string>
<string>m/s</string>
</property>
</widget>
</item>
@@ -1620,7 +1632,7 @@ Timestamp</string>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="label_12">
<property name="font">
<font>
<pointsize>8</pointsize>
@@ -1630,12 +1642,12 @@ Timestamp</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>VSpd</string>
<string>Alt</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="vvspd_inst">
<widget class="QLineEdit" name="valt_inst">
<property name="font">
<font>
<pointsize>8</pointsize>
@@ -1644,7 +1656,7 @@ Timestamp</string>
</widget>
</item>
<item row="12" column="2">
<widget class="QDoubleSpinBox" name="vspeed">
<widget class="QDoubleSpinBox" name="valt">
<property name="font">
<font>
<pointsize>8</pointsize>
@@ -1665,14 +1677,14 @@ Timestamp</string>
</widget>
</item>
<item row="12" column="3">
<widget class="QLabel" name="label_48">
<widget class="QLabel" name="label_49">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>m/s</string>
<string>Meters</string>
</property>
</widget>
</item>
@@ -1730,64 +1742,7 @@ Timestamp</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_12">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Alt</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="valt_inst">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
</widget>
</item>
<item row="13" column="2">
<widget class="QDoubleSpinBox" name="valt">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-16777215.000000000000000</double>
</property>
<property name="maximum">
<double>16777215.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item row="13" column="3">
<widget class="QLabel" name="label_49">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>Meters</string>
</property>
</widget>
</item>
</layout>
</layout>
</widget>
</widget>
<tabstops>
@@ -1857,8 +1812,6 @@ Timestamp</string>
<tabstop>accy</tabstop>
<tabstop>accz_inst</tabstop>
<tabstop>accz</tabstop>
<tabstop>fuel_qty_inst</tabstop>
<tabstop>fuel_qty</tabstop>
</tabstops>
<resources/>
<connections/>
+2 -4
View File
@@ -134,11 +134,9 @@ int main(int argc, char *argv[])
registerSimulators();
registerOpenTxFirmwares();
eedir = QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
eedir = QDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/data/OpenTX/Simulator");
if (!eedir.exists("OpenTX")) {
if (!eedir.mkpath("OpenTX")) {
showMessage(QObject::tr("WARNING: couldn't create directory for EEPROM:\n%1").arg(eedir.absoluteFilePath("OpenTX")), QMessageBox::Warning);
}
eedir.mkdir("OpenTX");
}
eedir.cd("OpenTX");
+2 -2
View File
@@ -425,12 +425,12 @@ May be different from firmware language</source>
<message>
<location filename="../apppreferencesdialog.ui" line="877"/>
<source>Find Executable</source>
<translation>Ausführbare Datei auswählen</translation>
<translation>Suche die *.EXE-Datei</translation>
</message>
<message>
<location filename="../apppreferencesdialog.ui" line="751"/>
<source>Google Earth Executable</source>
<translation>Ausführbare Datei Google Earth</translation>
<translation>Google Earth *.EXE Datei</translation>
</message>
<message>
<location filename="../apppreferencesdialog.ui" line="831"/>
+2 -2
View File
@@ -8067,8 +8067,8 @@ Mixage actif par défaut si non-renseigné.</translation>
</message>
<message>
<location filename="../firmwares/opentx/opentxinterface.cpp" line="1144"/>
<source>Removes D8 FrSky protocol support which is not legal for use in the EU on radios sold after Jan 1st, 2015</source>
<translation>Supprime le protocole RF D8 qui n&apos;est plus utilisable légalement en Europe sur les radios vendues après le 1er janvier 2015</translation>
<source>Removes D8 and LR12 FrSky protocols that are not legal for use in the EU on radios sold after Jan 1st, 2015</source>
<translation>Supprime les protocoles RF D8 et LR12 qui ne sont plus utilisable légalementen Europe sur les radios vendues après le 1er janvier 2015</translation>
</message>
<message>
<location filename="../firmwares/opentx/opentxinterface.cpp" line="1145"/>
+3 -3
View File
@@ -124,12 +124,12 @@ void saveModel(ModelData & m, model & xm)
}
}
*/
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppm.delay != 300 || m.moduleData[0].ppm.pulsePol != 0) {
if (m.moduleData[0].protocol != PULSES_PPM || m.moduleData[0].channelsCount != 8 || m.moduleData[0].ppmDelay != 300 || m.moduleData[0].ppmPulsePol != 0) {
modulation mod;
mod.type(modulation::type_type::value(m.moduleData[0].protocol));
mod.channels(m.moduleData[0].channelsCount);
mod.delay(m.moduleData[0].ppm.delay);
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppm.pulsePol));
mod.delay(m.moduleData[0].ppmDelay);
mod.polarity(modulation::polarity_type::value(m.moduleData[0].ppmPulsePol));
xm.modulation(mod);
}
{
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More