mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into pt/CC3D_Release
Conflicts: ground/openpilotgcs/src/plugins/config/camerastabilization.ui ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.cpp ground/openpilotgcs/src/plugins/config/configcamerastabilizationwidget.h ground/openpilotgcs/src/plugins/uavobjectwidgetutils/configtaskwidget.cpp
This commit is contained in:
commit
8bb94e052b
@ -6,855 +6,808 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>820</width>
|
||||
<height>845</height>
|
||||
<width>720</width>
|
||||
<height>739</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,0,0">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="elideMode">
|
||||
<enum>Qt::ElideMiddle</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="CameraStabilization">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>702</width>
|
||||
<height>660</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Camera Stabilization</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>232</red>
|
||||
<green>232</green>
|
||||
<blue>232</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>232</red>
|
||||
<green>232</green>
|
||||
<blue>232</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>232</red>
|
||||
<green>232</green>
|
||||
<blue>232</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="0">
|
||||
<red>232</red>
|
||||
<green>232</green>
|
||||
<blue>232</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
<widget class="QCheckBox" name="enableCameraStabilization">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
<property name="text">
|
||||
<string>Enable CameraStabilization module</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>After enabling the module, you must power cycle before using and configuring.</string>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>790</width>
|
||||
<height>678</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableCameraStabilization">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable CameraStabilization module</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>After enabling you must power cycle your board before using and configuring</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Basic Settings (Stabilization)</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="3" column="3">
|
||||
<widget class="QSpinBox" name="yawOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera yaw angle for 100% output value, deg.
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Basic Settings (Stabilization)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="yawOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera yaw angle for 100% output value, deg.
|
||||
|
||||
This value should be tuned for particular gimbal and servo. You also
|
||||
have to define channel output range using Output configuration tab.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="pitchOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera pitch angle for 100% output value, deg.
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:OutputRange</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="pitchOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera pitch angle for 100% output value, deg.
|
||||
|
||||
This value should be tuned for particular gimbal and servo. You also
|
||||
have to define channel output range using Output configuration tab.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="rollOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera roll angle for 100% output value, deg.
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:OutputRange</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="rollOutputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Camera roll angle for 100% output value, deg.
|
||||
|
||||
This value should be tuned for particular gimbal and servo. You also
|
||||
have to define channel output range using Output configuration tab.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="yawChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Yaw output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="pitchChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Pitch output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="rollChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Roll output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_42">
|
||||
<property name="text">
|
||||
<string>Output Channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_43">
|
||||
<property name="text">
|
||||
<string>Output Range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_44">
|
||||
<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));
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:OutputRange</string>
|
||||
<string>element:Roll</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="yawChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Yaw output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="pitchChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Pitch output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="rollChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Roll output channel for camera gimbal</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_42">
|
||||
<property name="text">
|
||||
<string>Output Channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_43">
|
||||
<property name="text">
|
||||
<string>Output Range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_44">
|
||||
<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>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<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));
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Yaw</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_45">
|
||||
<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 row="1" column="1">
|
||||
<widget class="QLabel" name="label_46">
|
||||
<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));
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pitch</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_46">
|
||||
<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>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>266</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Advanced Settings (Control)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<property name="leftMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_32">
|
||||
<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));
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Roll</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>204</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Advanced Settings (Control)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_32">
|
||||
<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>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<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));
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Yaw</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<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 row="1" column="1">
|
||||
<widget class="QLabel" name="label_34">
|
||||
<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));
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pitch</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_34">
|
||||
<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>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="yawInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera yaw
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Roll</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="yawInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera yaw
|
||||
|
||||
Don't forget to map this channel using Input configuration tab.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="pitchInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera pitch
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:Input</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="pitchInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera pitch
|
||||
|
||||
Don't forget to map this channel using Input configuration tab.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="rollInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera roll
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:Input</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="rollInputChannel">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input channel to control camera roll
|
||||
|
||||
Don't forget to map this channel using Input configuration tab.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>Input Channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QComboBox" name="yawStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:Input</string>
|
||||
<string>element:Roll</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_35">
|
||||
<property name="text">
|
||||
<string>Input Channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="yawStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
|
||||
Attitude: camera tracks level for the axis. Input controls the deflection.
|
||||
AxisLock: camera remembers tracking attitude. Input controls the rate of deflection.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="yawInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera yaw deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QSpinBox" name="yawInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera yaw rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QSpinBox" name="yawResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for yaw axis, ms.
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:StabilizationMode</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QSpinBox" name="yawInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera yaw deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRange</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QSpinBox" name="yawInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera yaw rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRate</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="3">
|
||||
<widget class="QSpinBox" name="yawResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for yaw axis, ms.
|
||||
|
||||
This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="pitchStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:ResponseTime</string>
|
||||
<string>element:Yaw</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="pitchStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
|
||||
Attitude: camera tracks level for the axis. Input controls the deflection.
|
||||
AxisLock: camera remembers tracking attitude. Input controls the rate of deflection.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSpinBox" name="pitchInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera pitch deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QSpinBox" name="pitchInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera pitch rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QSpinBox" name="pitchResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for pitch axis, ms.
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:StabilizationMode</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="pitchInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera pitch deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRange</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSpinBox" name="pitchInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera pitch rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRate</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QSpinBox" name="pitchResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for pitch axis, ms.
|
||||
|
||||
This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="rollStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:ResponseTime</string>
|
||||
<string>element:Pitch</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="rollStabilizationMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Axis stabilization mode
|
||||
|
||||
Attitude: camera tracks level for the axis. Input controls the deflection.
|
||||
AxisLock: camera remembers tracking attitude. Input controls the rate of deflection.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="rollInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera roll deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="rollInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera roll rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QSpinBox" name="rollResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for roll axis, ms.
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:StabilizationMode</string>
|
||||
<string>element:Roll</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Attitude</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="rollInputRange">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera roll deflection for 100% input in Attitude mode, deg.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRange</string>
|
||||
<string>element:Roll</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="rollInputRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum camera roll rate for 100% input in AxisLock mode, deg/s.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>180</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:InputRate</string>
|
||||
<string>element:Roll</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="rollResponseTime">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Input low-pass filter response time for roll axis, ms.
|
||||
|
||||
This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>MaxAxisLockRate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_37">
|
||||
<property name="text">
|
||||
<string>Response Time</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_38">
|
||||
<property name="text">
|
||||
<string>Input Rate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_39">
|
||||
<property name="text">
|
||||
<string>Input Range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_40">
|
||||
<property name="text">
|
||||
<string>Stabilization Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_41">
|
||||
<property name="text">
|
||||
<string>(the same value for Roll, Pitch, Yaw)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QDoubleSpinBox" name="MaxAxisLockRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Stick input deadband for all axes in AxisLock mode, deg/s.
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>150</number>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:ResponseTime</string>
|
||||
<string>element:Roll</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_36">
|
||||
<property name="text">
|
||||
<string>MaxAxisLockRate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_37">
|
||||
<property name="text">
|
||||
<string>Response Time</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_38">
|
||||
<property name="text">
|
||||
<string>Input Rate</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_39">
|
||||
<property name="text">
|
||||
<string>Input Range</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_40">
|
||||
<property name="text">
|
||||
<string>Stabilization Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QLabel" name="label_41">
|
||||
<property name="text">
|
||||
<string>(the same value for Roll, Pitch, Yaw)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QDoubleSpinBox" name="MaxAxisLockRate">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Stick input deadband for all axes in AxisLock mode, deg/s.
|
||||
|
||||
When stick input is within the MaxAxisLockRate range, camera tracks
|
||||
current attitude. Otherwise it starts moving according to input with
|
||||
@ -862,222 +815,211 @@ rate depending on input value.
|
||||
|
||||
If you have drift in your Tx controls, you may want to increase this
|
||||
value.</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>objname:CameraStabSettings</string>
|
||||
<string>fieldname:MaxAxisLockRate</string>
|
||||
<string>haslimits:no</string>
|
||||
<string>scale:1</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Messages</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="message">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>456</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationHelp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>26</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/x/cACrAQ</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationResetToDefaults">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>140</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Load default CameraStabilization settings except output channels
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="message">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="submitButtons">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationHelp">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../coreplugin/core.qrc">
|
||||
<normaloff>:/core/images/helpicon.svg</normaloff>:/core/images/helpicon.svg</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+S</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:help</string>
|
||||
<string>url:http://wiki.openpilot.org/display/Doc/Camera+Stabilization+Configuration</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationResetToDefaults">
|
||||
<property name="toolTip">
|
||||
<string>Load default CameraStabilization settings except output channels into GCS.
|
||||
|
||||
Loaded settings are not applied automatically. You have to click the
|
||||
Apply or Save button afterwards.</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset To Defaults</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationSaveRAM">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>78</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Send settings to the board but do not save to the non-volatile memory</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationSaveSD">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>71</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Send settings to the board and save to the non-volatile memory</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset To Defaults</string>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:default</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="toolTip">
|
||||
<string>Reloads saved CameraStabilization settings except output channels
|
||||
from board into GCS. Useful if you have accidentally changed some
|
||||
settings.
|
||||
|
||||
Loaded settings are not applied automatically. You have to click the
|
||||
Apply or Save button afterwards.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reload Board Data</string>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:reload</string>
|
||||
<string>buttongroup:1</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationSaveRAM">
|
||||
<property name="toolTip">
|
||||
<string>Send settings to the board but do not save to the non-volatile memory</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:apply</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="camerastabilizationSaveSD">
|
||||
<property name="toolTip">
|
||||
<string>Send settings to the board and save to the non-volatile memory</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="objrelation" stdset="0">
|
||||
<stringlist>
|
||||
<string>button:save</string>
|
||||
</stringlist>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>enableCameraStabilization</tabstop>
|
||||
<tabstop>rollChannel</tabstop>
|
||||
<tabstop>pitchChannel</tabstop>
|
||||
<tabstop>yawChannel</tabstop>
|
||||
@ -1100,7 +1042,7 @@ Apply or Save button afterwards.</string>
|
||||
<tabstop>pitchResponseTime</tabstop>
|
||||
<tabstop>yawResponseTime</tabstop>
|
||||
<tabstop>MaxAxisLockRate</tabstop>
|
||||
<tabstop>camerastabilizationResetToDefaults</tabstop>
|
||||
<tabstop>camerastabilizationHelp</tabstop>
|
||||
<tabstop>camerastabilizationSaveRAM</tabstop>
|
||||
<tabstop>camerastabilizationSaveSD</tabstop>
|
||||
<tabstop>scrollArea</tabstop>
|
||||
|
@ -2,7 +2,7 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configcamerastabilizationwidget.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011-2012.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
@ -30,73 +30,51 @@
|
||||
#include "mixersettings.h"
|
||||
#include "actuatorcommand.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/generalsettings.h>
|
||||
|
||||
ConfigCameraStabilizationWidget::ConfigCameraStabilizationWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
// TODO: this widget should use the addUAVObjectToWidgetRelation()
|
||||
m_camerastabilization = new Ui_CameraStabilizationWidget();
|
||||
m_camerastabilization->setupUi(this);
|
||||
|
||||
ExtensionSystem::PluginManager *pm=ExtensionSystem::PluginManager::instance();
|
||||
Core::Internal::GeneralSettings * settings=pm->getObject<Core::Internal::GeneralSettings>();
|
||||
if(!settings->useExpertMode())
|
||||
m_camerastabilization->camerastabilizationSaveRAM->setVisible(false);
|
||||
|
||||
QComboBox *outputs[3] = {
|
||||
// These widgets don't have direct relation to UAVObjects
|
||||
// and need special processing
|
||||
QComboBox *outputs[] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
m_camerastabilization->pitchChannel,
|
||||
m_camerastabilization->yawChannel,
|
||||
};
|
||||
const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]);
|
||||
|
||||
QComboBox *inputs[3] = {
|
||||
m_camerastabilization->rollInputChannel,
|
||||
m_camerastabilization->pitchInputChannel,
|
||||
m_camerastabilization->yawInputChannel,
|
||||
};
|
||||
|
||||
QComboBox *stabilizationMode[3] = {
|
||||
m_camerastabilization->rollStabilizationMode,
|
||||
m_camerastabilization->pitchStabilizationMode,
|
||||
m_camerastabilization->yawStabilizationMode,
|
||||
};
|
||||
|
||||
CameraStabSettings *cameraStab = CameraStabSettings::GetInstance(getObjectManager());
|
||||
CameraStabSettings::DataFields cameraStabData = cameraStab->getData();
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
// Populate widgets with channel numbers
|
||||
for (int i = 0; i < NUM_OUTPUTS; i++) {
|
||||
outputs[i]->clear();
|
||||
outputs[i]->addItem("None");
|
||||
for (quint32 j = 0; j < ActuatorCommand::CHANNEL_NUMELEM; j++)
|
||||
outputs[i]->addItem(QString("Channel %1").arg(j+1));
|
||||
|
||||
UAVObjectField *field;
|
||||
|
||||
field = cameraStab->getField("Input");
|
||||
Q_ASSERT(field);
|
||||
inputs[i]->clear();
|
||||
inputs[i]->addItems(field->getOptions());
|
||||
inputs[i]->setCurrentIndex(cameraStabData.Input[i]);
|
||||
|
||||
field = cameraStab->getField("StabilizationMode");
|
||||
Q_ASSERT(field);
|
||||
stabilizationMode[i]->clear();
|
||||
stabilizationMode[i]->addItems(field->getOptions());
|
||||
stabilizationMode[i]->setCurrentIndex(cameraStabData.StabilizationMode[i]);
|
||||
}
|
||||
|
||||
connectUpdates();
|
||||
|
||||
// Connect buttons
|
||||
connect(m_camerastabilization->camerastabilizationResetToDefaults, SIGNAL(clicked()), this, SLOT(resetToDefaults()));
|
||||
connect(m_camerastabilization->camerastabilizationSaveRAM, SIGNAL(clicked()), this, SLOT(applySettings()));
|
||||
connect(m_camerastabilization->camerastabilizationSaveSD, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||
// Load UAVObjects to widget relations from UI file
|
||||
// using objrelation dynamic property
|
||||
autoLoadWidgets();
|
||||
|
||||
// Add some widgets to track their UI dirty state and handle smartsave
|
||||
addWidget(m_camerastabilization->enableCameraStabilization);
|
||||
addWidget(m_camerastabilization->rollChannel);
|
||||
addWidget(m_camerastabilization->pitchChannel);
|
||||
addWidget(m_camerastabilization->yawChannel);
|
||||
|
||||
// Add some UAVObjects to monitor their changes in addition to autoloaded ones.
|
||||
// Note also that we want to reload some UAVObjects by "Reload" button and have
|
||||
// to pass corresponding reload group numbers (defined also in objrelation property)
|
||||
// to the montitor. We don't reload HwSettings (module enable state) but reload
|
||||
// output channels.
|
||||
QList<int> reloadGroups;
|
||||
reloadGroups << 1;
|
||||
addUAVObject("HwSettings");
|
||||
addUAVObject("MixerSettings", &reloadGroups);
|
||||
|
||||
// To set special widgets to defaults when requested
|
||||
connect(this, SIGNAL(defaultRequested(int)), this, SLOT(defaultRequestedSlot(int)));
|
||||
|
||||
disableMouseWheelEvents();
|
||||
}
|
||||
|
||||
@ -105,52 +83,32 @@ ConfigCameraStabilizationWidget::~ConfigCameraStabilizationWidget()
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
void ConfigCameraStabilizationWidget::connectUpdates()
|
||||
/*
|
||||
* This overridden function refreshes widgets which have no direct relation
|
||||
* to any of UAVObjects. It saves their dirty state first because update comes
|
||||
* from UAVObjects, and then restores it. Aftewards it calls base class
|
||||
* function to take care of other widgets which were dynamically added.
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::refreshWidgetsValues(UAVObject *obj)
|
||||
{
|
||||
// Now connect the widget to the StabilizationSettings object
|
||||
connect(MixerSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
connect(CameraStabSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
// TODO: This will need to support both CC and OP later
|
||||
connect(HwSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
}
|
||||
bool dirty = isDirty();
|
||||
|
||||
void ConfigCameraStabilizationWidget::disconnectUpdates()
|
||||
{
|
||||
// Now connect the widget to the StabilizationSettings object
|
||||
disconnect(MixerSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
disconnect(CameraStabSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
// TODO: This will need to support both CC and OP later
|
||||
disconnect(HwSettings::GetInstance(getObjectManager()), SIGNAL(objectUpdated(UAVObject *)), this, SLOT(refreshValues()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Populate the gui settings into the appropriate
|
||||
* UAV structures
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::applySettings()
|
||||
{
|
||||
// Enable or disable the settings
|
||||
// Set module enable checkbox from OptionalModules UAVObject item.
|
||||
// It needs special processing because ConfigTaskWidget uses TRUE/FALSE
|
||||
// for QCheckBox, but OptionalModules uses Enabled/Disabled enum values.
|
||||
HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
HwSettings::DataFields hwSettingsData = hwSettings->getData();
|
||||
hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] =
|
||||
m_camerastabilization->enableCameraStabilization->isChecked() ?
|
||||
HwSettings::OPTIONALMODULES_ENABLED :
|
||||
HwSettings::OPTIONALMODULES_DISABLED;
|
||||
|
||||
// Update the mixer settings
|
||||
m_camerastabilization->enableCameraStabilization->setChecked(
|
||||
hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] == HwSettings::OPTIONALMODULES_ENABLED);
|
||||
|
||||
// Load mixer outputs which are mapped to camera controls
|
||||
MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
|
||||
MixerSettings::DataFields mixerSettingsData = mixerSettings->getData();
|
||||
const int NUM_MIXERS = 10;
|
||||
|
||||
QComboBox *outputs[3] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
m_camerastabilization->pitchChannel,
|
||||
m_camerastabilization->yawChannel,
|
||||
};
|
||||
|
||||
// TODO: Need to reformat object so types are an
|
||||
// array themselves. This gets really awkward
|
||||
quint8 * mixerTypes[NUM_MIXERS] = {
|
||||
quint8 *mixerTypes[] = {
|
||||
&mixerSettingsData.Mixer1Type,
|
||||
&mixerSettingsData.Mixer2Type,
|
||||
&mixerSettingsData.Mixer3Type,
|
||||
@ -162,182 +120,140 @@ void ConfigCameraStabilizationWidget::applySettings()
|
||||
&mixerSettingsData.Mixer9Type,
|
||||
&mixerSettingsData.Mixer10Type,
|
||||
};
|
||||
const int NUM_MIXERS = sizeof(mixerTypes) / sizeof(mixerTypes[0]);
|
||||
|
||||
m_camerastabilization->message->setText("");
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
// Channel 1 is second entry, so becomes zero
|
||||
int mixerNum = outputs[i]->currentIndex() - 1;
|
||||
|
||||
if ( mixerNum >= 0 && // Short circuit in case of none
|
||||
*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_DISABLED &&
|
||||
(*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_CAMERAROLL + i) ) {
|
||||
// If the mixer channel already to something that isn't what we are
|
||||
// about to set it to reset to none
|
||||
outputs[i]->setCurrentIndex(0);
|
||||
m_camerastabilization->message->setText("One of the channels is already assigned, reverted to none");
|
||||
} else {
|
||||
// Make sure no other channels have this output set
|
||||
for (int j = 0; j < NUM_MIXERS; j++)
|
||||
if (*mixerTypes[j] == (MixerSettings::MIXER1TYPE_CAMERAROLL + i))
|
||||
*mixerTypes[j] = MixerSettings::MIXER1TYPE_DISABLED;
|
||||
|
||||
// If this channel is assigned to one of the outputs that is not disabled
|
||||
// set it
|
||||
if(mixerNum >= 0 && mixerNum < NUM_MIXERS)
|
||||
*mixerTypes[mixerNum] = MixerSettings::MIXER1TYPE_CAMERAROLL + i;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the settings
|
||||
CameraStabSettings *cameraStab = CameraStabSettings::GetInstance(getObjectManager());
|
||||
CameraStabSettings::DataFields cameraStabData = cameraStab->getData();
|
||||
|
||||
cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_ROLL] = m_camerastabilization->rollOutputRange->value();
|
||||
cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_PITCH] = m_camerastabilization->pitchOutputRange->value();
|
||||
cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_YAW] = m_camerastabilization->yawOutputRange->value();
|
||||
|
||||
cameraStabData.Input[CameraStabSettings::INPUT_ROLL] = m_camerastabilization->rollInputChannel->currentIndex();
|
||||
cameraStabData.Input[CameraStabSettings::INPUT_PITCH] = m_camerastabilization->pitchInputChannel->currentIndex();
|
||||
cameraStabData.Input[CameraStabSettings::INPUT_YAW] = m_camerastabilization->yawInputChannel->currentIndex();
|
||||
|
||||
cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_ROLL] = m_camerastabilization->rollStabilizationMode->currentIndex();
|
||||
cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_PITCH] = m_camerastabilization->pitchStabilizationMode->currentIndex();
|
||||
cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_YAW] = m_camerastabilization->yawStabilizationMode->currentIndex();
|
||||
|
||||
cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_ROLL] = m_camerastabilization->rollInputRange->value();
|
||||
cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_PITCH] = m_camerastabilization->pitchInputRange->value();
|
||||
cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_YAW] = m_camerastabilization->yawInputRange->value();
|
||||
|
||||
cameraStabData.InputRate[CameraStabSettings::INPUTRATE_ROLL] = m_camerastabilization->rollInputRate->value();
|
||||
cameraStabData.InputRate[CameraStabSettings::INPUTRATE_PITCH] = m_camerastabilization->pitchInputRate->value();
|
||||
cameraStabData.InputRate[CameraStabSettings::INPUTRATE_YAW] = m_camerastabilization->yawInputRate->value();
|
||||
|
||||
cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_ROLL] = m_camerastabilization->rollResponseTime->value();
|
||||
cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_PITCH] = m_camerastabilization->pitchResponseTime->value();
|
||||
cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_YAW] = m_camerastabilization->yawResponseTime->value();
|
||||
|
||||
cameraStabData.MaxAxisLockRate = m_camerastabilization->MaxAxisLockRate->value();
|
||||
|
||||
// Because multiple objects are updated, and all of them trigger the callback
|
||||
// they must be done together (if update one then load settings from second
|
||||
// the first update would wipe the UI controls). However to be extra cautious
|
||||
// I'm also disabling updates during the setting to the UAVObjects
|
||||
disconnectUpdates();
|
||||
hwSettings->setData(hwSettingsData);
|
||||
mixerSettings->setData(mixerSettingsData);
|
||||
cameraStab->setData(cameraStabData);
|
||||
connectUpdates();
|
||||
}
|
||||
|
||||
/**
|
||||
* Push settings into UAV objects then save them
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::saveSettings()
|
||||
{
|
||||
applySettings();
|
||||
UAVObject *obj = HwSettings::GetInstance(getObjectManager());
|
||||
saveObjectToSD(obj);
|
||||
obj = MixerSettings::GetInstance(getObjectManager());
|
||||
saveObjectToSD(obj);
|
||||
obj = CameraStabSettings::GetInstance(getObjectManager());
|
||||
saveObjectToSD(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh UI with new settings of CameraStabSettings object
|
||||
* (either from active configuration or just loaded defaults
|
||||
* to be applied or saved)
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::refreshUIValues(CameraStabSettings::DataFields &cameraStabData)
|
||||
{
|
||||
m_camerastabilization->rollOutputRange->setValue(cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_ROLL]);
|
||||
m_camerastabilization->pitchOutputRange->setValue(cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_PITCH]);
|
||||
m_camerastabilization->yawOutputRange->setValue(cameraStabData.OutputRange[CameraStabSettings::OUTPUTRANGE_YAW]);
|
||||
|
||||
m_camerastabilization->rollInputChannel->setCurrentIndex(cameraStabData.Input[CameraStabSettings::INPUT_ROLL]);
|
||||
m_camerastabilization->pitchInputChannel->setCurrentIndex(cameraStabData.Input[CameraStabSettings::INPUT_PITCH]);
|
||||
m_camerastabilization->yawInputChannel->setCurrentIndex(cameraStabData.Input[CameraStabSettings::INPUT_YAW]);
|
||||
|
||||
m_camerastabilization->rollStabilizationMode->setCurrentIndex(cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_ROLL]);
|
||||
m_camerastabilization->pitchStabilizationMode->setCurrentIndex(cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_PITCH]);
|
||||
m_camerastabilization->yawStabilizationMode->setCurrentIndex(cameraStabData.StabilizationMode[CameraStabSettings::STABILIZATIONMODE_YAW]);
|
||||
|
||||
m_camerastabilization->rollInputRange->setValue(cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_ROLL]);
|
||||
m_camerastabilization->pitchInputRange->setValue(cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_PITCH]);
|
||||
m_camerastabilization->yawInputRange->setValue(cameraStabData.InputRange[CameraStabSettings::INPUTRANGE_YAW]);
|
||||
|
||||
m_camerastabilization->rollInputRate->setValue(cameraStabData.InputRate[CameraStabSettings::INPUTRATE_ROLL]);
|
||||
m_camerastabilization->pitchInputRate->setValue(cameraStabData.InputRate[CameraStabSettings::INPUTRATE_PITCH]);
|
||||
m_camerastabilization->yawInputRate->setValue(cameraStabData.InputRate[CameraStabSettings::INPUTRATE_YAW]);
|
||||
|
||||
m_camerastabilization->rollResponseTime->setValue(cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_ROLL]);
|
||||
m_camerastabilization->pitchResponseTime->setValue(cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_PITCH]);
|
||||
m_camerastabilization->yawResponseTime->setValue(cameraStabData.ResponseTime[CameraStabSettings::RESPONSETIME_YAW]);
|
||||
|
||||
m_camerastabilization->MaxAxisLockRate->setValue(cameraStabData.MaxAxisLockRate);
|
||||
}
|
||||
|
||||
void ConfigCameraStabilizationWidget::refreshValues()
|
||||
{
|
||||
HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
HwSettings::DataFields hwSettingsData = hwSettings->getData();
|
||||
m_camerastabilization->enableCameraStabilization->setChecked(
|
||||
hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] ==
|
||||
HwSettings::OPTIONALMODULES_ENABLED);
|
||||
|
||||
CameraStabSettings *cameraStabSettings = CameraStabSettings::GetInstance(getObjectManager());
|
||||
CameraStabSettings::DataFields cameraStabData = cameraStabSettings->getData();
|
||||
refreshUIValues(cameraStabData);
|
||||
|
||||
MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
|
||||
MixerSettings::DataFields mixerSettingsData = mixerSettings->getData();
|
||||
const int NUM_MIXERS = 10;
|
||||
QComboBox *outputs[3] = {
|
||||
QComboBox *outputs[] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
m_camerastabilization->pitchChannel,
|
||||
m_camerastabilization->yawChannel
|
||||
};
|
||||
const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]);
|
||||
|
||||
// TODO: Need to reformat object so types are an
|
||||
// array themselves. This gets really awkward
|
||||
quint8 * mixerTypes[NUM_MIXERS] = {
|
||||
&mixerSettingsData.Mixer1Type,
|
||||
&mixerSettingsData.Mixer2Type,
|
||||
&mixerSettingsData.Mixer3Type,
|
||||
&mixerSettingsData.Mixer4Type,
|
||||
&mixerSettingsData.Mixer5Type,
|
||||
&mixerSettingsData.Mixer6Type,
|
||||
&mixerSettingsData.Mixer7Type,
|
||||
&mixerSettingsData.Mixer8Type,
|
||||
&mixerSettingsData.Mixer9Type,
|
||||
&mixerSettingsData.Mixer10Type,
|
||||
};
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
// Default to none if not found. Then search for any mixer channels set to
|
||||
// this
|
||||
for (int i = 0; i < NUM_OUTPUTS; i++) {
|
||||
// Default to none if not found.
|
||||
// Then search for any mixer channels set to this
|
||||
outputs[i]->setCurrentIndex(0);
|
||||
for (int j = 0; j < NUM_MIXERS; j++)
|
||||
if (*mixerTypes[j] == (MixerSettings::MIXER1TYPE_CAMERAROLL + i) &&
|
||||
outputs[i]->currentIndex() != (j + 1))
|
||||
outputs[i]->setCurrentIndex(j + 1);
|
||||
}
|
||||
|
||||
setDirty(dirty);
|
||||
|
||||
ConfigTaskWidget::refreshWidgetsValues(obj);
|
||||
}
|
||||
|
||||
void ConfigCameraStabilizationWidget::resetToDefaults()
|
||||
/*
|
||||
* This overridden function updates UAVObjects which have no direct relation
|
||||
* to any of widgets. Aftewards it calls base class function to take care of
|
||||
* other object to widget relations which were dynamically added.
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::updateObjectsFromWidgets()
|
||||
{
|
||||
CameraStabSettings cameraStabDefaults;
|
||||
CameraStabSettings::DataFields defaults = cameraStabDefaults.getData();
|
||||
refreshUIValues(defaults);
|
||||
// Save state of the module enable checkbox first
|
||||
HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
quint8 value = m_camerastabilization->enableCameraStabilization->isChecked() ?
|
||||
HwSettings::OPTIONALMODULES_ENABLED : HwSettings::OPTIONALMODULES_DISABLED;
|
||||
hwSettings->setOptionalModules(HwSettings::OPTIONALMODULES_CAMERASTAB,value);
|
||||
|
||||
// Update mixer channels which were mapped to camera outputs in case they are
|
||||
// not used for other function yet
|
||||
MixerSettings *mixerSettings = MixerSettings::GetInstance(getObjectManager());
|
||||
MixerSettings::DataFields mixerSettingsData = mixerSettings->getData();
|
||||
|
||||
// TODO: Need to reformat object so types are an
|
||||
// array themselves. This gets really awkward
|
||||
quint8 *mixerTypes[] = {
|
||||
&mixerSettingsData.Mixer1Type,
|
||||
&mixerSettingsData.Mixer2Type,
|
||||
&mixerSettingsData.Mixer3Type,
|
||||
&mixerSettingsData.Mixer4Type,
|
||||
&mixerSettingsData.Mixer5Type,
|
||||
&mixerSettingsData.Mixer6Type,
|
||||
&mixerSettingsData.Mixer7Type,
|
||||
&mixerSettingsData.Mixer8Type,
|
||||
&mixerSettingsData.Mixer9Type,
|
||||
&mixerSettingsData.Mixer10Type,
|
||||
};
|
||||
const int NUM_MIXERS = sizeof(mixerTypes) / sizeof(mixerTypes[0]);
|
||||
|
||||
QComboBox *outputs[] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
m_camerastabilization->pitchChannel,
|
||||
m_camerastabilization->yawChannel
|
||||
};
|
||||
const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]);
|
||||
|
||||
m_camerastabilization->message->setText("");
|
||||
bool widgetUpdated;
|
||||
do {
|
||||
widgetUpdated = false;
|
||||
|
||||
for (int i = 0; i < NUM_OUTPUTS; i++) {
|
||||
// Channel 1 is second entry, so becomes zero
|
||||
int mixerNum = outputs[i]->currentIndex() - 1;
|
||||
|
||||
if ((mixerNum >= 0) && // Short circuit in case of none
|
||||
(*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_DISABLED) &&
|
||||
(*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_CAMERAROLL + i) ) {
|
||||
// If the mixer channel already mapped to something, it should not be
|
||||
// used for camera output, we reset it to none
|
||||
outputs[i]->setCurrentIndex(0);
|
||||
m_camerastabilization->message->setText("One of the channels is already assigned, reverted to none");
|
||||
|
||||
// Loop again or we may have inconsistent widget and UAVObject
|
||||
widgetUpdated = true;
|
||||
} else {
|
||||
// Make sure no other channels have this output set
|
||||
for (int j = 0; j < NUM_MIXERS; j++)
|
||||
if (*mixerTypes[j] == (MixerSettings::MIXER1TYPE_CAMERAROLL + i))
|
||||
*mixerTypes[j] = MixerSettings::MIXER1TYPE_DISABLED;
|
||||
|
||||
// If this channel is assigned to one of the outputs that is not disabled
|
||||
// set it
|
||||
if ((mixerNum >= 0) && (mixerNum < NUM_MIXERS))
|
||||
*mixerTypes[mixerNum] = MixerSettings::MIXER1TYPE_CAMERAROLL + i;
|
||||
}
|
||||
}
|
||||
} while(widgetUpdated);
|
||||
|
||||
mixerSettings->setData(mixerSettingsData);
|
||||
|
||||
ConfigTaskWidget::updateObjectsFromWidgets();
|
||||
}
|
||||
|
||||
void ConfigCameraStabilizationWidget::enableControls(bool enable)
|
||||
/*
|
||||
* This slot function is called when "Default" button is clicked.
|
||||
* All special widgets which belong to the group passed should be set here.
|
||||
*/
|
||||
void ConfigCameraStabilizationWidget::defaultRequestedSlot(int group)
|
||||
{
|
||||
m_camerastabilization->camerastabilizationResetToDefaults->setEnabled(enable);
|
||||
m_camerastabilization->camerastabilizationSaveSD->setEnabled(enable);
|
||||
m_camerastabilization->camerastabilizationSaveRAM->setEnabled(enable);
|
||||
Q_UNUSED(group);
|
||||
|
||||
// Here is the example of how to reset the state of QCheckBox. It is
|
||||
// commented out because we normally don't want to reset the module
|
||||
// enable state to default "disabled" (or we don't care about values at all).
|
||||
// But if you want, you could use the dirtyClone() function to get default
|
||||
// values of an object and then use them to set a widget state.
|
||||
//
|
||||
//HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
//HwSettings *hwSettingsDefault=(HwSettings*)hwSettings->dirtyClone();
|
||||
//HwSettings::DataFields hwSettingsData = hwSettingsDefault->getData();
|
||||
//m_camerastabilization->enableCameraStabilization->setChecked(
|
||||
// hwSettingsData.OptionalModules[HwSettings::OPTIONALMODULES_CAMERASTAB] == HwSettings::OPTIONALMODULES_ENABLED);
|
||||
|
||||
// For outputs we set them all to none, so don't use any UAVObject to get defaults
|
||||
QComboBox *outputs[] = {
|
||||
m_camerastabilization->rollChannel,
|
||||
m_camerastabilization->pitchChannel,
|
||||
m_camerastabilization->yawChannel,
|
||||
};
|
||||
const int NUM_OUTPUTS = sizeof(outputs) / sizeof(outputs[0]);
|
||||
|
||||
for (int i = 0; i < NUM_OUTPUTS; i++) {
|
||||
outputs[i]->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,20 +41,14 @@ class ConfigCameraStabilizationWidget: public ConfigTaskWidget
|
||||
public:
|
||||
ConfigCameraStabilizationWidget(QWidget *parent = 0);
|
||||
~ConfigCameraStabilizationWidget();
|
||||
|
||||
private:
|
||||
Ui_CameraStabilizationWidget *m_camerastabilization;
|
||||
virtual void enableControls(bool enable);
|
||||
void refreshUIValues(CameraStabSettings::DataFields &cameraStabData);
|
||||
void refreshWidgetsValues(UAVObject *obj);
|
||||
void updateObjectsFromWidgets();
|
||||
|
||||
private slots:
|
||||
void resetToDefaults();
|
||||
void applySettings();
|
||||
void saveSettings();
|
||||
void refreshValues();
|
||||
|
||||
protected:
|
||||
void connectUpdates();
|
||||
void disconnectUpdates();
|
||||
void defaultRequestedSlot(int group);
|
||||
};
|
||||
|
||||
#endif // CONFIGCAMERASTABILIZATIONWIDGET_H
|
||||
|
@ -58,9 +58,18 @@ void ConfigTaskWidget::addWidget(QWidget * widget)
|
||||
* Add an object to the management system
|
||||
* @param objectName name of the object to add to the management system
|
||||
*/
|
||||
void ConfigTaskWidget::addUAVObject(QString objectName)
|
||||
void ConfigTaskWidget::addUAVObject(QString objectName,QList<int> * reloadGroups)
|
||||
{
|
||||
addUAVObjectToWidgetRelation(objectName,"",NULL);
|
||||
addUAVObjectToWidgetRelation(objectName,"",NULL,0,1,false,reloadGroups);
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObject(UAVObject *objectName, QList<int> *reloadGroups)
|
||||
{
|
||||
QString objstr;
|
||||
if(objectName)
|
||||
objstr=objectName->getName();
|
||||
addUAVObject(objstr, reloadGroups);
|
||||
|
||||
}
|
||||
/**
|
||||
* Add an UAVObject field to widget relation to the management system
|
||||
@ -79,6 +88,17 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
|
||||
Q_ASSERT(_field);
|
||||
addUAVObjectToWidgetRelation(object,field,widget,_field->getElementNames().indexOf(index));
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, index);
|
||||
}
|
||||
/**
|
||||
* Add a UAVObject field to widget relation to the management system
|
||||
* @param object name of the object to add
|
||||
@ -104,6 +124,28 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
|
||||
}
|
||||
addUAVObjectToWidgetRelation(object, field, widget,index,scale,isLimited,defaultReloadGroups,instID);
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField *field, QWidget *widget, QString element, double scale, bool isLimited, QList<int> *defaultReloadGroups, quint32 instID)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr, fieldstr, widget, element, scale, isLimited, defaultReloadGroups, instID);
|
||||
}
|
||||
void ConfigTaskWidget::addUAVObjectToWidgetRelation(UAVObject * obj,UAVObjectField * field, QWidget * widget, int index,double scale,bool isLimited,QList<int>* defaultReloadGroups, quint32 instID)
|
||||
{
|
||||
QString objstr;
|
||||
QString fieldstr;
|
||||
if(obj)
|
||||
objstr=obj->getName();
|
||||
if(field)
|
||||
fieldstr=field->getName();
|
||||
addUAVObjectToWidgetRelation(objstr,fieldstr,widget,index,scale,isLimited,defaultReloadGroups,instID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an UAVObject field to widget relation to the management system
|
||||
* @param object name of the object to add
|
||||
@ -149,7 +191,21 @@ void ConfigTaskWidget::addUAVObjectToWidgetRelation(QString object, QString fiel
|
||||
}
|
||||
if(widget==NULL)
|
||||
{
|
||||
// do nothing
|
||||
if(defaultReloadGroups && obj)
|
||||
{
|
||||
foreach(int i,*defaultReloadGroups)
|
||||
{
|
||||
if(this->defaultReloadGroups.contains(i))
|
||||
{
|
||||
this->defaultReloadGroups.value(i)->append(ow);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->defaultReloadGroups.insert(i,new QList<objectToWidget*>());
|
||||
this->defaultReloadGroups.value(i)->append(ow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -177,10 +233,6 @@ ConfigTaskWidget::~ConfigTaskWidget()
|
||||
if(oTw)
|
||||
delete oTw;
|
||||
}
|
||||
if(timeOut)
|
||||
{
|
||||
delete timeOut;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::saveObjectToSD(UAVObject *obj)
|
||||
@ -225,7 +277,7 @@ void ConfigTaskWidget::onAutopilotDisconnect()
|
||||
invalidateObjects();
|
||||
}
|
||||
|
||||
void ConfigTaskWidget::forceConnectedState()
|
||||
void ConfigTaskWidget::forceConnectedState()//dynamic widgets don't recieve the connected signal. This should be called instead.
|
||||
{
|
||||
isConnected=true;
|
||||
setDirty(false);
|
||||
@ -554,7 +606,7 @@ bool ConfigTaskWidget::addShadowWidget(QString object, QString field, QWidget *w
|
||||
{
|
||||
foreach(objectToWidget * oTw,objOfInterest)
|
||||
{
|
||||
if(!oTw->object || !oTw->widget)
|
||||
if(!oTw->object || !oTw->widget || !oTw->field)
|
||||
continue;
|
||||
if(oTw->object->getName()==object && oTw->field->getName()==field && oTw->index==index && oTw->object->getInstID()==instID)
|
||||
{
|
||||
@ -711,10 +763,12 @@ void ConfigTaskWidget::autoLoadWidgets()
|
||||
forceShadowUpdates();
|
||||
foreach(objectToWidget * ow,objOfInterest)
|
||||
{
|
||||
qDebug()<<"Master:"<<ow->widget->objectName();
|
||||
if(ow->widget)
|
||||
qDebug()<<"Master:"<<ow->widget->objectName();
|
||||
foreach(shadow * sh,ow->shadowsList)
|
||||
{
|
||||
qDebug()<<"Child"<<sh->widget->objectName();
|
||||
if(sh->widget)
|
||||
qDebug()<<"Child"<<sh->widget->objectName();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -783,10 +837,11 @@ void ConfigTaskWidget::addReloadButton(QPushButton *button, int buttonGroup)
|
||||
void ConfigTaskWidget::defaultButtonClicked()
|
||||
{
|
||||
int group=sender()->property("group").toInt();
|
||||
emit defaultRequested(group);
|
||||
QList<objectToWidget*> * list=defaultReloadGroups.value(group);
|
||||
foreach(objectToWidget * oTw,*list)
|
||||
{
|
||||
if(!oTw->object)
|
||||
if(!oTw->object || !oTw->field)
|
||||
continue;
|
||||
UAVDataObject * temp=((UAVDataObject*)oTw->object)->dirtyClone();
|
||||
setWidgetFromField(oTw->widget,temp->getField(oTw->field->getName()),oTw->index,oTw->scale,oTw->isLimited);
|
||||
@ -797,9 +852,8 @@ void ConfigTaskWidget::defaultButtonClicked()
|
||||
*/
|
||||
void ConfigTaskWidget::reloadButtonClicked()
|
||||
{
|
||||
QPushButton * button=qobject_cast<QPushButton*>(sender());
|
||||
if(button)
|
||||
button->setEnabled(false);
|
||||
if(timeOut)
|
||||
return;
|
||||
int group=sender()->property("group").toInt();
|
||||
QList<objectToWidget*> * list=defaultReloadGroups.value(group,NULL);
|
||||
if(!list)
|
||||
@ -834,7 +888,8 @@ void ConfigTaskWidget::reloadButtonClicked()
|
||||
if(timeOut->isActive())
|
||||
{
|
||||
oTw->object->requestUpdate();
|
||||
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
|
||||
if(oTw->widget)
|
||||
setWidgetFromField(oTw->widget,oTw->field,oTw->index,oTw->scale,oTw->isLimited);
|
||||
}
|
||||
timeOut->stop();
|
||||
}
|
||||
@ -849,8 +904,6 @@ void ConfigTaskWidget::reloadButtonClicked()
|
||||
delete timeOut;
|
||||
timeOut=NULL;
|
||||
}
|
||||
if(button)
|
||||
button->setEnabled(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -103,12 +103,19 @@ public:
|
||||
UAVObjectManager* getObjectManager();
|
||||
static double listMean(QList<double> list);
|
||||
|
||||
void addUAVObject(QString objectName);
|
||||
void addUAVObject(QString objectName, QList<int> *reloadGroups=NULL);
|
||||
void addUAVObject(UAVObject * objectName, QList<int> *reloadGroups=NULL);
|
||||
|
||||
void addWidget(QWidget * widget);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,int index=0,double scale=1,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, int index=0, double scale=1, bool isLimited=false, QList<int> *defaultReloadGroups=0, quint32 instID=0);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object,QString field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field,QWidget * widget,QString element,double scale,bool isLimited=false,QList<int>* defaultReloadGroups=0,quint32 instID=0);
|
||||
|
||||
void addUAVObjectToWidgetRelation(QString object, QString field, QWidget *widget, QString index);
|
||||
void addUAVObjectToWidgetRelation(UAVObject *obj, UAVObjectField * field, QWidget *widget, QString index);
|
||||
|
||||
//BUTTONS//
|
||||
void addApplySaveButtons(QPushButton * update,QPushButton * save);
|
||||
@ -150,6 +157,7 @@ signals:
|
||||
void autoPilotConnected();
|
||||
//fired when the autopilot disconnects
|
||||
void autoPilotDisconnected();
|
||||
void defaultRequested(int group);
|
||||
private slots:
|
||||
void objectUpdated(UAVObject*);
|
||||
void defaultButtonClicked();
|
||||
|
@ -162,6 +162,7 @@ void smartSaveButton::setObjects(QList<UAVDataObject *> list)
|
||||
|
||||
void smartSaveButton::addObject(UAVDataObject * obj)
|
||||
{
|
||||
Q_ASSERT(obj);
|
||||
if(!objects.contains(obj))
|
||||
objects.append(obj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user