Merge branch 'next' of https://github.com/opentx/opentx into kilrah/Bootloader
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PROJECT( companion )
|
||||
|
||||
SET( C9X_VERSION_MAJOR "1" )
|
||||
SET( C9X_VERSION_MINOR "52" )
|
||||
SET( C9X_VERSION_MINOR "99" )
|
||||
SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR} )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||
@@ -36,7 +36,7 @@ ELSE()
|
||||
MESSAGE( "SDL not found! Joysticks support will be disabled" )
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE( Qt4 REQUIRED )
|
||||
FIND_PACKAGE(Qt4 4.8.4 REQUIRED)
|
||||
SET( QT_USE_QTNETWORK True )
|
||||
SET( QT_USE_QTXML True )
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
@@ -90,6 +90,13 @@ add_custom_command(
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${RADIO_SRC_DIRECTORY}/stamp-opentx.h
|
||||
COMMAND make stamp_header
|
||||
DEPENDS ${RADIO_SRC_DIRECTORY}/Makefile
|
||||
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${PROJECT_SOURCE_DIR}/../..
|
||||
@@ -128,6 +135,7 @@ set(companion_SRCS
|
||||
firmwares/opentx/opentxsimulator.cpp
|
||||
firmwares/ersky9x/ersky9xeeprom.cpp
|
||||
firmwares/ersky9x/ersky9xinterface.cpp
|
||||
${RADIO_SRC_DIRECTORY}/stamp-opentx.h
|
||||
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
|
||||
${RADIO_SRC_DIRECTORY}/translations/en.h
|
||||
appdata.cpp
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>685</width>
|
||||
<height>462</height>
|
||||
<width>734</width>
|
||||
<height>492</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -18,7 +18,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>685</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -47,450 +47,9 @@
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="applicationTab">
|
||||
<attribute name="title">
|
||||
<string>Application Settings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="11" column="1" colspan="4">
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Automatic Backup Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="historySize">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>40</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User Splash Screens</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QComboBox" name="splashincludeCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only show user splash images</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Show user and companion splash images</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="ge_label">
|
||||
<property name="text">
|
||||
<string>Google Earth Executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="startupCheck_fw">
|
||||
<property name="text">
|
||||
<string>Automatic check for OpenTX firmware updates</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="backupPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="4">
|
||||
<widget class="QPushButton" name="libraryPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="4">
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="ge_lineedit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="ge_pathButton">
|
||||
<property name="text">
|
||||
<string>Find Executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files to keep</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Splash Screen Library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="backupEnable">
|
||||
<property name="text">
|
||||
<string>Enable automatic backup before writing firmware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="4">
|
||||
<widget class="QPushButton" name="backupPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="4">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="startupCheck_companion9x">
|
||||
<property name="text">
|
||||
<string>Automatic check for Companion updates</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="4">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="wizardEnable_ChkB">
|
||||
<property name="text">
|
||||
<string>Offer to use wizard for new models</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="showSplash">
|
||||
<property name="text">
|
||||
<string>Show splash screen when Companion starts</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="libraryPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="simulatorTab">
|
||||
<attribute name="title">
|
||||
<string>Simulator Settings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator BackLight</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QCheckBox" name="joystickChkB">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="snapshotPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="backLightColor">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Blue</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Green</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Red</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Orange</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yellow</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Joystick</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="snapshotClipboardCKB">
|
||||
<property name="text">
|
||||
<string>Only capture to clipboard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="joystickCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QPushButton" name="joystickcalButton">
|
||||
<property name="text">
|
||||
<string>Calibrate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="simuSW">
|
||||
<property name="text">
|
||||
<string>Remember simulator switch values</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>Simulator capture folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="snapshotPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="profileTab">
|
||||
<attribute name="title">
|
||||
<string>Radio Settings Profile</string>
|
||||
<string>Radio Profile</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="10" column="1" colspan="3">
|
||||
@@ -804,19 +363,6 @@ This is used by the templated to determine which channel goes to what number out
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<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>
|
||||
<item row="14" column="1" colspan="3">
|
||||
<widget class="QCheckBox" name="burnFirmware">
|
||||
<property name="text">
|
||||
@@ -867,6 +413,13 @@ This is used by the templated to determine which channel goes to what number out
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="5">
|
||||
<widget class="QPushButton" name="clearImageButton">
|
||||
<property name="text">
|
||||
<string>Clear Image</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="QPushButton" name="SplashSelect">
|
||||
<property name="text">
|
||||
@@ -881,13 +434,6 @@ This is used by the templated to determine which channel goes to what number out
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="5">
|
||||
<widget class="QPushButton" name="clearImageButton">
|
||||
<property name="text">
|
||||
<string>Clear Image</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="5">
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
@@ -938,7 +484,7 @@ This is used by the templated to determine which channel goes to what number out
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -987,6 +533,434 @@ This is used by the templated to determine which channel goes to what number out
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<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>
|
||||
</widget>
|
||||
<widget class="QWidget" name="applicationTab">
|
||||
<attribute name="title">
|
||||
<string>Application Settings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="9" column="2">
|
||||
<widget class="QPushButton" name="backupPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1" colspan="2">
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Automatic Backup Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="historySize">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||
<horstretch>40</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User Splash Screens</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QComboBox" name="splashincludeCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only show user splash images</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Show user and companion splash images</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="ge_label">
|
||||
<property name="text">
|
||||
<string>Google Earth Executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="startupCheck_fw">
|
||||
<property name="text">
|
||||
<string>Automatic check for OpenTX firmware updates</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="backupPath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="2">
|
||||
<widget class="QPushButton" name="libraryPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="ge_lineedit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="ge_pathButton">
|
||||
<property name="text">
|
||||
<string>Find Executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files to keep</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Splash Screen Library</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="backupEnable">
|
||||
<property name="text">
|
||||
<string>Enable automatic backup before writing firmware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="startupCheck_companion9x">
|
||||
<property name="text">
|
||||
<string>Automatic check for Companion updates</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="wizardEnable_ChkB">
|
||||
<property name="text">
|
||||
<string>Offer to use wizard for new models</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="showSplash">
|
||||
<property name="text">
|
||||
<string>Show splash screen when Companion starts</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="libraryPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1" colspan="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="simulatorTab">
|
||||
<attribute name="title">
|
||||
<string>Simulator Settings</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator BackLight</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QCheckBox" name="joystickChkB">
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="snapshotPathButton">
|
||||
<property name="text">
|
||||
<string>Open Folder</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="backLightColor">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Blue</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Green</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Red</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Orange</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Yellow</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Joystick</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="snapshotClipboardCKB">
|
||||
<property name="text">
|
||||
<string>Only capture to clipboard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="joystickCB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4">
|
||||
<widget class="QPushButton" name="joystickcalButton">
|
||||
<property name="text">
|
||||
<string>Calibrate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="simuSW">
|
||||
<property name="text">
|
||||
<string>Remember simulator switch values</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_19">
|
||||
<property name="text">
|
||||
<string>Simulator capture folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="snapshotPath">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
@@ -15,6 +15,7 @@ burnConfigDialog::burnConfigDialog(QWidget *parent) :
|
||||
ui(new Ui::burnConfigDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowIcon(CompanionIcon("configure.png"));
|
||||
ui->avrdude_programmer->model()->sort(0);
|
||||
|
||||
getSettings();
|
||||
|
||||
@@ -18,6 +18,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
|
||||
hexType(Type)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowIcon(CompanionIcon("write_flash.png"));
|
||||
|
||||
if(!g.profile[g.id()].splashFile().isEmpty()){
|
||||
imageSource=PROFILE;
|
||||
|
||||
+16
-33
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>440</width>
|
||||
<height>423</height>
|
||||
<width>399</width>
|
||||
<height>564</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -18,7 +18,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>440</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -171,6 +171,12 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
@@ -254,8 +260,8 @@
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="SplashLayout" rowstretch="0,0,0,0,0,0,0">
|
||||
<item row="0" column="1" rowspan="7">
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="1">
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout_2" rowstretch="0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="imageLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
@@ -271,8 +277,8 @@
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>212</width>
|
||||
<height>64</height>
|
||||
<width>214</width>
|
||||
<height>66</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
@@ -281,6 +287,9 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -289,32 +298,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<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>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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="2" column="0">
|
||||
|
||||
@@ -142,7 +142,7 @@ customizeSplashDialog::customizeSplashDialog(QWidget *parent) :
|
||||
ui(new Ui::customizeSplashDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowIcon(CompanionIcon("paint.png"));
|
||||
setWindowIcon(CompanionIcon("paintbrush.png"));
|
||||
ui->leftLibraryButton->setIcon(CompanionIcon("library.png"));
|
||||
ui->rightLibraryButton->setIcon(CompanionIcon("library.png"));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1087</width>
|
||||
<height>285</height>
|
||||
<height>298</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -165,6 +165,9 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -470,6 +473,9 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ui_downloaddialog.h"
|
||||
#include <QMessageBox>
|
||||
#include <QtGui>
|
||||
#include <QTime>
|
||||
#include "helpers.h"
|
||||
|
||||
downloadDialog::downloadDialog(QWidget *parent, QString src, QString tgt) :
|
||||
@@ -87,3 +88,14 @@ void downloadDialog::fileError()
|
||||
file = 0;
|
||||
reject();
|
||||
}
|
||||
|
||||
void downloadDialog::closeEvent( QCloseEvent * event)
|
||||
{
|
||||
// Delay closing 2 seconds to avoid unpleasant flashing download dialogs
|
||||
QTime closeTime= QTime::currentTime().addSecs(2);
|
||||
while( QTime::currentTime() < closeTime )
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ private slots:
|
||||
void updateDataReadProgress(qint64 bytesRead, qint64 totalBytes);
|
||||
|
||||
private:
|
||||
void closeEvent( QCloseEvent * event);
|
||||
Ui::downloadDialog *ui;
|
||||
|
||||
QNetworkAccessManager qnam;
|
||||
|
||||
@@ -126,11 +126,14 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
result.max = singleprec ? 1540 : 3000;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_T1:
|
||||
case TELEMETRY_SOURCE_T1_MAX:
|
||||
case TELEMETRY_SOURCE_T2:
|
||||
case TELEMETRY_SOURCE_T2_MAX:
|
||||
result.min = -30;
|
||||
result.max = 225;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_RPM:
|
||||
case TELEMETRY_SOURCE_RPM_MAX:
|
||||
result.step = singleprec ? 50 : 1;
|
||||
result.max = singleprec ? 12750 : 20000;
|
||||
break;
|
||||
@@ -138,6 +141,7 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
result.max = 100;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_SPEED:
|
||||
case TELEMETRY_SOURCE_SPEED_MAX:
|
||||
result.step = singleprec ? 4 : 1;
|
||||
result.max = singleprec ? 944 : 2000;
|
||||
if (model && !model->frsky.imperial) {
|
||||
@@ -146,21 +150,26 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
}
|
||||
break;
|
||||
case TELEMETRY_SOURCE_DIST:
|
||||
case TELEMETRY_SOURCE_DIST_MAX:
|
||||
result.step = singleprec ? 8 : 1;
|
||||
result.max = singleprec ? 2040 : 10000;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_CELL:
|
||||
case TELEMETRY_SOURCE_CELL_MIN:
|
||||
result.step = singleprec ? 0.02 : 0.01;
|
||||
result.max = 5.1;
|
||||
result.decimals = 2;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_CELLS_SUM:
|
||||
case TELEMETRY_SOURCE_CELLS_MIN:
|
||||
case TELEMETRY_SOURCE_VFAS:
|
||||
case TELEMETRY_SOURCE_VFAS_MIN:
|
||||
result.step = 0.1;
|
||||
result.max = 25.5;
|
||||
result.decimals = 1;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_CURRENT:
|
||||
case TELEMETRY_SOURCE_CURRENT_MAX:
|
||||
result.step = singleprec ? 0.5 : 0.1;
|
||||
result.max = singleprec ? 127.5 : 200.0;
|
||||
result.decimals = 1;
|
||||
@@ -170,6 +179,7 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
result.max = singleprec ? 5100 : 10000;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_POWER:
|
||||
case TELEMETRY_SOURCE_POWER_MAX:
|
||||
result.step = singleprec ? 5 : 1;
|
||||
result.max = singleprec ? 1275 : 2000;
|
||||
break;
|
||||
@@ -221,12 +231,12 @@ QString RawSource::toString()
|
||||
QObject::tr("A1"), QObject::tr("A2"), QObject::tr("A3"), QObject::tr("A4"),
|
||||
QObject::tr("Alt"), QObject::tr("Rpm"), QObject::tr("Fuel"), QObject::tr("T1"), QObject::tr("T2"),
|
||||
QObject::tr("Speed"), QObject::tr("Dist"), QObject::tr("GPS Alt"),
|
||||
QObject::tr("Cell"), QObject::tr("Cels"), QObject::tr("Vfas"), QObject::tr("Curr"), QObject::tr("Cnsp"), QObject::tr("Powr"),
|
||||
QObject::tr("Cell"), QObject::tr("Cells"), QObject::tr("Vfas"), QObject::tr("Curr"), QObject::tr("Cnsp"), QObject::tr("Powr"),
|
||||
QObject::tr("AccX"), QObject::tr("AccY"), QObject::tr("AccZ"),
|
||||
QObject::tr("HDG "), QObject::tr("VSpd"), QObject::tr("ASpd"), QObject::tr("dTE"),
|
||||
QObject::tr("A1-"), QObject::tr("A2-"), QObject::tr("A3-"), QObject::tr("A4-"),
|
||||
QObject::tr("Alt-"), QObject::tr("Alt+"), QObject::tr("Rpm+"), QObject::tr("T1+"), QObject::tr("T2+"), QObject::tr("Spd+"), QObject::tr("Dst+"),
|
||||
QObject::tr("Cel-"), QObject::tr("Cels-"), QObject::tr("Vfs-"), QObject::tr("Cur+"), QObject::tr("Pwr+"),
|
||||
QObject::tr("Alt-"), QObject::tr("Alt+"), QObject::tr("Rpm+"), QObject::tr("T1+"), QObject::tr("T2+"), QObject::tr("Speed+"), QObject::tr("Dist+"),
|
||||
QObject::tr("Cell-"), QObject::tr("Cells-"), QObject::tr("Vfas-"), QObject::tr("Curr+"), QObject::tr("Powr+"),
|
||||
QObject::tr("ACC"), QObject::tr("Time"),
|
||||
};
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@ enum TelemetrySource {
|
||||
TELEMETRY_SOURCE_CELL_MIN,
|
||||
TELEMETRY_SOURCE_CELLS_MIN,
|
||||
TELEMETRY_SOURCE_VFAS_MIN,
|
||||
TELEMETRY_SOURCE_CURRENT_MAX,
|
||||
TELEMETRY_SOURCE_POWER_MAX,
|
||||
TELEMETRY_SOURCE_ACC,
|
||||
TELEMETRY_SOURCE_GPS_TIME,
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define EEPROM_VARIANT 3
|
||||
|
||||
#undef min
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#define LUA_MODEL_SCRIPTS
|
||||
#define EEPROM_VARIANT 3
|
||||
|
||||
#define NUM_POTS 5
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
@@ -153,9 +155,6 @@ int16_t g_anas[NUM_STICKS+5];
|
||||
|
||||
uint16_t anaIn(uint8_t chan)
|
||||
{
|
||||
if (chan == 8)
|
||||
return 1800;
|
||||
else
|
||||
return g_anas[chan];
|
||||
}
|
||||
|
||||
|
||||
@@ -384,8 +384,12 @@ class TelemetrySourcesConversionTable: public ConversionTable {
|
||||
addConversion(1+TELEMETRY_SOURCE_T2_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_SPEED_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_DIST_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_CELL_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_VFAS_MIN, val++);
|
||||
if (version >= 216) {
|
||||
addConversion(1+TELEMETRY_SOURCE_CELL_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_CELLS_MIN, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_VFAS_MIN, val++);
|
||||
}
|
||||
addConversion(1+TELEMETRY_SOURCE_CURRENT_MAX, val++);
|
||||
addConversion(1+TELEMETRY_SOURCE_POWER_MAX, val++);
|
||||
if (IS_ARM(board) && version >= 216) {
|
||||
for (int i=0; i<5; i++)
|
||||
@@ -1008,9 +1012,15 @@ class InputField: public TransformedField {
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
if (expo.mode) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
if (IS_TARANIS(board)) {
|
||||
if (version < 216) {
|
||||
if (expo.mode) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (expo.srcRaw.type != SOURCE_TYPE_NONE)
|
||||
expo.mode = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
|
||||
#define GAUGES
|
||||
|
||||
#define NUM_POTS 3
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
|
||||
@@ -95,31 +95,6 @@ void populateRotEncCB(QComboBox *b, int value, int renumber)
|
||||
b->setCurrentIndex(value);
|
||||
}
|
||||
|
||||
void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last=false, int hubproto=0)
|
||||
{
|
||||
int telem_hub[] = {0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,2,2,1,1,1,1,1,1};
|
||||
b->clear();
|
||||
|
||||
b->addItem(RawSource(SOURCE_TYPE_NONE, 0).toString());
|
||||
|
||||
for (unsigned int i = 0; i <= (last ? TELEMETRY_SOURCES_DISPLAY_COUNT : TELEMETRY_SOURCES_STATUS_COUNT); i++) {
|
||||
b->addItem(RawSource(SOURCE_TYPE_TELEMETRY, i).toString());
|
||||
if (!(i>=sizeof(telem_hub)/sizeof(int) || telem_hub[i]==0 || ((telem_hub[i]>=hubproto) && hubproto!=0))) {
|
||||
QModelIndex index = b->model()->index(i, 0);
|
||||
QVariant v(0);
|
||||
b->model()->setData(index, v, Qt::UserRole - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (value>=sizeof(telem_hub)/sizeof(int))
|
||||
b->setCurrentIndex(0);
|
||||
else if (telem_hub[value]==0 || ((telem_hub[value]>=hubproto) && hubproto!=0)) {
|
||||
b->setCurrentIndex(value);
|
||||
}
|
||||
|
||||
b->setMaxVisibleItems(10);
|
||||
}
|
||||
|
||||
QString getProtocolStr(const int proto)
|
||||
{
|
||||
static const char *strings[] = { "OFF",
|
||||
|
||||
@@ -88,7 +88,6 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr=
|
||||
|
||||
void populatePhasesCB(QComboBox *b, int value);
|
||||
void populateGvarUseCB(QComboBox *b, unsigned int phase);
|
||||
void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last, int hubproto);
|
||||
QString getProtocolStr(const int proto);
|
||||
QString getPhasesStr(unsigned int phases, ModelData & model);
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ void MainWindow::checkForUpdates(bool ignoreSettings, QString & fwId)
|
||||
|
||||
if(ignoreSettings) {
|
||||
downloadDialog_forWait = new downloadDialog(this, tr("Checking for updates"));
|
||||
downloadDialog_forWait->show();
|
||||
downloadDialog_forWait->exec();
|
||||
} else {
|
||||
downloadDialog_forWait = NULL; // TODO needed?
|
||||
}
|
||||
@@ -272,7 +272,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
|
||||
downloadDialog * dd = new downloadDialog(this, QString(OPENTX_COMPANION_DOWNLOADS C9X_INSTALLER).arg(version), fileName);
|
||||
installer_fileName = fileName;
|
||||
connect(dd, SIGNAL(accepted()), this, SLOT(updateDownloaded()));
|
||||
dd->show();
|
||||
dd->exec();
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -1530,18 +1530,20 @@ MdiChild *MainWindow::createMdiChild()
|
||||
return child;
|
||||
}
|
||||
|
||||
QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot)
|
||||
QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot, QObject *slotObj)
|
||||
{
|
||||
QAction * newAction = new QAction( this );
|
||||
if (!icon.isEmpty())
|
||||
newAction->setIcon(CompanionIcon(icon));
|
||||
newAction->setIcon(CompanionIcon(icon));
|
||||
if (!sName.isEmpty())
|
||||
newAction->setText(sName);
|
||||
if (!lName.isEmpty())
|
||||
newAction->setStatusTip(lName);
|
||||
if (shortcut != 0)
|
||||
newAction->setShortcuts(shortcut);
|
||||
connect(newAction, SIGNAL(triggered()), this, slot);
|
||||
if (slotObj == NULL)
|
||||
slotObj = this;
|
||||
connect(newAction, SIGNAL(triggered()), slotObj, slot);
|
||||
return newAction;
|
||||
}
|
||||
|
||||
@@ -1584,7 +1586,7 @@ void MainWindow::createActions()
|
||||
openAct = addAct("open.png", tr("Open Models+Settings..."), tr("Open Models and Settings file"), QKeySequence::Open, SLOT(openFile()));
|
||||
saveAct = addAct("save.png", tr("Save Models+Settings..."), tr("Save Models and Settings file"), QKeySequence::Save, SLOT(save()));
|
||||
saveAsAct = addAct("saveas.png", tr("Save Models+Settings as..."), tr("Save Models and Settings file"), QKeySequence::SaveAs, SLOT(saveAs()));
|
||||
exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(newFile()));
|
||||
exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(closeAllWindows()), qApp);
|
||||
cutAct = addAct("cut.png", tr("Cut Model"), tr("Cut current model to the clipboard"), QKeySequence::Cut, SLOT(cut()));
|
||||
copyAct = addAct("copy.png", tr("Copy Model..."), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy()));
|
||||
pasteAct = addAct("paste.png", tr("Paste Model..."), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste()));
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "eeprominterface.h"
|
||||
|
||||
#define SPLASH_TIME 5
|
||||
#define MAX_RECENT 10
|
||||
#define MAX_RECENT 15
|
||||
#define MAX_PROFILES 15
|
||||
|
||||
class MdiChild;
|
||||
@@ -158,7 +158,7 @@ private slots:
|
||||
|
||||
private:
|
||||
void createActions();
|
||||
QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *);
|
||||
QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *, QObject *slotObj=NULL);
|
||||
QAction * addAct(QActionGroup *, QString, QString, const char *);
|
||||
QAction * addAct(QString, QString, QString, const char *);
|
||||
|
||||
|
||||
@@ -161,6 +161,12 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
|
||||
connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited()));
|
||||
|
||||
#ifdef PHONON
|
||||
phononLock=false;
|
||||
clickObject = new Phonon::MediaObject(this);
|
||||
clickOutput = new Phonon::AudioOutput(Phonon::NoCategory, this);
|
||||
Phonon::createPath(clickObject, clickOutput);
|
||||
connect(clickObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(mediaPlayer_state(Phonon::State,Phonon::State)));
|
||||
|
||||
playBT[i] = new QPushButton(this);
|
||||
playBT[i]->setProperty("index", i);
|
||||
playBT[i]->setProperty("state", "play");
|
||||
@@ -203,6 +209,7 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta
|
||||
clickObject->clearQueue();
|
||||
clickObject->clear();
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(CustomFunctions); i++) {
|
||||
playBT[i]->setProperty("state", "play");
|
||||
playBT[i]->setObjectName(QString("play_%1").arg(i));
|
||||
playBT[i]->setIcon(CompanionIcon("play.png"));
|
||||
}
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
#include "eeprominterface.h"
|
||||
#include "helpers.h"
|
||||
|
||||
ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, int stickMode) :
|
||||
ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, int stickMode, char * inputName) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ExpoDialog),
|
||||
model(model),
|
||||
ed(expoData)
|
||||
ed(expoData),
|
||||
inputName(inputName)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 };
|
||||
@@ -76,7 +77,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
|
||||
}
|
||||
|
||||
ui->inputName->setValidator(new QRegExpValidator(rx, this));
|
||||
ui->inputName->setText(model.inputNames[ed->chn]);
|
||||
ui->inputName->setText(inputName);
|
||||
|
||||
ui->lineName->setValidator(new QRegExpValidator(rx, this));
|
||||
ui->lineName->setText(ed->name);
|
||||
@@ -93,6 +94,8 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
|
||||
for (int i=0; i<9; i++) {
|
||||
connect(cb_fp[i], SIGNAL(toggled(bool)), this, SLOT(valuesChanged()));
|
||||
}
|
||||
if (GetEepromInterface()->getCapability(VirtualInputs))
|
||||
connect(ui->inputName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
|
||||
QTimer::singleShot(0, this, SLOT(shrink()));
|
||||
}
|
||||
|
||||
@@ -137,7 +140,7 @@ void ExpoDialog::valuesChanged()
|
||||
ed->mode = ui->sideCB->currentIndex() + 1;
|
||||
|
||||
strcpy(ed->name, ui->lineName->text().toAscii().data());
|
||||
strcpy(model.inputNames[ed->chn], ui->inputName->text().toAscii().data());
|
||||
strcpy(inputName, ui->inputName->text().toAscii().data());
|
||||
|
||||
ed->phases=0;
|
||||
for (int i=8; i>=0 ; i--) {
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Ui {
|
||||
class ExpoDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expodata, int stickMode);
|
||||
ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expodata, int stickMode, char * inputName);
|
||||
~ExpoDialog();
|
||||
|
||||
protected:
|
||||
@@ -28,6 +28,7 @@ class ExpoDialog : public QDialog {
|
||||
Ui::ExpoDialog * ui;
|
||||
ModelData & model;
|
||||
ExpoData * ed;
|
||||
char * inputName;
|
||||
GVarGroup * gvGroup;
|
||||
CurveGroup * curveGroup;
|
||||
};
|
||||
|
||||
@@ -194,33 +194,29 @@ void FlightMode::update()
|
||||
|
||||
for (int i=0; i<gvCount; i++) {
|
||||
gvNames[i]->setText(model.gvars_names[i]);
|
||||
if (phase.gvars[i] < 1024) {
|
||||
gvValues[i]->setValue(phase.gvars[i]);
|
||||
gvValues[i]->setDisabled(false);
|
||||
}
|
||||
else {
|
||||
int idx = phase.gvars[i] - 1025;
|
||||
if (idx >= i) idx++;
|
||||
// TODO no!!!!
|
||||
PhaseData *phasegvar = &model.phaseData[idx];
|
||||
gvValues[i]->setValue(phasegvar->gvars[i]);
|
||||
gvValues[i]->setDisabled(true);
|
||||
gvValues[i]->setDisabled(false);
|
||||
int idx = phase.gvars[i];
|
||||
PhaseData *phasegvar = &phase;
|
||||
while (idx >= 1024) {
|
||||
idx -= 1025;
|
||||
phasegvar = &model.phaseData[idx];
|
||||
idx = phasegvar->gvars[i];
|
||||
gvValues[i]->setDisabled(true);
|
||||
}
|
||||
gvValues[i]->setValue(phasegvar->gvars[i]);
|
||||
}
|
||||
|
||||
for (int i=0; i<reCount; i++) {
|
||||
if (phase.rotaryEncoders[i] < 1024) {
|
||||
reValues[i]->setValue(phase.rotaryEncoders[i]);
|
||||
reValues[i]->setDisabled(false);
|
||||
}
|
||||
else {
|
||||
int idx = phase.rotaryEncoders[i] - 1025;
|
||||
if (idx >= i) idx++;
|
||||
// TODO no!!!!
|
||||
PhaseData *phasere = &model.phaseData[idx];
|
||||
reValues[i]->setValue(phasere->rotaryEncoders[i]);
|
||||
for (int i=0; i<reCount; i++) {
|
||||
reValues[i]->setDisabled(false);
|
||||
int idx = phase.rotaryEncoders[i];
|
||||
PhaseData *phasere = &phase;
|
||||
while (idx >= 1024) {
|
||||
idx -= 1025;
|
||||
phasere = &model.phaseData[idx];
|
||||
idx = phasere->rotaryEncoders[i];
|
||||
reValues[i]->setDisabled(true);
|
||||
}
|
||||
reValues[i]->setValue(phasere->rotaryEncoders[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,21 +307,12 @@ void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
int gvar = comboBox->property("index").toInt();
|
||||
if (index == 0) {
|
||||
int value = phase.gvars[gvar];
|
||||
if (value>1024) {
|
||||
value=0;
|
||||
}
|
||||
gvValues[gvar]->setValue(value);
|
||||
gvValues[gvar]->setEnabled(true);
|
||||
phase.gvars[gvar]=value;
|
||||
phase.gvars[gvar]=0;
|
||||
}
|
||||
else {
|
||||
phase.gvars[gvar] = 1024+index;
|
||||
// TOTO it's wrong!!!
|
||||
int value = model.phaseData[index + (index>phaseIdx ? 0 :-1)].gvars[gvar];
|
||||
gvValues[gvar]->setValue(value);
|
||||
gvValues[gvar]->setDisabled(true);
|
||||
}
|
||||
update();
|
||||
emit modified();
|
||||
lock = false;
|
||||
}
|
||||
@@ -348,21 +335,12 @@ void FlightMode::phaseREUse_currentIndexChanged(int index)
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
int re = comboBox->property("index").toInt();
|
||||
if (index == 0) {
|
||||
// TODO no!!!
|
||||
int value = phase.rotaryEncoders[re];
|
||||
if (value > 1024) {
|
||||
value = 0;
|
||||
}
|
||||
reValues[re]->setValue(value);
|
||||
reValues[re]->setEnabled(true);
|
||||
phase.rotaryEncoders[re] = value;
|
||||
phase.rotaryEncoders[re] = 0;
|
||||
}
|
||||
else {
|
||||
phase.rotaryEncoders[re] = 1024 + index;
|
||||
int value = model.phaseData[index + (index>phaseIdx ? 0 :-1)].rotaryEncoders[re];
|
||||
reValues[re]->setValue(value);
|
||||
reValues[re]->setDisabled(true) ;
|
||||
phase.rotaryEncoders[re] = 1024 + index; ;
|
||||
}
|
||||
update();
|
||||
lock = false;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
@@ -169,12 +169,18 @@ void InputsPanel::gm_openExpo(int index)
|
||||
if(index<0 || index>=C9X_MAX_EXPOS) return;
|
||||
|
||||
ExpoData mixd(model.expoData[index]);
|
||||
char inputName[4+1];
|
||||
emit modified();
|
||||
update();
|
||||
|
||||
if (GetEepromInterface()->getCapability(VirtualInputs))
|
||||
strcpy(inputName, model.inputNames[mixd.chn]);
|
||||
|
||||
ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode);
|
||||
ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode, inputName);
|
||||
if (g->exec()) {
|
||||
model.expoData[index] = mixd;
|
||||
if (GetEepromInterface()->getCapability(VirtualInputs))
|
||||
strcpy(model.inputNames[mixd.chn], inputName);
|
||||
emit modified();
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool i
|
||||
generalSettings(radioData.generalSettings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowIcon(CompanionIcon("edit.png"));
|
||||
restoreGeometry(g.modelEditGeo());
|
||||
ui->pushButton->setIcon(CompanionIcon("simulate.png"));
|
||||
addTab(new Setup(this, model), tr("Setup"));
|
||||
|
||||
@@ -28,10 +28,20 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
|
||||
update();
|
||||
|
||||
ui->UnitCB->setCurrentIndex(analog.type);
|
||||
ui->alarm1LevelCB->setCurrentIndex(analog.alarms[0].level);
|
||||
ui->alarm1GreaterCB->setCurrentIndex(analog.alarms[0].greater);
|
||||
ui->alarm2LevelCB->setCurrentIndex(analog.alarms[1].level);
|
||||
ui->alarm2GreaterCB->setCurrentIndex(analog.alarms[1].greater);
|
||||
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
ui->alarm1LevelCB->setCurrentIndex(analog.alarms[0].level);
|
||||
ui->alarm1GreaterCB->setCurrentIndex(analog.alarms[0].greater);
|
||||
ui->alarm2LevelCB->setCurrentIndex(analog.alarms[1].level);
|
||||
ui->alarm2GreaterCB->setCurrentIndex(analog.alarms[1].greater);
|
||||
}
|
||||
else {
|
||||
ui->alarm1LevelCB->hide();
|
||||
ui->alarm2LevelCB->hide();
|
||||
ui->alarm1GreaterCB->hide();
|
||||
ui->alarm2GreaterCB->hide();
|
||||
ui->alarm1Label->setText(tr("Low Alarm"));
|
||||
ui->alarm2Label->setText(tr("Critical Alarm"));
|
||||
}
|
||||
|
||||
if (!(GetEepromInterface()->getCapability(Telemetry) & TM_HASOFFSET)) {
|
||||
ui->CalibSB->hide();
|
||||
@@ -281,7 +291,7 @@ TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model,
|
||||
for (int c=0; c<GetEepromInterface()->getCapability(TelemetryCustomScreensFieldsPerLine); c++) {
|
||||
fieldsCB[l][c] = new QComboBox(this);
|
||||
fieldsCB[l][c]->setProperty("index", c + (l<<8));
|
||||
populateCustomScreenFieldCB(fieldsCB[l][c], screen.body.lines[l].source[c], (l<4), model.frsky.usrProto);
|
||||
populateTelemetrySourceCB(fieldsCB[l][c], screen.body.lines[l].source[c], l==3, model.frsky.usrProto);
|
||||
ui->screenNumsLayout->addWidget(fieldsCB[l][c], l, c, 1, 1);
|
||||
connect(fieldsCB[l][c], SIGNAL(currentIndexChanged(int)), this, SLOT(customFieldChanged(int)));
|
||||
}
|
||||
@@ -290,7 +300,7 @@ TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model,
|
||||
for (int l=0; l<4; l++) {
|
||||
barsCB[l] = new QComboBox(this);
|
||||
barsCB[l]->setProperty("index", l);
|
||||
populateCustomScreenFieldCB(barsCB[l], screen.body.bars[l].source, false, model.frsky.usrProto);
|
||||
populateTelemetrySourceCB(barsCB[l], screen.body.bars[l].source, false, model.frsky.usrProto);
|
||||
connect(barsCB[l], SIGNAL(currentIndexChanged(int)), this, SLOT(barSourceChanged(int)));
|
||||
ui->screenBarsLayout->addWidget(barsCB[l], l, 0, 1, 1);
|
||||
|
||||
@@ -316,6 +326,31 @@ TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model,
|
||||
update();
|
||||
}
|
||||
|
||||
void TelemetryCustomScreen::populateTelemetrySourceCB(QComboBox *b, unsigned int value, bool last, int hubproto)
|
||||
{
|
||||
int telem_hub[] = {0,0,0,0,0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,2,2,1,1,1,1,1,1};
|
||||
b->clear();
|
||||
|
||||
b->addItem(RawSource(SOURCE_TYPE_NONE, 0).toString());
|
||||
|
||||
for (unsigned int i = 0; i < (last ? TELEMETRY_SOURCES_STATUS_COUNT : TELEMETRY_SOURCES_DISPLAY_COUNT); i++) {
|
||||
b->addItem(RawSource(SOURCE_TYPE_TELEMETRY, i).toString());
|
||||
if (!(i>=sizeof(telem_hub)/sizeof(int) || telem_hub[i]==0 || ((telem_hub[i]>=hubproto) && hubproto!=0))) {
|
||||
QModelIndex index = b->model()->index(i, 0);
|
||||
QVariant v(0);
|
||||
b->model()->setData(index, v, Qt::UserRole - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (value>=sizeof(telem_hub)/sizeof(int))
|
||||
b->setCurrentIndex(0);
|
||||
else if (telem_hub[value]==0 || ((telem_hub[value]>=hubproto) && hubproto!=0)) {
|
||||
b->setCurrentIndex(value);
|
||||
}
|
||||
|
||||
b->setMaxVisibleItems(10);
|
||||
}
|
||||
|
||||
TelemetryCustomScreen::~TelemetryCustomScreen()
|
||||
{
|
||||
delete ui;
|
||||
@@ -347,6 +382,8 @@ void TelemetryCustomScreen::update()
|
||||
|
||||
void TelemetryCustomScreen::updateBar(int line)
|
||||
{
|
||||
lock = true;
|
||||
|
||||
int index = screen.body.bars[line].source;
|
||||
barsCB[line]->setCurrentIndex(index);
|
||||
if (index) {
|
||||
@@ -372,6 +409,8 @@ void TelemetryCustomScreen::updateBar(int line)
|
||||
minSB[line]->setDisabled(true);
|
||||
maxSB[line]->setDisabled(true);
|
||||
}
|
||||
|
||||
lock = false;
|
||||
}
|
||||
|
||||
void TelemetryCustomScreen::on_screenType_currentIndexChanged(int index)
|
||||
@@ -393,13 +432,15 @@ void TelemetryCustomScreen::customFieldChanged(int value)
|
||||
|
||||
void TelemetryCustomScreen::barSourceChanged(int index)
|
||||
{
|
||||
QComboBox * cb = qobject_cast<QComboBox*>(sender());
|
||||
int line = cb->property("index").toInt();
|
||||
screen.body.bars[line].source = index;
|
||||
screen.body.bars[line].barMin = 0;
|
||||
screen.body.bars[line].barMax = 0;
|
||||
updateBar(line);
|
||||
emit modified();
|
||||
if (!lock) {
|
||||
QComboBox * cb = qobject_cast<QComboBox*>(sender());
|
||||
int line = cb->property("index").toInt();
|
||||
screen.body.bars[line].source = index;
|
||||
screen.body.bars[line].barMin = 0;
|
||||
screen.body.bars[line].barMax = 0;
|
||||
updateBar(line);
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void TelemetryCustomScreen::barMinChanged(double value)
|
||||
@@ -467,8 +508,16 @@ void TelemetryPanel::setup()
|
||||
}
|
||||
ui->rssiAlarm1SB->setValue(model.frsky.rssiAlarms[0].value);
|
||||
ui->rssiAlarm2SB->setValue(model.frsky.rssiAlarms[1].value);
|
||||
ui->rssiAlarm1CB->setCurrentIndex(model.frsky.rssiAlarms[0].level);
|
||||
ui->rssiAlarm2CB->setCurrentIndex(model.frsky.rssiAlarms[1].level);
|
||||
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
ui->rssiAlarm1CB->setCurrentIndex(model.frsky.rssiAlarms[0].level);
|
||||
ui->rssiAlarm2CB->setCurrentIndex(model.frsky.rssiAlarms[1].level);
|
||||
}
|
||||
else {
|
||||
ui->rssiAlarm1CB->hide();
|
||||
ui->rssiAlarm2CB->hide();
|
||||
ui->rssiAlarm1Label->setText(tr("Low Alarm"));
|
||||
ui->rssiAlarm2Label->setText(tr("Critical Alarm"));
|
||||
}
|
||||
|
||||
if (!GetEepromInterface()->getCapability(HasAltitudeSel)) {
|
||||
ui->AltitudeGPS_ChkB->hide();
|
||||
|
||||
@@ -61,6 +61,9 @@ class TelemetryCustomScreen : public ModelPanel
|
||||
void barMinChanged(double value);
|
||||
void barMaxChanged(double value);
|
||||
|
||||
protected:
|
||||
void populateTelemetrySourceCB(QComboBox *b, unsigned int value, bool last, int hubproto);
|
||||
|
||||
private:
|
||||
void updateBar(int line);
|
||||
Ui::TelemetryCustomScreen * ui;
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_927">
|
||||
<widget class="QLabel" name="rssiAlarm1Label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -157,7 +157,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_928">
|
||||
<widget class="QLabel" name="rssiAlarm2Label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_919">
|
||||
<widget class="QLabel" name="alarm1Label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -106,7 +106,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_921">
|
||||
<widget class="QLabel" name="alarm2Label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
|
||||
@@ -530,9 +530,9 @@ void printDialog::printCurves()
|
||||
qplot_color[7]=new QColor(0,0,255);
|
||||
qplot_color[8]=new QColor(0,127,255);
|
||||
qplot_color[9]=new QColor(127,0,255);
|
||||
qplot_color[10]=new QColor(0,255,0);
|
||||
qplot_color[11]=new QColor(0,255,127);
|
||||
qplot_color[12]=new QColor(127,255,0);
|
||||
qplot_color[10]=new QColor(0,200,0);
|
||||
qplot_color[11]=new QColor(0,200,127);
|
||||
qplot_color[12]=new QColor(127,200,0);
|
||||
qplot_color[13]=new QColor(255,0,0);
|
||||
qplot_color[14]=new QColor(255,0,127);
|
||||
qplot_color[15]=new QColor(255,127,0);
|
||||
|
||||
@@ -515,6 +515,7 @@ void SimulatorDialogTaranis::getValues()
|
||||
{
|
||||
-ui->dialP_1->value(),
|
||||
ui->dialP_2->value(),
|
||||
0,
|
||||
-ui->dialP_3->value(),
|
||||
ui->dialP_4->value()
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
struct TxInputs {
|
||||
int sticks[NUM_STICKS]; /* lh lv rv rh */
|
||||
int pots[4]; /* TODO NUM_POTS */
|
||||
int pots[5]; /* TODO NUM_POTS */
|
||||
int switches[10]; /* TODO NUM_SWITCHES */
|
||||
bool keys[6]; /* TODO NUM_KEYS */
|
||||
bool rotenc;
|
||||
|
||||
+5164
-7772
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user