feat: use any source for expo/weight/offset (#5220)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
philmoz
2024-07-26 20:51:21 +10:00
committed by GitHub
co-authored by philmoz 3djc elecpower
parent 326c58a7fd
commit 4b917b762c
87 changed files with 2751 additions and 1671 deletions
+487 -451
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>442</width>
<height>411</height>
<width>671</width>
<height>490</height>
</rect>
</property>
<property name="sizePolicy">
@@ -29,61 +29,502 @@
<iconset resource="../companion.qrc">
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="13" column="1">
<widget class="QComboBox" name="sideCB">
<item>
<property name="text">
<string>NEG</string>
</property>
</item>
<item>
<property name="text">
<string>POS</string>
</property>
</item>
<item>
<property name="text">
<string>ALL</string>
</property>
</item>
</widget>
</item>
<item row="8" column="1">
<layout class="QHBoxLayout" name="offsetLayout" stretch="0,0,1,0">
<item>
<widget class="QCheckBox" name="offsetGV">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="sourceLabel">
<property name="text">
<string>GV</string>
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="offsetSB"/>
</item>
<item>
<widget class="QComboBox" name="offsetCB">
<property name="whatsThis">
<string>The source for the mixer</string>
<item row="5" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Weight</string>
</property>
</widget>
</item>
<item>
<spacer name="offsetSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="4" column="0">
<widget class="QLabel" name="trimLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>0</height>
</size>
<property name="text">
<string>Include Trim</string>
</property>
</spacer>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblScale">
<property name="text">
<string>Scale</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lineNameLabel">
<property name="text">
<string>Line name</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="inputNameLabel">
<property name="text">
<string>Input name</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_phases">
<property name="text">
<string>Flight modes</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="sideLabel">
<property name="text">
<string>Stick Side</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_curves">
<property name="text">
<string>Curve</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="offsetLabel">
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Switch</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="dsbScale">
<property name="whatsThis">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblScaleUnit">
<property name="text">
<string>unit</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QCheckBox" name="chkWeightUseSource">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbWeightValue"/>
</item>
<item>
<widget class="QComboBox" name="cboWeightSource">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="8" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QLabel" name="lb_FP1">
<property name="text">
<string notr="true">1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QLabel" name="lb_FP6">
<property name="text">
<string notr="true">6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cb_FP1">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="7">
<widget class="QLabel" name="lb_FP7">
<property name="text">
<string notr="true">7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lb_FP0">
<property name="text">
<string notr="true">0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="cb_FP3">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cb_FP0">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="8">
<widget class="QCheckBox" name="cb_FP8">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QCheckBox" name="cb_FP6">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="cb_FP4">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QLabel" name="lb_FP8">
<property name="text">
<string notr="true">8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="cb_FP2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="lb_FP2">
<property name="text">
<string notr="true">2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="lb_FP4">
<property name="text">
<string notr="true">4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QLabel" name="lb_FP5">
<property name="text">
<string notr="true">5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QCheckBox" name="cb_FP5">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="7">
<widget class="QCheckBox" name="cb_FP7">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="lb_FP3">
<property name="text">
<string notr="true">3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="9">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="7" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QComboBox" name="cboCurveType">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string>Curve applied to the source.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCurveUseSource">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbCurveValue"/>
</item>
<item>
<widget class="QComboBox" name="cboCurveFunc"/>
</item>
<item>
<widget class="QComboBox" name="cboCurveSource">
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<widget class="CurveImageWidget" name="imgCurve">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>image</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="6" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="chkOffsetUseSource">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbOffsetValue"/>
</item>
<item>
<widget class="QComboBox" name="cboOffsetSource">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>The source for the mixer</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="inputName">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineName">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="trimCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QComboBox" name="switchesCB"/>
</item>
<item row="10" column="1">
<widget class="QComboBox" name="sideCB">
<item>
<property name="text">
<string>NEG</string>
</property>
</item>
<item>
<property name="text">
<string>POS</string>
</property>
</item>
<item>
<property name="text">
<string>ALL</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="sourceCB"/>
</item>
</layout>
</item>
<item row="14" column="0" colspan="2">
<item row="1" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="minimumSize">
<size>
@@ -98,394 +539,7 @@
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="trimCB"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineName">
<property name="maxLength">
<number>6</number>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_curves">
<property name="text">
<string>Curve</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Switch</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_phases">
<property name="text">
<string>Flight modes</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="sideLabel">
<property name="text">
<string>Stick Side</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Weight</string>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,1,0">
<item>
<widget class="QCheckBox" name="weightGV">
<property name="text">
<string>GV</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="weightSB"/>
</item>
<item>
<widget class="QComboBox" name="weightCB">
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="11" column="1">
<widget class="QComboBox" name="switchesCB">
<property name="whatsThis">
<string>Switch used to enable the line.
If blank then the input is considered to be &quot;ON&quot; all the time.</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="offsetLabel">
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="sourceLabel">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="inputNameLabel">
<property name="text">
<string>Input name</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="sourceCB">
<property name="whatsThis">
<string>Source for the mixer.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="inputName">
<property name="maxLength">
<number>6</number>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QDoubleSpinBox" name="dsbScale">
<property name="whatsThis">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="decimals">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblScaleUnit">
<property name="text">
<string>unit</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="10" column="1">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="lb_FP0">
<property name="text">
<string notr="true">0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lb_FP1">
<property name="text">
<string notr="true">1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="lb_FP2">
<property name="text">
<string notr="true">2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="lb_FP3">
<property name="text">
<string notr="true">3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="lb_FP4">
<property name="text">
<string notr="true">4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QLabel" name="lb_FP5">
<property name="text">
<string notr="true">5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QLabel" name="lb_FP6">
<property name="text">
<string notr="true">6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="7">
<widget class="QLabel" name="lb_FP7">
<property name="text">
<string notr="true">7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QLabel" name="lb_FP8">
<property name="text">
<string notr="true">8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cb_FP0">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="cb_FP1">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="cb_FP2">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="cb_FP3">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="cb_FP4">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QCheckBox" name="cb_FP5">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QCheckBox" name="cb_FP6">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="7">
<widget class="QCheckBox" name="cb_FP7">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="8">
<widget class="QCheckBox" name="cb_FP8">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblScale">
<property name="text">
<string>Scale</string>
</property>
</widget>
</item>
<item row="9" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,1,0,0">
<item>
<widget class="QComboBox" name="curveTypeCB">
<property name="toolTip">
<string/>
</property>
<property name="whatsThis">
<string>Curve applied to the source.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="curveGVarCB">
<property name="text">
<string>GV</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="curveValueCB">
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="curveValueSB"/>
</item>
<item>
<widget class="CurveImageWidget" name="curveImage">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>image</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="trimLabel">
<property name="text">
<string>Include Trim</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lineNameLabel">
<property name="text">
<string>Line name</string>
<bool>false</bool>
</property>
</widget>
</item>
@@ -499,21 +553,6 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
</customwidget>
</customwidgets>
<tabstops>
<tabstop>inputName</tabstop>
<tabstop>lineName</tabstop>
<tabstop>sourceCB</tabstop>
<tabstop>dsbScale</tabstop>
<tabstop>trimCB</tabstop>
<tabstop>weightGV</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>offsetGV</tabstop>
<tabstop>offsetSB</tabstop>
<tabstop>offsetCB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
<tabstop>curveValueSB</tabstop>
<tabstop>cb_FP0</tabstop>
<tabstop>cb_FP1</tabstop>
<tabstop>cb_FP2</tabstop>
@@ -522,9 +561,6 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
<tabstop>cb_FP5</tabstop>
<tabstop>cb_FP6</tabstop>
<tabstop>cb_FP7</tabstop>
<tabstop>cb_FP8</tabstop>
<tabstop>switchesCB</tabstop>
<tabstop>sideCB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>