mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
OP-907 step 1: extract vehicle specific UIs from airframe.ui
This commit is contained in:
parent
1e2e93b8c0
commit
0d3e00134a
@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CcpmConfigWidget</class>
|
||||||
|
<widget class="QWidget" name="CcpmConfigWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>608</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="ConfigCcpmWidget" name="widget_3" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>ConfigCcpmWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>cfg_vehicletypes/configccpmwidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -0,0 +1,713 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CustomConfigWidget</class>
|
||||||
|
<widget class="QWidget" name="CustomConfigWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>608</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Curve 1</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="customThrottle1Curve" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>1000</width>
|
||||||
|
<height>1000</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_5">
|
||||||
|
<property name="title">
|
||||||
|
<string>Curve 2</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="customThrottle2Curve" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>1000</width>
|
||||||
|
<height>1000</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QTableWidget" name="customMixerTable">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
|
<number>50</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Type</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Curve 1</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Curve 2</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Roll</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pitch</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yaw</string>
|
||||||
|
</property>
|
||||||
|
</row>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 1</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 2</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 3</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 4</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 5</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 6</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 7</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 8</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 9</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ch 10</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="4">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="5">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="6">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="7">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="8">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="9">
|
||||||
|
<property name="text">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MixerCurve</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">mixercurve.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -0,0 +1,530 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>FixedWingConfigWidget</class>
|
||||||
|
<widget class="QWidget" name="FixedWingConfigWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>608</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
|
<property name="margin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Airplane type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="fixedWingType"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>230</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Output Channel Assignments</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="fwEngineLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Engine</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="fwEngineChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the engine</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="fwAileron1Label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Aileron 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="fwAileron1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first aileron (or elevon)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="fwAileron2Label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Aileron 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="fwAileron2ChannelBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the second aileron (or elevon)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="fwElevator1Label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>67</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Elevator 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="fwElevator1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first elevator</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="fwElevator2Label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>67</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Elevator 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="fwElevator2ChannelBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for a secondary elevator</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="fwRudder1Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rudder 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QComboBox" name="fwRudder1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first rudder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="fwRudder2Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rudder 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QComboBox" name="fwRudder2ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for a secondary rudder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="elevonMixBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Elevon Mix</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="elevonLabel1">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>65</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rudder %</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="elevonSlider1">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="elevonSliderLabel1">
|
||||||
|
<property name="text">
|
||||||
|
<string>50</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_15">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="elevonLabel2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pitch %</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="elevonSlider2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="elevonSliderLabel2">
|
||||||
|
<property name="text">
|
||||||
|
<string>50</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>100</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Throttle Curve</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="fixedWingThrottle" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>500</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<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>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_11">
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="fwStatusLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mixer OK</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MixerCurve</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">mixercurve.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>elevonSlider1</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>elevonSliderLabel1</receiver>
|
||||||
|
<slot>setNum(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>124</x>
|
||||||
|
<y>126</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>124</x>
|
||||||
|
<y>126</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>elevonSlider2</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>elevonSliderLabel2</receiver>
|
||||||
|
<slot>setNum(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>362</x>
|
||||||
|
<y>299</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>124</x>
|
||||||
|
<y>126</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -0,0 +1,548 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>GroundConfigWidget</class>
|
||||||
|
<widget class="QWidget" name="GroundConfigWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>608</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_61">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_31">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_51">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Vehicle type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="groundVehicleType"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_31">
|
||||||
|
<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>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_33">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Channel Assignment</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_15">
|
||||||
|
<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>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_41">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Output channel asignmets</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="gvEngineLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>77</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Engine</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="gvEngineChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the engine</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="gvAileron1Label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Aileron 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="gvAileron1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first aileron (or elevon)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="gvAileron2Label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Aileron 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="gvAileron2ChannelBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the second aileron (or elevon)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="gvMotor1Label">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="gvMotor1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first motor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="gvMotor2Label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>47</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Motor 2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QComboBox" name="gvMotor2ChannelBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for a second motor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="gvSteering1Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Front Steering</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QComboBox" name="gvSteering1ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for the first steering actuator</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="gvSteering2Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rear Steering</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QComboBox" name="gvSteering2ChannelBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select output channel for a second steering actuator</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="differentialSteeringMixBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Differential Steering Mix</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_33">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_30">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_34">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="differentialSteeringLabel1">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>65</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Left %</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="differentialSteeringSlider1">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="gvDiffSteering1Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>50</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_35">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="differentialSteeringLabel2">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Right %</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSlider" name="differentialSteeringSlider2">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="gvDiffSteering2Label">
|
||||||
|
<property name="text">
|
||||||
|
<string>50</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gvThrottleCurve1GroupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>100</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Front throttle curve</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_36">
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="groundVehicleThrottle1" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>500</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gvThrottleCurve2GroupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Rear throttle curve</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_37">
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="groundVehicleThrottle2" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>500</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_1">
|
||||||
|
<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>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_21">
|
||||||
|
<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>
|
||||||
|
<widget class="QLabel" name="gvStatusLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mixer OK</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MixerCurve</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">mixercurve.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>differentialSteeringSlider1</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>gvDiffSteering1Label</receiver>
|
||||||
|
<slot>setNum(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>124</x>
|
||||||
|
<y>126</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>315</x>
|
||||||
|
<y>391</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>differentialSteeringSlider2</sender>
|
||||||
|
<signal>valueChanged(int)</signal>
|
||||||
|
<receiver>gvDiffSteering2Label</receiver>
|
||||||
|
<slot>setNum(int)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>124</x>
|
||||||
|
<y>126</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>390</x>
|
||||||
|
<y>391</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
@ -0,0 +1,868 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MultiRotorConfigWidget</class>
|
||||||
|
<widget class="QWidget" name="MultiRotorConfigWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>880</width>
|
||||||
|
<height>608</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="multiRotorLayout" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_7" columnstretch="0,0,0">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_10">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Frame Type</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_8" stretch="0,0,1,0">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>13</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="multirotorFrameType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select the Multirotor frame type here.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>13</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>8</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGraphicsView" name="quadShape">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:transparent</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>8</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QGroupBox" name="groupBox_9">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Mix Level</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="mrRollMixValue">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>100</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QSlider" name="mrRollMixLevel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>35</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Weight of Roll mixing in percent.
|
||||||
|
Typical values are 100% for + configuration and 50% for X configuration on quads.</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_42">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Roll</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="mrPitchMixValue">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>100</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QSlider" name="mrPitchMixLevel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>35</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Weight of Pitch mixing in percent.
|
||||||
|
Typical values are 100% for + configuration and 50% for X configuration on quads.</string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_40">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Pitch</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="mrYawMixValue">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>50</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QSlider" name="mrYawMixLevel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Weight of Yaw mixing in percent.
|
||||||
|
Typical value is 50% for + or X configuration on quads.</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>50</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yaw</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="mrStatusLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mixer OK</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_9">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QGroupBox" name="groupBox_6">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Throttle Curve</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="MixerCurve" name="multiThrottleCurve" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="sizeIncrement">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>50</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:transparent</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>140</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Motor output channels</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6" columnstretch="1,1,0,0,1">
|
||||||
|
<property name="margin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" rowspan="5">
|
||||||
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
|
</property>
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="MotorOutputLabel1">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox1">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>2</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>3</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox3">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_10">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>4</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox4">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" rowspan="5">
|
||||||
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
|
</property>
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>5</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>6</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox6">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_16">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>7</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox7">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_17">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>8</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QComboBox" name="multiMotorChannelBox8">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Assign your motor output channels using the drawing above as a reference. Respect propeller rotation.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" rowspan="5" colspan="2">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="4">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Multirotor Motor Direction</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QComboBox" name="triYawChannelBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255));
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
border-radius: 5;
|
||||||
|
font: bold 12px;
|
||||||
|
margin:1px;</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tricopter Yaw Servo channel</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="4">
|
||||||
|
<widget class="QCheckBox" name="MultirotorRevMixercheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reverse all motors</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>MixerCurve</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header location="global">mixercurve.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../coreplugin/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@ -25,6 +25,9 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "configccpmwidget.h"
|
#include "configccpmwidget.h"
|
||||||
|
#include "mixersettings.h"
|
||||||
|
#include "systemsettings.h"
|
||||||
|
#include "actuatorcommand.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -36,10 +39,6 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "mixersettings.h"
|
|
||||||
#include "systemsettings.h"
|
|
||||||
#include "actuatorcommand.h"
|
|
||||||
|
|
||||||
#define Pi 3.14159265358979323846
|
#define Pi 3.14159265358979323846
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,12 +27,13 @@
|
|||||||
#ifndef CONFIGccpmWIDGET_H
|
#ifndef CONFIGccpmWIDGET_H
|
||||||
#define CONFIGccpmWIDGET_H
|
#define CONFIGccpmWIDGET_H
|
||||||
|
|
||||||
|
#include "cfg_vehicletypes/vehicleconfig.h"
|
||||||
#include "ui_ccpm.h"
|
#include "ui_ccpm.h"
|
||||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||||
#include "cfg_vehicletypes/vehicleconfig.h"
|
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
|
|
||||||
#include <QtSvg/QSvgRenderer>
|
#include <QtSvg/QSvgRenderer>
|
||||||
#include <QtSvg/QGraphicsSvgItem>
|
#include <QtSvg/QGraphicsSvgItem>
|
||||||
#include <QGraphicsEllipseItem>
|
#include <QGraphicsEllipseItem>
|
||||||
@ -63,66 +64,67 @@ public:
|
|||||||
friend class ConfigVehicleTypeWidget;
|
friend class ConfigVehicleTypeWidget;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_ccpmWidget *m_ccpm;
|
Ui_ccpmWidget *m_ccpm;
|
||||||
QGraphicsSvgItem *SwashplateImg;
|
QGraphicsSvgItem *SwashplateImg;
|
||||||
QGraphicsSvgItem *CurveImg;
|
QGraphicsSvgItem *CurveImg;
|
||||||
QGraphicsSvgItem *Servos[CCPM_MAX_SWASH_SERVOS];
|
QGraphicsSvgItem *Servos[CCPM_MAX_SWASH_SERVOS];
|
||||||
QGraphicsTextItem *ServosText[CCPM_MAX_SWASH_SERVOS];
|
QGraphicsTextItem *ServosText[CCPM_MAX_SWASH_SERVOS];
|
||||||
QGraphicsLineItem *ServoLines[CCPM_MAX_SWASH_SERVOS];
|
QGraphicsLineItem *ServoLines[CCPM_MAX_SWASH_SERVOS];
|
||||||
QGraphicsEllipseItem *ServosTextCircles[CCPM_MAX_SWASH_SERVOS];
|
QGraphicsEllipseItem *ServosTextCircles[CCPM_MAX_SWASH_SERVOS];
|
||||||
QSpinBox *SwashLvlSpinBoxes[CCPM_MAX_SWASH_SERVOS];
|
QSpinBox *SwashLvlSpinBoxes[CCPM_MAX_SWASH_SERVOS];
|
||||||
|
|
||||||
QString TypeText;
|
QString TypeText;
|
||||||
|
|
||||||
bool SwashLvlConfigurationInProgress;
|
bool SwashLvlConfigurationInProgress;
|
||||||
UAVObject::Metadata SwashLvlaccInitialData;
|
UAVObject::Metadata SwashLvlaccInitialData;
|
||||||
int SwashLvlState;
|
int SwashLvlState;
|
||||||
int SwashLvlServoInterlock;
|
int SwashLvlServoInterlock;
|
||||||
|
|
||||||
SwashplateServoSettingsStruct oldSwashLvlConfiguration;
|
SwashplateServoSettingsStruct oldSwashLvlConfiguration;
|
||||||
SwashplateServoSettingsStruct newSwashLvlConfiguration;
|
SwashplateServoSettingsStruct newSwashLvlConfiguration;
|
||||||
|
|
||||||
int MixerChannelData[6];
|
int MixerChannelData[6];
|
||||||
int ShowDisclaimer(int messageID);
|
int ShowDisclaimer(int messageID);
|
||||||
virtual void enableControls(bool enable) { Q_UNUSED(enable)}; // Not used by this widget
|
virtual void enableControls(bool enable) { Q_UNUSED(enable)}; // Not used by this widget
|
||||||
|
|
||||||
bool updatingFromHardware;
|
bool updatingFromHardware;
|
||||||
bool updatingToHardware;
|
bool updatingToHardware;
|
||||||
|
|
||||||
virtual void ResetActuators(GUIConfigDataUnion* configData);
|
virtual void ResetActuators(GUIConfigDataUnion* configData);
|
||||||
static QStringList getChannelDescriptions();
|
static QStringList getChannelDescriptions();
|
||||||
|
|
||||||
QString updateConfigObjects();
|
QString updateConfigObjects();
|
||||||
private slots:
|
|
||||||
virtual void setupUI(QString airframeType);
|
|
||||||
virtual void refreshWidgetsValues(QString frameType);
|
|
||||||
virtual QString updateConfigObjectsFromWidgets();
|
|
||||||
virtual bool throwConfigError(QString airframeType);
|
|
||||||
|
|
||||||
void ccpmSwashplateUpdate();
|
private slots:
|
||||||
void ccpmSwashplateRedraw();
|
virtual void setupUI(QString airframeType);
|
||||||
void UpdateMixer();
|
virtual void refreshWidgetsValues(QString frameType);
|
||||||
void UpdateType();
|
virtual QString updateConfigObjectsFromWidgets();
|
||||||
|
virtual bool throwConfigError(QString airframeType);
|
||||||
|
|
||||||
void SwashLvlStartButtonPressed();
|
void ccpmSwashplateUpdate();
|
||||||
void SwashLvlNextButtonPressed();
|
void ccpmSwashplateRedraw();
|
||||||
void SwashLvlCancelButtonPressed();
|
void UpdateMixer();
|
||||||
void SwashLvlFinishButtonPressed();
|
void UpdateType();
|
||||||
|
|
||||||
//void UpdateCCPMOptionsFromUI();
|
void SwashLvlStartButtonPressed();
|
||||||
//void UpdateCCPMUIFromOptions();
|
void SwashLvlNextButtonPressed();
|
||||||
|
void SwashLvlCancelButtonPressed();
|
||||||
|
void SwashLvlFinishButtonPressed();
|
||||||
|
|
||||||
void SetUIComponentVisibilities();
|
//void UpdateCCPMOptionsFromUI();
|
||||||
|
//void UpdateCCPMUIFromOptions();
|
||||||
|
|
||||||
void enableSwashplateLevellingControl(bool state);
|
void SetUIComponentVisibilities();
|
||||||
void setSwashplateLevel(int percent);
|
|
||||||
void SwashLvlSpinBoxChanged(int value);
|
|
||||||
virtual void refreshValues() {}; // Not used
|
|
||||||
|
|
||||||
public slots:
|
void enableSwashplateLevellingControl(bool state);
|
||||||
void getMixer();
|
void setSwashplateLevel(int percent);
|
||||||
void setMixer();
|
void SwashLvlSpinBoxChanged(int value);
|
||||||
void saveccpmUpdate();
|
virtual void refreshValues() {}; // Not used
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void getMixer();
|
||||||
|
void setMixer();
|
||||||
|
void saveccpmUpdate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
|
@ -25,8 +25,11 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "configfixedwingwidget.h"
|
#include "configfixedwingwidget.h"
|
||||||
#include "configvehicletypewidget.h"
|
//#include "configvehicletypewidget.h"
|
||||||
#include "mixersettings.h"
|
#include "mixersettings.h"
|
||||||
|
#include "systemsettings.h"
|
||||||
|
#include "actuatorsettings.h"
|
||||||
|
#include "actuatorcommand.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -38,16 +41,10 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "mixersettings.h"
|
|
||||||
#include "systemsettings.h"
|
|
||||||
#include "actuatorsettings.h"
|
|
||||||
#include "actuatorcommand.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Constructor
|
Constructor
|
||||||
*/
|
*/
|
||||||
ConfigFixedWingWidget::ConfigFixedWingWidget(Ui_AircraftWidget *aircraft, QWidget *parent) : VehicleConfig(parent)
|
ConfigFixedWingWidget::ConfigFixedWingWidget(Ui_FixedWingConfigWidget *aircraft, QWidget *parent) : VehicleConfig(parent)
|
||||||
{
|
{
|
||||||
m_aircraft = aircraft;
|
m_aircraft = aircraft;
|
||||||
}
|
}
|
||||||
@ -60,7 +57,6 @@ ConfigFixedWingWidget::~ConfigFixedWingWidget()
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Virtual function to setup the UI
|
Virtual function to setup the UI
|
||||||
*/
|
*/
|
||||||
@ -70,7 +66,7 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
|
|
||||||
if (frameType == "FixedWing" || frameType == "Elevator aileron rudder") {
|
if (frameType == "FixedWing" || frameType == "Elevator aileron rudder") {
|
||||||
// Setup the UI
|
// Setup the UI
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
//setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
||||||
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Elevator aileron rudder"));
|
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Elevator aileron rudder"));
|
||||||
m_aircraft->fwRudder1ChannelBox->setEnabled(true);
|
m_aircraft->fwRudder1ChannelBox->setEnabled(true);
|
||||||
m_aircraft->fwRudder1Label->setEnabled(true);
|
m_aircraft->fwRudder1Label->setEnabled(true);
|
||||||
@ -92,7 +88,7 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->elevonMixBox->setHidden(true);
|
m_aircraft->elevonMixBox->setHidden(true);
|
||||||
|
|
||||||
} else if (frameType == "FixedWingElevon" || frameType == "Elevon") {
|
} else if (frameType == "FixedWingElevon" || frameType == "Elevon") {
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
//setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
||||||
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Elevon"));
|
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Elevon"));
|
||||||
m_aircraft->fwAileron1Label->setText("Elevon 1");
|
m_aircraft->fwAileron1Label->setText("Elevon 1");
|
||||||
m_aircraft->fwAileron2Label->setText("Elevon 2");
|
m_aircraft->fwAileron2Label->setText("Elevon 2");
|
||||||
@ -111,7 +107,7 @@ void ConfigFixedWingWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->elevonLabel2->setText("Pitch");
|
m_aircraft->elevonLabel2->setText("Pitch");
|
||||||
|
|
||||||
} else if (frameType == "FixedWingVtail" || frameType == "Vtail") {
|
} else if (frameType == "FixedWingVtail" || frameType == "Vtail") {
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
//setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Fixed Wing"));
|
||||||
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Vtail"));
|
setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Vtail"));
|
||||||
m_aircraft->fwRudder1ChannelBox->setEnabled(false);
|
m_aircraft->fwRudder1ChannelBox->setEnabled(false);
|
||||||
m_aircraft->fwRudder1Label->setEnabled(false);
|
m_aircraft->fwRudder1Label->setEnabled(false);
|
||||||
|
@ -27,12 +27,14 @@
|
|||||||
#ifndef CONFIGFIXEDWINGWIDGET_H
|
#ifndef CONFIGFIXEDWINGWIDGET_H
|
||||||
#define CONFIGFIXEDWINGWIDGET_H
|
#define CONFIGFIXEDWINGWIDGET_H
|
||||||
|
|
||||||
#include "ui_airframe.h"
|
#include "cfg_vehicletypes/vehicleconfig.h"
|
||||||
|
#include "ui_airframe_fixedwing.h"
|
||||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "uavtalk/telemetrymanager.h"
|
#include "uavtalk/telemetrymanager.h"
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QItemDelegate>
|
#include <QItemDelegate>
|
||||||
@ -44,13 +46,13 @@ class ConfigFixedWingWidget: public VehicleConfig
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConfigFixedWingWidget(Ui_AircraftWidget *aircraft = 0, QWidget *parent = 0);
|
ConfigFixedWingWidget(Ui_FixedWingConfigWidget *aircraft = 0, QWidget *parent = 0);
|
||||||
~ConfigFixedWingWidget();
|
~ConfigFixedWingWidget();
|
||||||
|
|
||||||
friend class ConfigVehicleTypeWidget;
|
friend class ConfigVehicleTypeWidget;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_AircraftWidget *m_aircraft;
|
Ui_FixedWingConfigWidget *m_aircraft;
|
||||||
|
|
||||||
bool setupFrameFixedWing(QString airframeType);
|
bool setupFrameFixedWing(QString airframeType);
|
||||||
bool setupFrameElevon(QString airframeType);
|
bool setupFrameElevon(QString airframeType);
|
||||||
|
@ -25,8 +25,11 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "configgroundvehiclewidget.h"
|
#include "configgroundvehiclewidget.h"
|
||||||
#include "configvehicletypewidget.h"
|
//#include "configvehicletypewidget.h"
|
||||||
#include "mixersettings.h"
|
#include "mixersettings.h"
|
||||||
|
#include "systemsettings.h"
|
||||||
|
#include "actuatorsettings.h"
|
||||||
|
#include "actuatorcommand.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -38,23 +41,11 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "mixersettings.h"
|
ConfigGroundVehicleWidget::ConfigGroundVehicleWidget(Ui_GroundConfigWidget *aircraft, QWidget *parent) : VehicleConfig(parent)
|
||||||
#include "systemsettings.h"
|
|
||||||
#include "actuatorsettings.h"
|
|
||||||
#include "actuatorcommand.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
Constructor
|
|
||||||
*/
|
|
||||||
ConfigGroundVehicleWidget::ConfigGroundVehicleWidget(Ui_AircraftWidget *aircraft, QWidget *parent) : VehicleConfig(parent)
|
|
||||||
{
|
{
|
||||||
m_aircraft = aircraft;
|
m_aircraft = aircraft;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Destructor
|
|
||||||
*/
|
|
||||||
ConfigGroundVehicleWidget::~ConfigGroundVehicleWidget()
|
ConfigGroundVehicleWidget::~ConfigGroundVehicleWidget()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
@ -68,7 +59,7 @@ void ConfigGroundVehicleWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->differentialSteeringMixBox->setHidden(true);
|
m_aircraft->differentialSteeringMixBox->setHidden(true);
|
||||||
//STILL NEEDS WORK
|
//STILL NEEDS WORK
|
||||||
// Setup the UI
|
// Setup the UI
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Ground"));
|
//setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Ground"));
|
||||||
|
|
||||||
m_aircraft->gvEngineChannelBox->setEnabled(false);
|
m_aircraft->gvEngineChannelBox->setEnabled(false);
|
||||||
m_aircraft->gvEngineLabel->setEnabled(false);
|
m_aircraft->gvEngineLabel->setEnabled(false);
|
||||||
|
@ -27,12 +27,14 @@
|
|||||||
#ifndef CONFIGGROUNDVEHICLEWIDGET_H
|
#ifndef CONFIGGROUNDVEHICLEWIDGET_H
|
||||||
#define CONFIGGROUNDVEHICLEWIDGET_H
|
#define CONFIGGROUNDVEHICLEWIDGET_H
|
||||||
|
|
||||||
#include "ui_airframe.h"
|
#include "cfg_vehicletypes/vehicleconfig.h"
|
||||||
|
#include "ui_airframe_ground.h"
|
||||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "uavtalk/telemetrymanager.h"
|
#include "uavtalk/telemetrymanager.h"
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QItemDelegate>
|
#include <QItemDelegate>
|
||||||
@ -44,13 +46,13 @@ class ConfigGroundVehicleWidget: public VehicleConfig
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConfigGroundVehicleWidget(Ui_AircraftWidget *aircraft = 0, QWidget *parent = 0);
|
ConfigGroundVehicleWidget(Ui_GroundConfigWidget *aircraft = 0, QWidget *parent = 0);
|
||||||
~ConfigGroundVehicleWidget();
|
~ConfigGroundVehicleWidget();
|
||||||
|
|
||||||
friend class ConfigVehicleTypeWidget;
|
friend class ConfigVehicleTypeWidget;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_AircraftWidget *m_aircraft;
|
Ui_GroundConfigWidget *m_aircraft;
|
||||||
|
|
||||||
bool setupGroundVehicleCar(QString airframeType);
|
bool setupGroundVehicleCar(QString airframeType);
|
||||||
bool setupGroundVehicleDifferential(QString airframeType);
|
bool setupGroundVehicleDifferential(QString airframeType);
|
||||||
@ -65,7 +67,6 @@ private slots:
|
|||||||
virtual QString updateConfigObjectsFromWidgets();
|
virtual QString updateConfigObjectsFromWidgets();
|
||||||
virtual bool throwConfigError(QString airframeType);
|
virtual bool throwConfigError(QString airframeType);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -25,6 +25,10 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "configmultirotorwidget.h"
|
#include "configmultirotorwidget.h"
|
||||||
|
#include "mixersettings.h"
|
||||||
|
#include "systemsettings.h"
|
||||||
|
#include "actuatorsettings.h"
|
||||||
|
#include "actuatorcommand.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -37,46 +41,33 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "mixersettings.h"
|
|
||||||
#include "systemsettings.h"
|
|
||||||
#include "actuatorsettings.h"
|
|
||||||
#include "actuatorcommand.h"
|
|
||||||
|
|
||||||
|
|
||||||
const QString ConfigMultiRotorWidget::CHANNELBOXNAME = QString("multiMotorChannelBox");
|
const QString ConfigMultiRotorWidget::CHANNELBOXNAME = QString("multiMotorChannelBox");
|
||||||
|
|
||||||
|
ConfigMultiRotorWidget::ConfigMultiRotorWidget(Ui_MultiRotorConfigWidget *aircraft, QWidget *parent) : VehicleConfig(parent), invertMotors(1)
|
||||||
/**
|
|
||||||
Constructor
|
|
||||||
*/
|
|
||||||
ConfigMultiRotorWidget::ConfigMultiRotorWidget(Ui_AircraftWidget *aircraft, QWidget *parent) : VehicleConfig(parent), invertMotors(1)
|
|
||||||
{
|
{
|
||||||
m_aircraft = aircraft;
|
m_aircraft = aircraft;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Destructor
|
|
||||||
*/
|
|
||||||
ConfigMultiRotorWidget::~ConfigMultiRotorWidget()
|
ConfigMultiRotorWidget::~ConfigMultiRotorWidget()
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConfigMultiRotorWidget::setupUI(QString frameType)
|
void ConfigMultiRotorWidget::setupUI(QString frameType)
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_aircraft);
|
Q_ASSERT(m_aircraft);
|
||||||
Q_ASSERT(uiowner);
|
Q_ASSERT(uiowner);
|
||||||
Q_ASSERT(quad);
|
Q_ASSERT(quad);
|
||||||
|
|
||||||
int i;
|
qDebug() << "ConfigMultiRotorWidget::setupUI - begin";
|
||||||
|
qDebug() << "ConfigMultiRotorWidget::setupUI - frame type" << frameType;
|
||||||
|
|
||||||
// set aircraftType to Multirotor, disable triyaw channel
|
// set aircraftType to Multirotor, disable triyaw channel
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Multirotor"));
|
//setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Multirotor"));
|
||||||
m_aircraft->triYawChannelBox->setEnabled(false);
|
m_aircraft->triYawChannelBox->setEnabled(false);
|
||||||
|
|
||||||
// disable all motor channel boxes
|
// disable all motor channel boxes
|
||||||
for (i=1; i <=8; i++) {
|
for (int i = 1; i <= 8; i++) {
|
||||||
// do it manually so we can turn off any error decorations
|
// do it manually so we can turn off any error decorations
|
||||||
QComboBox *combobox = qFindChild<QComboBox*>(uiowner, "multiMotorChannelBox" + QString::number(i));
|
QComboBox *combobox = qFindChild<QComboBox*>(uiowner, "multiMotorChannelBox" + QString::number(i));
|
||||||
if (combobox) {
|
if (combobox) {
|
||||||
@ -118,8 +109,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->mrPitchMixLevel->setValue(100);
|
m_aircraft->mrPitchMixLevel->setValue(100);
|
||||||
setYawMixLevel(50);
|
setYawMixLevel(50);
|
||||||
}
|
}
|
||||||
else if (frameType == "Hexa" || frameType == "Hexacopter")
|
else if (frameType == "Hexa" || frameType == "Hexacopter") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Hexacopter"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Hexacopter"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes...
|
//Enable all necessary motor channel boxes...
|
||||||
@ -140,8 +130,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
setYawMixLevel(33);
|
setYawMixLevel(33);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (frameType == "HexaCoax" || frameType == "Hexacopter Y6")
|
else if (frameType == "HexaCoax" || frameType == "Hexacopter Y6") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Hexacopter Y6"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Hexacopter Y6"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes...
|
//Enable all necessary motor channel boxes...
|
||||||
@ -152,8 +141,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
setYawMixLevel(66);
|
setYawMixLevel(66);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (frameType == "Octo" || frameType == "Octocopter")
|
else if (frameType == "Octo" || frameType == "Octocopter") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octocopter"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octocopter"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes
|
//Enable all necessary motor channel boxes
|
||||||
@ -163,8 +151,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
m_aircraft->mrPitchMixLevel->setValue(33);
|
m_aircraft->mrPitchMixLevel->setValue(33);
|
||||||
setYawMixLevel(25);
|
setYawMixLevel(25);
|
||||||
}
|
}
|
||||||
else if (frameType == "OctoV" || frameType == "Octocopter V")
|
else if (frameType == "OctoV" || frameType == "Octocopter V") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octocopter V"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octocopter V"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes
|
//Enable all necessary motor channel boxes
|
||||||
@ -175,8 +162,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
setYawMixLevel(25);
|
setYawMixLevel(25);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (frameType == "OctoCoaxP" || frameType == "Octo Coax +")
|
else if (frameType == "OctoCoaxP" || frameType == "Octo Coax +") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octo Coax +"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octo Coax +"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes
|
//Enable all necessary motor channel boxes
|
||||||
@ -187,8 +173,7 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
setYawMixLevel(50);
|
setYawMixLevel(50);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (frameType == "OctoCoaxX" || frameType == "Octo Coax X")
|
else if (frameType == "OctoCoaxX" || frameType == "Octo Coax X") {
|
||||||
{
|
|
||||||
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octo Coax X"));
|
setComboCurrentIndex( m_aircraft->multirotorFrameType, m_aircraft->multirotorFrameType->findText("Octo Coax X"));
|
||||||
|
|
||||||
//Enable all necessary motor channel boxes
|
//Enable all necessary motor channel boxes
|
||||||
@ -199,82 +184,82 @@ void ConfigMultiRotorWidget::setupUI(QString frameType)
|
|||||||
setYawMixLevel(50);
|
setYawMixLevel(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw the appropriate airframe
|
// Draw the appropriate airframe
|
||||||
drawAirframe(frameType);
|
drawAirframe(frameType);
|
||||||
|
qDebug() << "ConfigMultiRotorWidget::setupUI - end";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigMultiRotorWidget::drawAirframe(QString frameType){
|
void ConfigMultiRotorWidget::drawAirframe(QString frameType)
|
||||||
|
{
|
||||||
|
qDebug() << "ConfigMultiRotorWidget::drawAirframe - begin";
|
||||||
|
qDebug() << "ConfigMultiRotorWidget::drawAirframe - frame type:" << frameType;
|
||||||
|
|
||||||
invertMotors = m_aircraft->MultirotorRevMixercheckBox->isChecked() ? -1:1;
|
invertMotors = m_aircraft->MultirotorRevMixercheckBox->isChecked() ? -1 : 1;
|
||||||
|
|
||||||
if (frameType == "Tri" || frameType == "Tricopter Y") {
|
if (frameType == "Tri" || frameType == "Tricopter Y") {
|
||||||
if(invertMotors > 0)
|
if (invertMotors > 0) {
|
||||||
quad->setElementId("tri");
|
quad->setElementId("tri");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("tri_reverse");
|
quad->setElementId("tri_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "QuadX" || frameType == "Quad X") {
|
} else if (frameType == "QuadX" || frameType == "Quad X") {
|
||||||
if(invertMotors > 0)
|
qDebug() << "ConfigMultiRotorWidget::drawAirframe - 1";
|
||||||
|
if (invertMotors > 0) {
|
||||||
quad->setElementId("quad-x");
|
quad->setElementId("quad-x");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-x_reverse");
|
quad->setElementId("quad-x_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "QuadP" || frameType == "Quad +") {
|
qDebug() << "ConfigMultiRotorWidget::drawAirframe - 2";
|
||||||
if(invertMotors > 0)
|
} else if (frameType == "QuadP" || frameType == "Quad +") {
|
||||||
|
if (invertMotors > 0) {
|
||||||
quad->setElementId("quad-plus");
|
quad->setElementId("quad-plus");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-plus_reverse");
|
quad->setElementId("quad-plus_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "Hexa" || frameType == "Hexacopter")
|
} else if (frameType == "Hexa" || frameType == "Hexacopter") {
|
||||||
{
|
if (invertMotors > 0) {
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("quad-hexa");
|
quad->setElementId("quad-hexa");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-hexa_reverse");
|
quad->setElementId("quad-hexa_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "HexaX" || frameType == "Hexacopter X" ) {
|
} else if (frameType == "HexaX" || frameType == "Hexacopter X") {
|
||||||
if(invertMotors > 0)
|
if (invertMotors > 0) {
|
||||||
quad->setElementId("quad-hexa-H");
|
quad->setElementId("quad-hexa-H");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-hexa-H_reverse");
|
quad->setElementId("quad-hexa-H_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "HexaCoax" || frameType == "Hexacopter Y6")
|
} else if (frameType == "HexaCoax" || frameType == "Hexacopter Y6") {
|
||||||
{
|
if (invertMotors > 0) {
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("hexa-coax");
|
quad->setElementId("hexa-coax");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("hexa-coax_reverse");
|
quad->setElementId("hexa-coax_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "Octo" || frameType == "Octocopter")
|
} else if (frameType == "Octo" || frameType == "Octocopter") {
|
||||||
{
|
if (invertMotors > 0) {
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("quad-octo");
|
quad->setElementId("quad-octo");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-octo_reverse");
|
quad->setElementId("quad-octo_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "OctoV" || frameType == "Octocopter V")
|
} else if (frameType == "OctoV" || frameType == "Octocopter V") {
|
||||||
{
|
if (invertMotors > 0) {
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("quad-octo-v");
|
quad->setElementId("quad-octo-v");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("quad-octo-v_reverse");
|
quad->setElementId("quad-octo-v_reverse");
|
||||||
}
|
}
|
||||||
else if (frameType == "OctoCoaxP" || frameType == "Octo Coax +")
|
} else if (frameType == "OctoCoaxP" || frameType == "Octo Coax +") {
|
||||||
{
|
if (invertMotors > 0) {
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("octo-coax-P");
|
quad->setElementId("octo-coax-P");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("octo-coax-P_reverse");
|
quad->setElementId("octo-coax-P_reverse");
|
||||||
|
}
|
||||||
}
|
} else if (frameType == "OctoCoaxX" || frameType == "Octo Coax X") {
|
||||||
else if (frameType == "OctoCoaxX" || frameType == "Octo Coax X")
|
if (invertMotors > 0) {
|
||||||
{
|
|
||||||
if(invertMotors > 0)
|
|
||||||
quad->setElementId("octo-coax-X");
|
quad->setElementId("octo-coax-X");
|
||||||
else
|
} else {
|
||||||
quad->setElementId("octo-coax-X_reverse");
|
quad->setElementId("octo-coax-X_reverse");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
qDebug() << "ConfigMultiRotorWidget::drawAirframe - end";
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigMultiRotorWidget::ResetActuators(GUIConfigDataUnion* configData)
|
void ConfigMultiRotorWidget::ResetActuators(GUIConfigDataUnion* configData)
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
#ifndef CONFIGMULTIROTORWIDGET_H
|
#ifndef CONFIGMULTIROTORWIDGET_H
|
||||||
#define CONFIGMULTIROTORWIDGET_H
|
#define CONFIGMULTIROTORWIDGET_H
|
||||||
|
|
||||||
#include "ui_airframe.h"
|
|
||||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
|
||||||
#include "cfg_vehicletypes/vehicleconfig.h"
|
#include "cfg_vehicletypes/vehicleconfig.h"
|
||||||
|
#include "ui_airframe_multirotor.h"
|
||||||
|
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "uavtalk/telemetrymanager.h"
|
#include "uavtalk/telemetrymanager.h"
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QItemDelegate>
|
#include <QItemDelegate>
|
||||||
@ -46,13 +46,13 @@ class ConfigMultiRotorWidget: public VehicleConfig
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConfigMultiRotorWidget(Ui_AircraftWidget *aircraft = 0, QWidget *parent = 0);
|
ConfigMultiRotorWidget(Ui_MultiRotorConfigWidget *aircraft = 0, QWidget *parent = 0);
|
||||||
~ConfigMultiRotorWidget();
|
~ConfigMultiRotorWidget();
|
||||||
|
|
||||||
friend class ConfigVehicleTypeWidget;
|
friend class ConfigVehicleTypeWidget;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_AircraftWidget *m_aircraft;
|
Ui_MultiRotorConfigWidget *m_aircraft;
|
||||||
|
|
||||||
QWidget *uiowner;
|
QWidget *uiowner;
|
||||||
QGraphicsSvgItem *quad;
|
QGraphicsSvgItem *quad;
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "extensionsystem/pluginmanager.h"
|
#include "extensionsystem/pluginmanager.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
|
|
||||||
#include "systemsettings.h"
|
#include "systemsettings.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "actuatorcommand.h"
|
#include "actuatorcommand.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint VTOLMotorN:4;
|
uint VTOLMotorN:4;
|
||||||
uint VTOLMotorS:4;
|
uint VTOLMotorS:4;
|
||||||
@ -103,60 +102,79 @@ typedef union
|
|||||||
groundGUISettingsStruct ground;
|
groundGUISettingsStruct ground;
|
||||||
} GUIConfigDataUnion;
|
} GUIConfigDataUnion;
|
||||||
|
|
||||||
|
|
||||||
class VehicleConfig: public ConfigTaskWidget
|
class VehicleConfig: public ConfigTaskWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VehicleConfig(QWidget *parent = 0);
|
VehicleConfig(QWidget *parent = 0);
|
||||||
~VehicleConfig();
|
~VehicleConfig();
|
||||||
|
|
||||||
/* Enumeration options for ThrottleCurves */
|
/* Enumeration options for ThrottleCurves */
|
||||||
typedef enum { MIXER_THROTTLECURVE1=0, MIXER_THROTTLECURVE2=1 } MixerThrottleCurveElem;
|
typedef enum {
|
||||||
|
MIXER_THROTTLECURVE1 = 0, MIXER_THROTTLECURVE2 = 1
|
||||||
|
} MixerThrottleCurveElem;
|
||||||
|
|
||||||
/* Enumeration options for field MixerType */
|
/* Enumeration options for field MixerType */
|
||||||
typedef enum { MIXERTYPE_DISABLED=0, MIXERTYPE_MOTOR=1, MIXERTYPE_SERVO=2, MIXERTYPE_CAMERAROLL=3, MIXERTYPE_CAMERAPITCH=4, MIXERTYPE_CAMERAYAW=5, MIXERTYPE_ACCESSORY0=6, MIXERTYPE_ACCESSORY1=7, MIXERTYPE_ACCESSORY2=8, MIXERTYPE_ACCESSORY3=9, MIXERTYPE_ACCESSORY4=10, MIXERTYPE_ACCESSORY5=11 } MixerTypeElem;
|
typedef enum {
|
||||||
/* Array element names for field MixerVector */
|
MIXERTYPE_DISABLED = 0,
|
||||||
typedef enum { MIXERVECTOR_THROTTLECURVE1=0, MIXERVECTOR_THROTTLECURVE2=1, MIXERVECTOR_ROLL=2, MIXERVECTOR_PITCH=3, MIXERVECTOR_YAW=4 } MixerVectorElem;
|
MIXERTYPE_MOTOR = 1,
|
||||||
|
MIXERTYPE_SERVO = 2,
|
||||||
|
MIXERTYPE_CAMERAROLL = 3,
|
||||||
|
MIXERTYPE_CAMERAPITCH = 4,
|
||||||
|
MIXERTYPE_CAMERAYAW = 5,
|
||||||
|
MIXERTYPE_ACCESSORY0 = 6,
|
||||||
|
MIXERTYPE_ACCESSORY1 = 7,
|
||||||
|
MIXERTYPE_ACCESSORY2 = 8,
|
||||||
|
MIXERTYPE_ACCESSORY3 = 9,
|
||||||
|
MIXERTYPE_ACCESSORY4 = 10,
|
||||||
|
MIXERTYPE_ACCESSORY5 = 11
|
||||||
|
} MixerTypeElem;
|
||||||
|
|
||||||
static GUIConfigDataUnion GetConfigData();
|
/* Array element names for field MixerVector */
|
||||||
static void SetConfigData(GUIConfigDataUnion configData);
|
typedef enum {
|
||||||
static void resetField(UAVObjectField * field);
|
MIXERVECTOR_THROTTLECURVE1 = 0,
|
||||||
static void setComboCurrentIndex(QComboBox* box, int index);
|
MIXERVECTOR_THROTTLECURVE2 = 1,
|
||||||
static void enableComboBoxes(QWidget* owner, QString boxName, int boxCount, bool enable);
|
MIXERVECTOR_ROLL = 2,
|
||||||
double getMixerVectorValue(UAVDataObject* mixer, int channel, MixerVectorElem elementName);
|
MIXERVECTOR_PITCH = 3,
|
||||||
void setMixerVectorValue(UAVDataObject* mixer, int channel, MixerVectorElem elementName, double value);
|
MIXERVECTOR_YAW = 4
|
||||||
void resetMixerVector(UAVDataObject* mixer, int channel);
|
} MixerVectorElem;
|
||||||
void resetMotorAndServoMixers(UAVDataObject* mixer);
|
|
||||||
QString getMixerType(UAVDataObject* mixer, int channel);
|
|
||||||
void setMixerType(UAVDataObject* mixer, int channel, MixerTypeElem mixerType);
|
|
||||||
double getMixerValue(UAVDataObject* mixer, QString elementName);
|
|
||||||
void setMixerValue(UAVDataObject* mixer, QString elementName, double value);
|
|
||||||
void setThrottleCurve(UAVDataObject* mixer, MixerThrottleCurveElem curveType, QList<double> curve);
|
|
||||||
void getThrottleCurve(UAVDataObject* mixer, MixerThrottleCurveElem curveType, QList<double>* curve);
|
|
||||||
bool isValidThrottleCurve(QList<double>* curve);
|
|
||||||
double getCurveMin(QList<double>* curve);
|
|
||||||
double getCurveMax(QList<double>* curve);
|
|
||||||
virtual void ResetActuators(GUIConfigDataUnion* configData);
|
|
||||||
|
|
||||||
QStringList channelNames;
|
static GUIConfigDataUnion GetConfigData();
|
||||||
QStringList mixerTypes;
|
static void SetConfigData(GUIConfigDataUnion configData);
|
||||||
QStringList mixerVectors;
|
static void resetField(UAVObjectField * field);
|
||||||
QStringList mixerTypeDescriptions;
|
static void setComboCurrentIndex(QComboBox* box, int index);
|
||||||
|
static void enableComboBoxes(QWidget* owner, QString boxName, int boxCount, bool enable);
|
||||||
|
double getMixerVectorValue(UAVDataObject* mixer, int channel, MixerVectorElem elementName);
|
||||||
|
void setMixerVectorValue(UAVDataObject* mixer, int channel, MixerVectorElem elementName, double value);
|
||||||
|
void resetMixerVector(UAVDataObject* mixer, int channel);
|
||||||
|
void resetMotorAndServoMixers(UAVDataObject* mixer);
|
||||||
|
QString getMixerType(UAVDataObject* mixer, int channel);
|
||||||
|
void setMixerType(UAVDataObject* mixer, int channel, MixerTypeElem mixerType);
|
||||||
|
double getMixerValue(UAVDataObject* mixer, QString elementName);
|
||||||
|
void setMixerValue(UAVDataObject* mixer, QString elementName, double value);
|
||||||
|
void setThrottleCurve(UAVDataObject* mixer, MixerThrottleCurveElem curveType, QList<double> curve);
|
||||||
|
void getThrottleCurve(UAVDataObject* mixer, MixerThrottleCurveElem curveType, QList<double>* curve);
|
||||||
|
bool isValidThrottleCurve(QList<double>* curve);
|
||||||
|
double getCurveMin(QList<double>* curve);
|
||||||
|
double getCurveMax(QList<double>* curve);
|
||||||
|
virtual void ResetActuators(GUIConfigDataUnion* configData);
|
||||||
|
|
||||||
static const quint32 CHANNEL_NUMELEM = ActuatorCommand::CHANNEL_NUMELEM;
|
QStringList channelNames;
|
||||||
|
QStringList mixerTypes;
|
||||||
|
QStringList mixerVectors;
|
||||||
|
QStringList mixerTypeDescriptions;
|
||||||
|
|
||||||
private:
|
static const quint32 CHANNEL_NUMELEM = ActuatorCommand::CHANNEL_NUMELEM;;
|
||||||
|
|
||||||
static UAVObjectManager* getUAVObjectManager();
|
private:
|
||||||
|
static UAVObjectManager* getUAVObjectManager();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//void ConfigurationChanged();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ HEADERS += configplugin.h \
|
|||||||
config_cc_hw_widget.h \
|
config_cc_hw_widget.h \
|
||||||
configccattitudewidget.h \
|
configccattitudewidget.h \
|
||||||
configpipxtremewidget.h \
|
configpipxtremewidget.h \
|
||||||
cfg_vehicletypes/configccpmwidget.h \
|
|
||||||
configstabilizationwidget.h \
|
configstabilizationwidget.h \
|
||||||
assertions.h \
|
assertions.h \
|
||||||
calibration.h \
|
calibration.h \
|
||||||
@ -28,10 +27,11 @@ HEADERS += configplugin.h \
|
|||||||
configcamerastabilizationwidget.h \
|
configcamerastabilizationwidget.h \
|
||||||
configtxpidwidget.h \
|
configtxpidwidget.h \
|
||||||
outputchannelform.h \
|
outputchannelform.h \
|
||||||
cfg_vehicletypes/configmultirotorwidget.h \
|
|
||||||
cfg_vehicletypes/configgroundvehiclewidget.h \
|
|
||||||
cfg_vehicletypes/configfixedwingwidget.h \
|
|
||||||
cfg_vehicletypes/vehicleconfig.h \
|
cfg_vehicletypes/vehicleconfig.h \
|
||||||
|
cfg_vehicletypes/configccpmwidget.h \
|
||||||
|
cfg_vehicletypes/configmultirotorwidget.h \
|
||||||
|
cfg_vehicletypes/configfixedwingwidget.h \
|
||||||
|
cfg_vehicletypes/configgroundvehiclewidget.h \
|
||||||
configrevowidget.h \
|
configrevowidget.h \
|
||||||
config_global.h \
|
config_global.h \
|
||||||
mixercurve.h \
|
mixercurve.h \
|
||||||
@ -60,17 +60,22 @@ SOURCES += configplugin.cpp \
|
|||||||
configcamerastabilizationwidget.cpp \
|
configcamerastabilizationwidget.cpp \
|
||||||
configrevowidget.cpp \
|
configrevowidget.cpp \
|
||||||
configtxpidwidget.cpp \
|
configtxpidwidget.cpp \
|
||||||
cfg_vehicletypes/configmultirotorwidget.cpp \
|
|
||||||
cfg_vehicletypes/configgroundvehiclewidget.cpp \
|
|
||||||
cfg_vehicletypes/configfixedwingwidget.cpp \
|
|
||||||
cfg_vehicletypes/configccpmwidget.cpp \
|
|
||||||
outputchannelform.cpp \
|
|
||||||
cfg_vehicletypes/vehicleconfig.cpp \
|
cfg_vehicletypes/vehicleconfig.cpp \
|
||||||
|
cfg_vehicletypes/configccpmwidget.cpp \
|
||||||
|
cfg_vehicletypes/configmultirotorwidget.cpp \
|
||||||
|
cfg_vehicletypes/configfixedwingwidget.cpp \
|
||||||
|
cfg_vehicletypes/configgroundvehiclewidget.cpp \
|
||||||
|
outputchannelform.cpp \
|
||||||
mixercurve.cpp \
|
mixercurve.cpp \
|
||||||
dblspindelegate.cpp \
|
dblspindelegate.cpp \
|
||||||
configrevohwwidget.cpp
|
configrevohwwidget.cpp
|
||||||
|
|
||||||
FORMS += airframe.ui \
|
FORMS += airframe.ui \
|
||||||
|
cfg_vehicletypes/airframe_ccpm.ui \
|
||||||
|
cfg_vehicletypes/airframe_fixedwing.ui \
|
||||||
|
cfg_vehicletypes/airframe_ground.ui \
|
||||||
|
cfg_vehicletypes/airframe_multirotor.ui \
|
||||||
|
cfg_vehicletypes/airframe_custom.ui \
|
||||||
cc_hw_settings.ui \
|
cc_hw_settings.ui \
|
||||||
ccpm.ui \
|
ccpm.ui \
|
||||||
stabilization.ui \
|
stabilization.ui \
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#include "configvehicletypewidget.h"
|
#include "configvehicletypewidget.h"
|
||||||
|
#include "systemsettings.h"
|
||||||
|
#include "mixersettings.h"
|
||||||
|
#include "actuatorsettings.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -38,13 +41,9 @@
|
|||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
|
|
||||||
#include "systemsettings.h"
|
|
||||||
#include "mixersettings.h"
|
|
||||||
#include "actuatorsettings.h"
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
#include <coreplugin/generalsettings.h>
|
#include <coreplugin/generalsettings.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Helper delegate for the custom mixer editor table.
|
Helper delegate for the custom mixer editor table.
|
||||||
Taken straight from Qt examples, thanks!
|
Taken straight from Qt examples, thanks!
|
||||||
@ -92,10 +91,6 @@ void SpinBoxDelegate::updateEditorGeometry(QWidget *editor,
|
|||||||
|
|
||||||
/**********************************************************************************/
|
/**********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
Constructor
|
|
||||||
*/
|
|
||||||
ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||||
{
|
{
|
||||||
m_aircraft = new Ui_AircraftWidget();
|
m_aircraft = new Ui_AircraftWidget();
|
||||||
@ -103,8 +98,9 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
|
|
||||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||||
if(!settings->useExpertMode())
|
if (!settings->useExpertMode()) {
|
||||||
m_aircraft->saveAircraftToRAM->setVisible(false);
|
m_aircraft->saveAircraftToRAM->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
addApplySaveButtons(m_aircraft->saveAircraftToRAM,m_aircraft->saveAircraftToSD);
|
addApplySaveButtons(m_aircraft->saveAircraftToRAM,m_aircraft->saveAircraftToSD);
|
||||||
|
|
||||||
@ -115,49 +111,44 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
ffTuningInProgress = false;
|
ffTuningInProgress = false;
|
||||||
ffTuningPhase = false;
|
ffTuningPhase = false;
|
||||||
|
|
||||||
//Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
|
||||||
channelNames << "None";
|
|
||||||
for (int i = 0; i < (int)ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
|
|
||||||
|
|
||||||
mixerTypes << QString("Mixer%1Type").arg(i+1);
|
|
||||||
mixerVectors << QString("Mixer%1Vector").arg(i+1);
|
|
||||||
channelNames << QString("Channel%1").arg(i+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList airframeTypes;
|
QStringList airframeTypes;
|
||||||
airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom";
|
airframeTypes << "Fixed Wing" << "Multirotor" << "Helicopter" << "Ground" << "Custom";
|
||||||
m_aircraft->aircraftType->addItems(airframeTypes);
|
m_aircraft->aircraftType->addItems(airframeTypes);
|
||||||
m_aircraft->aircraftType->setCurrentIndex(1); //Set default vehicle to MultiRotor
|
|
||||||
m_aircraft->airframesWidget->setCurrentIndex(1); // Force the tab index to match
|
// *****************************************************************************************************************
|
||||||
|
// FIXED WING
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
|
||||||
|
// create and setup a FixedWing config widget
|
||||||
|
QWidget *fixedwingConfigWidget = new QWidget();
|
||||||
|
m_fixedwingUi = new Ui_FixedWingConfigWidget();
|
||||||
|
m_fixedwingUi->setupUi(fixedwingConfigWidget);
|
||||||
|
m_aircraft->airframesWidget->addWidget(fixedwingConfigWidget);
|
||||||
|
|
||||||
|
m_fixedwing = new ConfigFixedWingWidget(m_fixedwingUi);
|
||||||
|
m_fixedwing->setupUI(m_fixedwingUi->fixedWingType->currentText() );
|
||||||
|
|
||||||
QStringList fixedWingTypes;
|
QStringList fixedWingTypes;
|
||||||
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
fixedWingTypes << "Elevator aileron rudder" << "Elevon" << "Vtail";
|
||||||
m_aircraft->fixedWingType->addItems(fixedWingTypes);
|
m_fixedwingUi->fixedWingType->addItems(fixedWingTypes);
|
||||||
m_aircraft->fixedWingType->setCurrentIndex(0); //Set default model to "Elevator aileron rudder"
|
m_fixedwingUi->fixedWingType->setCurrentIndex(0); //Set default model to "Elevator aileron rudder"
|
||||||
|
|
||||||
QStringList groundVehicleTypes;
|
connect(m_fixedwingUi->fixedWingType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
||||||
groundVehicleTypes << "Turnable (car)" << "Differential (tank)" << "Motorcycle";
|
|
||||||
m_aircraft->groundVehicleType->addItems(groundVehicleTypes);
|
|
||||||
m_aircraft->groundVehicleType->setCurrentIndex(0); //Set default model to "Turnable (car)"
|
|
||||||
|
|
||||||
QStringList multiRotorTypes;
|
// *****************************************************************************************************************
|
||||||
multiRotorTypes << "Tricopter Y"<< "Quad +" << "Quad X" <<
|
// MULTIROTOR
|
||||||
"Hexacopter" << "Hexacopter X" << "Hexacopter Y6" <<
|
// *****************************************************************************************************************
|
||||||
"Octocopter" << "Octocopter V" << "Octo Coax +" << "Octo Coax X" ;
|
|
||||||
m_aircraft->multirotorFrameType->addItems(multiRotorTypes);
|
|
||||||
m_aircraft->multirotorFrameType->setCurrentIndex(2); //Set default model to "Quad X"
|
|
||||||
|
|
||||||
|
// create and setup a MultiRotor config widget
|
||||||
|
qDebug() << "create multirotor ui";
|
||||||
|
QWidget *multirotorConfigWidget = new QWidget();
|
||||||
|
m_multirotorUi = new Ui_MultiRotorConfigWidget();
|
||||||
|
m_multirotorUi->setupUi(multirotorConfigWidget);
|
||||||
|
m_aircraft->airframesWidget->addWidget(multirotorConfigWidget);
|
||||||
|
|
||||||
//NEW STYLE: Loop through the widgets looking for all widgets that have "ChannelBox" in their name
|
|
||||||
// The upshot of this is that ALL new ComboBox widgets for selecting the output channel must have "ChannelBox" in their name
|
|
||||||
foreach(QComboBox *combobox, this->findChildren<QComboBox*>(QRegExp("\\S+ChannelBo\\S+")))//FOR WHATEVER REASON, THIS DOES NOT WORK WITH ChannelBox. ChannelBo is sufficiently accurate
|
|
||||||
{
|
|
||||||
combobox->addItems(channelNames);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the Multirotor picture in the Quad settings interface
|
// Setup the Multirotor picture in the Quad settings interface
|
||||||
m_aircraft->quadShape->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_multirotorUi->quadShape->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
m_aircraft->quadShape->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_multirotorUi->quadShape->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
QSvgRenderer *renderer = new QSvgRenderer();
|
QSvgRenderer *renderer = new QSvgRenderer();
|
||||||
renderer->load(QString(":/configgadget/images/multirotor-shapes.svg"));
|
renderer->load(QString(":/configgadget/images/multirotor-shapes.svg"));
|
||||||
quad = new QGraphicsSvgItem();
|
quad = new QGraphicsSvgItem();
|
||||||
@ -166,66 +157,129 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
|||||||
QGraphicsScene *scene = new QGraphicsScene(this);
|
QGraphicsScene *scene = new QGraphicsScene(this);
|
||||||
scene->addItem(quad);
|
scene->addItem(quad);
|
||||||
scene->setSceneRect(quad->boundingRect());
|
scene->setSceneRect(quad->boundingRect());
|
||||||
m_aircraft->quadShape->setScene(scene);
|
m_multirotorUi->quadShape->setScene(scene);
|
||||||
|
|
||||||
|
m_multirotor = new ConfigMultiRotorWidget(m_multirotorUi);
|
||||||
|
m_multirotor->quad = quad;
|
||||||
|
m_multirotor->uiowner = this;
|
||||||
|
m_multirotor->setupUI(m_multirotorUi->multirotorFrameType->currentText());
|
||||||
|
|
||||||
|
QStringList multiRotorTypes;
|
||||||
|
multiRotorTypes << "Tricopter Y"<< "Quad +" << "Quad X" <<
|
||||||
|
"Hexacopter" << "Hexacopter X" << "Hexacopter Y6" <<
|
||||||
|
"Octocopter" << "Octocopter V" << "Octo Coax +" << "Octo Coax X" ;
|
||||||
|
m_multirotorUi->multirotorFrameType->addItems(multiRotorTypes);
|
||||||
|
m_multirotorUi->multirotorFrameType->setCurrentIndex(2); //Set default model to "Quad X"
|
||||||
|
|
||||||
|
connect(m_multirotorUi->multirotorFrameType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
||||||
|
|
||||||
|
// Connect the multirotor motor reverse checkbox
|
||||||
|
connect(m_multirotorUi->MultirotorRevMixercheckBox, SIGNAL(clicked(bool)), this, SLOT(reverseMultirotorMotor()));
|
||||||
|
|
||||||
|
m_multirotorUi->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
||||||
|
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
// HELICOPTER
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
|
||||||
|
// create and setup a Helicopter config widget
|
||||||
|
QWidget *ccpmConfigWidget = new QWidget();
|
||||||
|
m_ccpmUi = new Ui_CcpmConfigWidget();
|
||||||
|
m_ccpmUi->setupUi(ccpmConfigWidget);
|
||||||
|
m_aircraft->airframesWidget->addWidget(ccpmConfigWidget);
|
||||||
|
|
||||||
|
m_heli = m_ccpmUi->widget_3;
|
||||||
|
m_heli->setupUI(QString("HeliCP"));
|
||||||
|
|
||||||
|
|
||||||
|
//mdl connect(m_heli->m_ccpm->ccpmType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
||||||
|
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
// GROUND
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
|
||||||
|
// create and setup a GroundVehicle config widget
|
||||||
|
qDebug() << "create ground ui";
|
||||||
|
QWidget *groundConfigWidget = new QWidget();
|
||||||
|
m_groundUi = new Ui_GroundConfigWidget();
|
||||||
|
m_groundUi->setupUi(groundConfigWidget);
|
||||||
|
m_aircraft->airframesWidget->addWidget(groundConfigWidget);
|
||||||
|
|
||||||
|
m_groundvehicle = new ConfigGroundVehicleWidget(m_groundUi);
|
||||||
|
m_groundvehicle->setupUI(m_groundUi->groundVehicleType->currentText());
|
||||||
|
|
||||||
|
QStringList groundVehicleTypes;
|
||||||
|
groundVehicleTypes << "Turnable (car)" << "Differential (tank)" << "Motorcycle";
|
||||||
|
m_groundUi->groundVehicleType->addItems(groundVehicleTypes);
|
||||||
|
m_groundUi->groundVehicleType->setCurrentIndex(0); //Set default model to "Turnable (car)"
|
||||||
|
|
||||||
|
connect(m_groundUi->groundVehicleType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
||||||
|
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
// CUSTOM
|
||||||
|
// *****************************************************************************************************************
|
||||||
|
|
||||||
|
QWidget *customConfigWidget = new QWidget();
|
||||||
|
m_customUi = new Ui_CustomConfigWidget();
|
||||||
|
m_customUi->setupUi(customConfigWidget);
|
||||||
|
m_aircraft->airframesWidget->addWidget(customConfigWidget);
|
||||||
|
|
||||||
// Put combo boxes in line one of the custom mixer table:
|
// Put combo boxes in line one of the custom mixer table:
|
||||||
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* obj = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
UAVObjectField* field = obj->getField(QString("Mixer1Type"));
|
UAVObjectField* field = obj->getField(QString("Mixer1Type"));
|
||||||
QStringList list = field->getOptions();
|
QStringList list = field->getOptions();
|
||||||
for (int i=0; i<(int)(VehicleConfig::CHANNEL_NUMELEM); i++) {
|
for (int i=0; i<(int)(VehicleConfig::CHANNEL_NUMELEM); i++) {
|
||||||
QComboBox* qb = new QComboBox(m_aircraft->customMixerTable);
|
QComboBox* qb = new QComboBox(m_customUi->customMixerTable);
|
||||||
qb->addItems(list);
|
qb->addItems(list);
|
||||||
m_aircraft->customMixerTable->setCellWidget(0,i,qb);
|
m_customUi->customMixerTable->setCellWidget(0,i,qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBoxDelegate *sbd = new SpinBoxDelegate();
|
SpinBoxDelegate *sbd = new SpinBoxDelegate();
|
||||||
for (int i=1; i<(int)(VehicleConfig::CHANNEL_NUMELEM); i++) {
|
for (int i=1; i<(int)(VehicleConfig::CHANNEL_NUMELEM); i++) {
|
||||||
m_aircraft->customMixerTable->setItemDelegateForRow(i, sbd);
|
m_customUi->customMixerTable->setItemDelegateForRow(i, sbd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// create and setup a MultiRotor config widget
|
// *****************************************************************************************************************
|
||||||
m_multirotor = new ConfigMultiRotorWidget(m_aircraft);
|
|
||||||
m_multirotor->quad = quad;
|
|
||||||
m_multirotor->uiowner = this;
|
|
||||||
m_multirotor->setupUI(m_aircraft->multirotorFrameType->currentText());
|
|
||||||
|
|
||||||
// create and setup a GroundVehicle config widget
|
// Set default vehicle to MultiRotor
|
||||||
m_groundvehicle = new ConfigGroundVehicleWidget(m_aircraft);
|
m_aircraft->aircraftType->setCurrentIndex(1);
|
||||||
m_groundvehicle->setupUI(m_aircraft->groundVehicleType->currentText() );
|
// Force the tab index to match
|
||||||
|
m_aircraft->airframesWidget->setCurrentIndex(1);
|
||||||
|
|
||||||
// create and setup a FixedWing config widget
|
// Generate lists of mixerTypeNames, mixerVectorNames, channelNames
|
||||||
m_fixedwing = new ConfigFixedWingWidget(m_aircraft);
|
channelNames << "None";
|
||||||
m_fixedwing->setupUI(m_aircraft->fixedWingType->currentText() );
|
for (int i = 0; i < (int) ActuatorSettings::CHANNELADDR_NUMELEM; i++) {
|
||||||
|
mixerTypes << QString("Mixer%1Type").arg(i+1);
|
||||||
|
mixerVectors << QString("Mixer%1Vector").arg(i+1);
|
||||||
|
channelNames << QString("Channel%1").arg(i+1);
|
||||||
|
}
|
||||||
|
|
||||||
// create and setup a Helicopter config widget
|
// NEW STYLE: Loop through the widgets looking for all widgets that have "ChannelBox" in their name
|
||||||
m_heli = m_aircraft->widget_3;
|
// The upshot of this is that ALL new ComboBox widgets for selecting the output channel must have "ChannelBox" in their name
|
||||||
m_heli->setupUI(QString("HeliCP"));
|
// FOR WHATEVER REASON, THIS DOES NOT WORK WITH ChannelBox. ChannelBo is sufficiently accurate
|
||||||
|
QList<QComboBox *> l = findChildren<QComboBox*>(QRegExp("\\S+ChannelBo\\S+"));
|
||||||
|
foreach(QComboBox *combobox, l) {
|
||||||
|
combobox->addItems(channelNames);
|
||||||
|
}
|
||||||
|
|
||||||
//Connect aircraft type selection dropbox to callback function
|
// Connect aircraft type selection dropbox to callback function
|
||||||
connect(m_aircraft->aircraftType, SIGNAL(currentIndexChanged(int)), this, SLOT(switchAirframeType(int)));
|
connect(m_aircraft->aircraftType, SIGNAL(currentIndexChanged(int)), this, SLOT(switchAirframeType(int)));
|
||||||
|
|
||||||
//Connect airframe selection dropbox to callback functions
|
// Connect the three feed forward test checkboxes
|
||||||
connect(m_aircraft->fixedWingType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
|
||||||
connect(m_aircraft->multirotorFrameType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
|
||||||
connect(m_aircraft->groundVehicleType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
|
||||||
//mdl connect(m_heli->m_ccpm->ccpmType, SIGNAL(currentIndexChanged(QString)), this, SLOT(setupAirframeUI(QString)));
|
|
||||||
|
|
||||||
//Connect the three feed forward test checkboxes
|
|
||||||
connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
connect(m_aircraft->ffTestBox1, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
||||||
connect(m_aircraft->ffTestBox2, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
connect(m_aircraft->ffTestBox2, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
||||||
connect(m_aircraft->ffTestBox3, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
connect(m_aircraft->ffTestBox3, SIGNAL(clicked(bool)), this, SLOT(enableFFTest()));
|
||||||
|
|
||||||
//Connect the multirotor motor reverse checkbox
|
|
||||||
connect(m_aircraft->MultirotorRevMixercheckBox, SIGNAL(clicked(bool)), this, SLOT(reverseMultirotorMotor()));
|
|
||||||
|
|
||||||
// Connect the help pushbutton
|
// Connect the help pushbutton
|
||||||
connect(m_aircraft->airframeHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
|
connect(m_aircraft->airframeHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
|
||||||
|
|
||||||
enableControls(false);
|
enableControls(false);
|
||||||
|
|
||||||
refreshWidgetsValues();
|
refreshWidgetsValues();
|
||||||
|
|
||||||
addToDirtyMonitor();
|
addToDirtyMonitor();
|
||||||
|
|
||||||
disableMouseWheelEvents();
|
disableMouseWheelEvents();
|
||||||
m_aircraft->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -323,14 +377,12 @@ QStringList ConfigVehicleTypeWidget::getChannelDescriptions()
|
|||||||
void ConfigVehicleTypeWidget::switchAirframeType(int index)
|
void ConfigVehicleTypeWidget::switchAirframeType(int index)
|
||||||
{
|
{
|
||||||
m_aircraft->airframesWidget->setCurrentIndex(index);
|
m_aircraft->airframesWidget->setCurrentIndex(index);
|
||||||
m_aircraft->quadShape->setSceneRect(quad->boundingRect());
|
m_multirotorUi->quadShape->setSceneRect(quad->boundingRect());
|
||||||
m_aircraft->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
m_multirotorUi->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
||||||
if (m_aircraft->aircraftType->findText("Custom")) {
|
m_customUi->customMixerTable->resizeColumnsToContents();
|
||||||
m_aircraft->customMixerTable->resizeColumnsToContents();
|
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
||||||
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
m_customUi->customMixerTable->setColumnWidth(i,(m_customUi->customMixerTable->width()-
|
||||||
m_aircraft->customMixerTable->setColumnWidth(i,(m_aircraft->customMixerTable->width()-
|
m_customUi->customMixerTable->verticalHeader()->width())/ 10);
|
||||||
m_aircraft->customMixerTable->verticalHeader()->width())/10);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,11 +396,11 @@ void ConfigVehicleTypeWidget::showEvent(QShowEvent *event)
|
|||||||
// Thit fitInView method should only be called now, once the
|
// Thit fitInView method should only be called now, once the
|
||||||
// widget is shown, otherwise it cannot compute its values and
|
// widget is shown, otherwise it cannot compute its values and
|
||||||
// the result is usually a ahrsbargraph that is way too small.
|
// the result is usually a ahrsbargraph that is way too small.
|
||||||
m_aircraft->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
m_multirotorUi->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
||||||
m_aircraft->customMixerTable->resizeColumnsToContents();
|
m_customUi->customMixerTable->resizeColumnsToContents();
|
||||||
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
||||||
m_aircraft->customMixerTable->setColumnWidth(i,(m_aircraft->customMixerTable->width()-
|
m_customUi->customMixerTable->setColumnWidth(i,(m_customUi->customMixerTable->width()-
|
||||||
m_aircraft->customMixerTable->verticalHeader()->width())/ 10);
|
m_customUi->customMixerTable->verticalHeader()->width())/ 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,12 +410,12 @@ void ConfigVehicleTypeWidget::showEvent(QShowEvent *event)
|
|||||||
void ConfigVehicleTypeWidget::resizeEvent(QResizeEvent* event)
|
void ConfigVehicleTypeWidget::resizeEvent(QResizeEvent* event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
Q_UNUSED(event);
|
||||||
m_aircraft->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
m_multirotorUi->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
||||||
// Make the custom table columns autostretch:
|
// Make the custom table columns autostretch:
|
||||||
m_aircraft->customMixerTable->resizeColumnsToContents();
|
m_customUi->customMixerTable->resizeColumnsToContents();
|
||||||
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
for (int i=0;i<(int)(VehicleConfig::CHANNEL_NUMELEM);i++) {
|
||||||
m_aircraft->customMixerTable->setColumnWidth(i,(m_aircraft->customMixerTable->width()-
|
m_customUi->customMixerTable->setColumnWidth(i,(m_customUi->customMixerTable->width()-
|
||||||
m_aircraft->customMixerTable->verticalHeader()->width())/ 10);
|
m_customUi->customMixerTable->verticalHeader()->width())/ 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -372,33 +424,33 @@ void ConfigVehicleTypeWidget::resizeEvent(QResizeEvent* event)
|
|||||||
void ConfigVehicleTypeWidget::toggleAileron2(int index)
|
void ConfigVehicleTypeWidget::toggleAileron2(int index)
|
||||||
{
|
{
|
||||||
if (index) {
|
if (index) {
|
||||||
m_aircraft->fwAileron2ChannelBox->setEnabled(true);
|
m_fixedwingUi->fwAileron2ChannelBox->setEnabled(true);
|
||||||
m_aircraft->fwAileron2Label->setEnabled(true);
|
m_fixedwingUi->fwAileron2Label->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
m_aircraft->fwAileron2ChannelBox->setEnabled(false);
|
m_fixedwingUi->fwAileron2ChannelBox->setEnabled(false);
|
||||||
m_aircraft->fwAileron2Label->setEnabled(false);
|
m_fixedwingUi->fwAileron2Label->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigVehicleTypeWidget::toggleElevator2(int index)
|
void ConfigVehicleTypeWidget::toggleElevator2(int index)
|
||||||
{
|
{
|
||||||
if (index) {
|
if (index) {
|
||||||
m_aircraft->fwElevator2ChannelBox->setEnabled(true);
|
m_fixedwingUi->fwElevator2ChannelBox->setEnabled(true);
|
||||||
m_aircraft->fwElevator2Label->setEnabled(true);
|
m_fixedwingUi->fwElevator2Label->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
m_aircraft->fwElevator2ChannelBox->setEnabled(false);
|
m_fixedwingUi->fwElevator2ChannelBox->setEnabled(false);
|
||||||
m_aircraft->fwElevator2Label->setEnabled(false);
|
m_fixedwingUi->fwElevator2Label->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigVehicleTypeWidget::toggleRudder2(int index)
|
void ConfigVehicleTypeWidget::toggleRudder2(int index)
|
||||||
{
|
{
|
||||||
if (index) {
|
if (index) {
|
||||||
m_aircraft->fwRudder2ChannelBox->setEnabled(true);
|
m_fixedwingUi->fwRudder2ChannelBox->setEnabled(true);
|
||||||
m_aircraft->fwRudder2Label->setEnabled(true);
|
m_fixedwingUi->fwRudder2Label->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
m_aircraft->fwRudder2ChannelBox->setEnabled(false);
|
m_fixedwingUi->fwRudder2ChannelBox->setEnabled(false);
|
||||||
m_aircraft->fwRudder2Label->setEnabled(false);
|
m_fixedwingUi->fwRudder2Label->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,10 +526,13 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject * o)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(o);
|
Q_UNUSED(o);
|
||||||
|
|
||||||
|
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - begin";
|
||||||
|
|
||||||
if(!allObjectsUpdated())
|
if(!allObjectsUpdated())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool dirty=isDirty();
|
bool dirty = isDirty();
|
||||||
|
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - isDirty:" << dirty;
|
||||||
|
|
||||||
// Get the Airframe type from the system settings:
|
// Get the Airframe type from the system settings:
|
||||||
UAVDataObject* system = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("SystemSettings")));
|
UAVDataObject* system = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("SystemSettings")));
|
||||||
@ -488,6 +543,7 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject * o)
|
|||||||
// At this stage, we will need to have some hardcoded settings in this code, this
|
// At this stage, we will need to have some hardcoded settings in this code, this
|
||||||
// is not ideal, but there you go.
|
// is not ideal, but there you go.
|
||||||
QString frameType = field->getValue().toString();
|
QString frameType = field->getValue().toString();
|
||||||
|
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - frame type:" << frameType;
|
||||||
setupAirframeUI(frameType);
|
setupAirframeUI(frameType);
|
||||||
|
|
||||||
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
UAVDataObject* mixer = dynamic_cast<UAVDataObject*>(getObjectManager()->getObject(QString("MixerSettings")));
|
||||||
@ -501,33 +557,31 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject * o)
|
|||||||
// is at least one of the curve values != 0?
|
// is at least one of the curve values != 0?
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
||||||
// yes, use the curve we just read from mixersettings
|
// yes, use the curve we just read from mixersettings
|
||||||
m_aircraft->multiThrottleCurve->initCurve(&curveValues);
|
m_multirotorUi->multiThrottleCurve->initCurve(&curveValues);
|
||||||
m_aircraft->fixedWingThrottle->initCurve(&curveValues);
|
m_fixedwingUi->fixedWingThrottle->initCurve(&curveValues);
|
||||||
m_aircraft->groundVehicleThrottle1->initCurve(&curveValues);
|
m_groundUi->groundVehicleThrottle1->initCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no, init a straight curve
|
// no, init a straight curve
|
||||||
m_aircraft->multiThrottleCurve->initLinearCurve(curveValues.count(), 0.9);
|
m_multirotorUi->multiThrottleCurve->initLinearCurve(curveValues.count(), 0.9);
|
||||||
m_aircraft->fixedWingThrottle->initLinearCurve(curveValues.count(), 1.0);
|
m_fixedwingUi->fixedWingThrottle->initLinearCurve(curveValues.count(), 1.0);
|
||||||
m_aircraft->groundVehicleThrottle1->initLinearCurve(curveValues.count(), 1.0);
|
m_groundUi->groundVehicleThrottle1->initLinearCurve(curveValues.count(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup all Throttle2 curves for all types of airframes //AT THIS MOMENT, THAT MEANS ONLY GROUND VEHICLES
|
// Setup all Throttle2 curves for all types of airframes //AT THIS MOMENT, THAT MEANS ONLY GROUND VEHICLES
|
||||||
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
||||||
|
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
||||||
m_aircraft->groundVehicleThrottle2->initCurve(&curveValues);
|
m_groundUi->groundVehicleThrottle2->initCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
|
m_groundUi->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the Settings for fixed wing frames:
|
// Load the Settings for fixed wing frames:
|
||||||
if (frameType.startsWith("FixedWing")) {
|
if (frameType.startsWith("FixedWing")) {
|
||||||
|
|
||||||
// Retrieve fixed wing settings
|
// Retrieve fixed wing settings
|
||||||
m_fixedwing->refreshWidgetsValues(frameType);
|
m_fixedwing->refreshWidgetsValues(frameType);
|
||||||
|
|
||||||
} else if (frameType == "Tri" ||
|
} else if (frameType == "Tri" ||
|
||||||
frameType == "QuadX" || frameType == "QuadP" ||
|
frameType == "QuadX" || frameType == "QuadP" ||
|
||||||
frameType == "Hexa" || frameType == "HexaCoax" || frameType == "HexaX" ||
|
frameType == "Hexa" || frameType == "HexaCoax" || frameType == "HexaX" ||
|
||||||
@ -538,18 +592,17 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject * o)
|
|||||||
} else if (frameType == "HeliCP") {
|
} else if (frameType == "HeliCP") {
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Helicopter"));
|
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Helicopter"));
|
||||||
m_heli->refreshWidgetsValues(frameType);
|
m_heli->refreshWidgetsValues(frameType);
|
||||||
|
|
||||||
} else if (frameType.startsWith("GroundVehicle")) {
|
} else if (frameType.startsWith("GroundVehicle")) {
|
||||||
|
|
||||||
// Retrieve ground vehicle settings
|
// Retrieve ground vehicle settings
|
||||||
m_groundvehicle->refreshWidgetsValues(frameType);
|
m_groundvehicle->refreshWidgetsValues(frameType);
|
||||||
|
|
||||||
} else if (frameType == "Custom") {
|
} else if (frameType == "Custom") {
|
||||||
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Custom"));
|
setComboCurrentIndex(m_aircraft->aircraftType, m_aircraft->aircraftType->findText("Custom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCustomAirframeUI();
|
updateCustomAirframeUI();
|
||||||
setDirty(dirty);
|
setDirty(dirty);
|
||||||
|
|
||||||
|
qDebug() << "ConfigVehicleTypeWidget::refreshWidgetsValues - end";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -558,12 +611,13 @@ void ConfigVehicleTypeWidget::refreshWidgetsValues(UAVObject * o)
|
|||||||
*/
|
*/
|
||||||
void ConfigVehicleTypeWidget::setupAirframeUI(QString frameType)
|
void ConfigVehicleTypeWidget::setupAirframeUI(QString frameType)
|
||||||
{
|
{
|
||||||
bool dirty=isDirty();
|
qDebug() << "ConfigVehicleTypeWidget::setupAirframeUI - begin";
|
||||||
if(frameType == "FixedWing" || frameType == "Elevator aileron rudder" ||
|
qDebug() << "ConfigVehicleTypeWidget::setupAirframeUI - frame type" << frameType;
|
||||||
frameType == "FixedWingElevon" || frameType == "Elevon" ||
|
bool dirty = isDirty();
|
||||||
frameType == "FixedWingVtail" || frameType == "Vtail"){
|
if (frameType == "FixedWing" || frameType == "Elevator aileron rudder" || frameType == "FixedWingElevon"
|
||||||
|
|| frameType == "Elevon" || frameType == "FixedWingVtail" || frameType == "Vtail") {
|
||||||
m_fixedwing->setupUI(frameType);
|
m_fixedwing->setupUI(frameType);
|
||||||
}
|
}
|
||||||
else if (frameType == "Tri" || frameType == "Tricopter Y" ||
|
else if (frameType == "Tri" || frameType == "Tricopter Y" ||
|
||||||
frameType == "QuadX" || frameType == "Quad X" ||
|
frameType == "QuadX" || frameType == "Quad X" ||
|
||||||
frameType == "QuadP" || frameType == "Quad +" ||
|
frameType == "QuadP" || frameType == "Quad +" ||
|
||||||
@ -588,10 +642,11 @@ void ConfigVehicleTypeWidget::setupAirframeUI(QString frameType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//SHOULDN'T THIS BE DONE ONLY IN QUAD SETUP, AND NOT ALL THE REST???
|
//SHOULDN'T THIS BE DONE ONLY IN QUAD SETUP, AND NOT ALL THE REST???
|
||||||
m_aircraft->quadShape->setSceneRect(quad->boundingRect());
|
m_multirotorUi->quadShape->setSceneRect(quad->boundingRect());
|
||||||
m_aircraft->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
m_multirotorUi->quadShape->fitInView(quad, Qt::KeepAspectRatio);
|
||||||
|
|
||||||
setDirty(dirty);
|
setDirty(dirty);
|
||||||
|
qDebug() << "ConfigVehicleTypeWidget::setupAirframeUI - end";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -622,19 +677,19 @@ void ConfigVehicleTypeWidget::updateCustomAirframeUI()
|
|||||||
|
|
||||||
// is at least one of the curve values != 0?
|
// is at least one of the curve values != 0?
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
||||||
m_aircraft->customThrottle1Curve->initCurve(&curveValues);
|
m_customUi->customThrottle1Curve->initCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no, init a straight curve
|
// no, init a straight curve
|
||||||
m_aircraft->customThrottle1Curve->initLinearCurve(curveValues.count(), 1.0);
|
m_customUi->customThrottle1Curve->initLinearCurve(curveValues.count(), 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MixerSettings* mxr = qobject_cast<MixerSettings *>(mixer)) {
|
if (MixerSettings* mxr = qobject_cast<MixerSettings *>(mixer)) {
|
||||||
MixerSettings::DataFields mixerSettingsData = mxr->getData();
|
MixerSettings::DataFields mixerSettingsData = mxr->getData();
|
||||||
if (mixerSettingsData.Curve2Source == MixerSettings::CURVE2SOURCE_THROTTLE)
|
if (mixerSettingsData.Curve2Source == MixerSettings::CURVE2SOURCE_THROTTLE)
|
||||||
m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_THROTTLE);
|
m_customUi->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_THROTTLE);
|
||||||
else {
|
else {
|
||||||
m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_PITCH);
|
m_customUi->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_PITCH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -642,10 +697,10 @@ void ConfigVehicleTypeWidget::updateCustomAirframeUI()
|
|||||||
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
vconfig->getThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, &curveValues);
|
||||||
|
|
||||||
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
if (vconfig->isValidThrottleCurve(&curveValues)) {
|
||||||
m_aircraft->customThrottle2Curve->initCurve(&curveValues);
|
m_customUi->customThrottle2Curve->initCurve(&curveValues);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_aircraft->customThrottle2Curve->initLinearCurve(curveValues.count(), 1.0, m_aircraft->customThrottle2Curve->getMin());
|
m_customUi->customThrottle2Curve->initLinearCurve(curveValues.count(), 1.0, m_customUi->customThrottle2Curve->getMin());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the mixer table:
|
// Update the mixer table:
|
||||||
@ -653,22 +708,22 @@ void ConfigVehicleTypeWidget::updateCustomAirframeUI()
|
|||||||
UAVObjectField* field = mixer->getField(mixerTypes.at(channel));
|
UAVObjectField* field = mixer->getField(mixerTypes.at(channel));
|
||||||
if (field)
|
if (field)
|
||||||
{
|
{
|
||||||
QComboBox* q = (QComboBox*)m_aircraft->customMixerTable->cellWidget(0,channel);
|
QComboBox* q = (QComboBox*)m_customUi->customMixerTable->cellWidget(0,channel);
|
||||||
if (q)
|
if (q)
|
||||||
{
|
{
|
||||||
QString s = field->getValue().toString();
|
QString s = field->getValue().toString();
|
||||||
setComboCurrentIndex(q, q->findText(s));
|
setComboCurrentIndex(q, q->findText(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_aircraft->customMixerTable->item(1,channel)->setText(
|
m_customUi->customMixerTable->item(1,channel)->setText(
|
||||||
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE1)));
|
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE1)));
|
||||||
m_aircraft->customMixerTable->item(2,channel)->setText(
|
m_customUi->customMixerTable->item(2,channel)->setText(
|
||||||
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE2)));
|
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE2)));
|
||||||
m_aircraft->customMixerTable->item(3,channel)->setText(
|
m_customUi->customMixerTable->item(3,channel)->setText(
|
||||||
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_ROLL)));
|
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_ROLL)));
|
||||||
m_aircraft->customMixerTable->item(4,channel)->setText(
|
m_customUi->customMixerTable->item(4,channel)->setText(
|
||||||
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_PITCH)));
|
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_PITCH)));
|
||||||
m_aircraft->customMixerTable->item(5,channel)->setText(
|
m_customUi->customMixerTable->item(5,channel)->setText(
|
||||||
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_YAW)));
|
QString::number(vconfig->getMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_YAW)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -715,12 +770,12 @@ void ConfigVehicleTypeWidget::updateObjectsFromWidgets()
|
|||||||
airframeType = m_groundvehicle->updateConfigObjectsFromWidgets();
|
airframeType = m_groundvehicle->updateConfigObjectsFromWidgets();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
vconfig->setThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE1, m_aircraft->customThrottle1Curve->getCurve());
|
vconfig->setThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE1, m_customUi->customThrottle1Curve->getCurve());
|
||||||
vconfig->setThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, m_aircraft->customThrottle2Curve->getCurve());
|
vconfig->setThrottleCurve(mixer, VehicleConfig::MIXER_THROTTLECURVE2, m_customUi->customThrottle2Curve->getCurve());
|
||||||
|
|
||||||
// Update the table:
|
// Update the table:
|
||||||
for (int channel=0; channel<(int)(VehicleConfig::CHANNEL_NUMELEM); channel++) {
|
for (int channel=0; channel<(int)(VehicleConfig::CHANNEL_NUMELEM); channel++) {
|
||||||
QComboBox* q = (QComboBox*)m_aircraft->customMixerTable->cellWidget(0,channel);
|
QComboBox* q = (QComboBox*)m_customUi->customMixerTable->cellWidget(0,channel);
|
||||||
if(q->currentText()=="Disabled")
|
if(q->currentText()=="Disabled")
|
||||||
vconfig->setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
vconfig->setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_DISABLED);
|
||||||
else if(q->currentText()=="Motor")
|
else if(q->currentText()=="Motor")
|
||||||
@ -747,15 +802,15 @@ void ConfigVehicleTypeWidget::updateObjectsFromWidgets()
|
|||||||
vconfig->setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_ACCESSORY5);
|
vconfig->setMixerType(mixer,channel,VehicleConfig::MIXERTYPE_ACCESSORY5);
|
||||||
|
|
||||||
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE1,
|
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE1,
|
||||||
m_aircraft->customMixerTable->item(1,channel)->text().toDouble());
|
m_customUi->customMixerTable->item(1,channel)->text().toDouble());
|
||||||
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE2,
|
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_THROTTLECURVE2,
|
||||||
m_aircraft->customMixerTable->item(2,channel)->text().toDouble());
|
m_customUi->customMixerTable->item(2,channel)->text().toDouble());
|
||||||
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_ROLL,
|
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_ROLL,
|
||||||
m_aircraft->customMixerTable->item(3,channel)->text().toDouble());
|
m_customUi->customMixerTable->item(3,channel)->text().toDouble());
|
||||||
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_PITCH,
|
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_PITCH,
|
||||||
m_aircraft->customMixerTable->item(4,channel)->text().toDouble());
|
m_customUi->customMixerTable->item(4,channel)->text().toDouble());
|
||||||
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_YAW,
|
vconfig->setMixerVectorValue(mixer,channel,VehicleConfig::MIXERVECTOR_YAW,
|
||||||
m_aircraft->customMixerTable->item(5,channel)->text().toDouble());
|
m_customUi->customMixerTable->item(5,channel)->text().toDouble());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +846,7 @@ void ConfigVehicleTypeWidget::setComboCurrentIndex(QComboBox* box, int index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConfigVehicleTypeWidget::reverseMultirotorMotor(){
|
void ConfigVehicleTypeWidget::reverseMultirotorMotor(){
|
||||||
QString frameType = m_aircraft->multirotorFrameType->currentText();
|
QString frameType = m_multirotorUi->multirotorFrameType->currentText();
|
||||||
m_multirotor->drawAirframe(frameType);
|
m_multirotor->drawAirframe(frameType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -801,9 +856,10 @@ void ConfigVehicleTypeWidget::reverseMultirotorMotor(){
|
|||||||
*/
|
*/
|
||||||
void ConfigVehicleTypeWidget::addToDirtyMonitor()
|
void ConfigVehicleTypeWidget::addToDirtyMonitor()
|
||||||
{
|
{
|
||||||
addWidget(m_aircraft->customMixerTable);
|
/*
|
||||||
addWidget(m_aircraft->customThrottle1Curve->getCurveWidget());
|
addWidget(m_customUi->customMixerTable);
|
||||||
addWidget(m_aircraft->customThrottle2Curve->getCurveWidget());
|
addWidget(m_customUi->customThrottle1Curve->getCurveWidget());
|
||||||
|
addWidget(m_customUi->customThrottle2Curve->getCurveWidget());
|
||||||
addWidget(m_aircraft->multiThrottleCurve->getCurveWidget());
|
addWidget(m_aircraft->multiThrottleCurve->getCurveWidget());
|
||||||
addWidget(m_aircraft->fixedWingThrottle->getCurveWidget());
|
addWidget(m_aircraft->fixedWingThrottle->getCurveWidget());
|
||||||
addWidget(m_aircraft->fixedWingType);
|
addWidget(m_aircraft->fixedWingType);
|
||||||
@ -869,5 +925,6 @@ void ConfigVehicleTypeWidget::addToDirtyMonitor()
|
|||||||
addWidget(m_heli->m_ccpm->ThrottleCurve->getCurveWidget());
|
addWidget(m_heli->m_ccpm->ThrottleCurve->getCurveWidget());
|
||||||
addWidget(m_heli->m_ccpm->PitchCurve->getCurveWidget());
|
addWidget(m_heli->m_ccpm->PitchCurve->getCurveWidget());
|
||||||
addWidget(m_heli->m_ccpm->ccpmAdvancedSettingsTable);
|
addWidget(m_heli->m_ccpm->ccpmAdvancedSettingsTable);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,11 +34,17 @@
|
|||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "uavtalk/telemetrymanager.h"
|
#include "uavtalk/telemetrymanager.h"
|
||||||
|
|
||||||
|
#include "cfg_vehicletypes/vehicleconfig.h"
|
||||||
#include "cfg_vehicletypes/configccpmwidget.h"
|
#include "cfg_vehicletypes/configccpmwidget.h"
|
||||||
#include "cfg_vehicletypes/configfixedwingwidget.h"
|
#include "cfg_vehicletypes/configfixedwingwidget.h"
|
||||||
#include "cfg_vehicletypes/configmultirotorwidget.h"
|
|
||||||
#include "cfg_vehicletypes/configgroundvehiclewidget.h"
|
#include "cfg_vehicletypes/configgroundvehiclewidget.h"
|
||||||
#include "cfg_vehicletypes/vehicleconfig.h"
|
#include "cfg_vehicletypes/configmultirotorwidget.h"
|
||||||
|
|
||||||
|
#include "ui_airframe_ccpm.h"
|
||||||
|
#include "ui_airframe_fixedwing.h"
|
||||||
|
#include "ui_airframe_ground.h"
|
||||||
|
#include "ui_airframe_multirotor.h"
|
||||||
|
#include "ui_airframe_custom.h"
|
||||||
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
@ -59,6 +65,12 @@ public:
|
|||||||
private:
|
private:
|
||||||
Ui_AircraftWidget *m_aircraft;
|
Ui_AircraftWidget *m_aircraft;
|
||||||
|
|
||||||
|
Ui_CcpmConfigWidget *m_ccpmUi;
|
||||||
|
Ui_FixedWingConfigWidget *m_fixedwingUi;
|
||||||
|
Ui_MultiRotorConfigWidget *m_multirotorUi;
|
||||||
|
Ui_GroundConfigWidget *m_groundUi;
|
||||||
|
Ui_CustomConfigWidget *m_customUi;
|
||||||
|
|
||||||
ConfigCcpmWidget *m_heli;
|
ConfigCcpmWidget *m_heli;
|
||||||
ConfigFixedWingWidget *m_fixedwing;
|
ConfigFixedWingWidget *m_fixedwing;
|
||||||
ConfigMultiRotorWidget *m_multirotor;
|
ConfigMultiRotorWidget *m_multirotor;
|
||||||
@ -66,7 +78,7 @@ private:
|
|||||||
|
|
||||||
void updateCustomAirframeUI();
|
void updateCustomAirframeUI();
|
||||||
void addToDirtyMonitor();
|
void addToDirtyMonitor();
|
||||||
void resetField(UAVObjectField * field);
|
void resetField(UAVObjectField *field);
|
||||||
|
|
||||||
//void setMixerChannel(int channelNumber, bool channelIsMotor, QList<double> vector);
|
//void setMixerChannel(int channelNumber, bool channelIsMotor, QList<double> vector);
|
||||||
|
|
||||||
@ -81,10 +93,10 @@ private:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
virtual void refreshWidgetsValues(UAVObject * o=NULL);
|
virtual void refreshWidgetsValues(UAVObject *o = NULL);
|
||||||
virtual void updateObjectsFromWidgets();
|
virtual void updateObjectsFromWidgets();
|
||||||
|
|
||||||
void setComboCurrentIndex(QComboBox* box, int index);
|
void setComboCurrentIndex(QComboBox *box, int index);
|
||||||
|
|
||||||
void setupAirframeUI(QString type);
|
void setupAirframeUI(QString type);
|
||||||
|
|
||||||
@ -102,6 +114,7 @@ protected:
|
|||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class SpinBoxDelegate : public QItemDelegate
|
class SpinBoxDelegate : public QItemDelegate
|
||||||
@ -111,15 +124,12 @@ class SpinBoxDelegate : public QItemDelegate
|
|||||||
public:
|
public:
|
||||||
SpinBoxDelegate(QObject *parent = 0);
|
SpinBoxDelegate(QObject *parent = 0);
|
||||||
|
|
||||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||||
const QModelIndex &index) const;
|
|
||||||
|
|
||||||
void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
||||||
void setModelData(QWidget *editor, QAbstractItemModel *model,
|
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
|
||||||
const QModelIndex &index) const;
|
|
||||||
|
|
||||||
void updateEditorGeometry(QWidget *editor,
|
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||||
const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CONFIGVEHICLETYPEWIDGET_H
|
#endif // CONFIGVEHICLETYPEWIDGET_H
|
||||||
|
Loading…
Reference in New Issue
Block a user