mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
Turned off wheel scrolling! Also changed all wheel focus
to strong focus
.
This commit is contained in:
parent
ac76628c84
commit
0b7b86cd24
@ -2571,6 +2571,9 @@ margin:1px;</string>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Overall level of feed forward (in percentage).</string>
|
||||
</property>
|
||||
@ -2600,6 +2603,9 @@ margin:1px;</string>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>In miliseconds.
|
||||
When tuning: Slowly raise accel time from zero to just
|
||||
@ -2629,6 +2635,9 @@ its target speed.</string>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>When tuning: Slowly raise decel time from zero to just
|
||||
under the level where the motor starts to undershoot
|
||||
@ -2667,6 +2676,9 @@ Do it after accel time is setup.</string>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSlider" name="maxAccelSlider">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Limits how much the engines can accelerate or decelerate.
|
||||
In 'units per second', a sound default is 1000.</string>
|
||||
@ -2704,6 +2716,9 @@ In 'units per second', a sound default is 1000.</string>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ffTestBox1">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
@ -2719,6 +2734,9 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ffTestBox2">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
@ -2734,6 +2752,9 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ffTestBox3">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
|
@ -51,6 +51,9 @@ QGroupBox::title {
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableCameraStabilization">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable CameraStabilization module</string>
|
||||
</property>
|
||||
@ -106,6 +109,9 @@ QGroupBox::title {
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<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.
|
||||
|
||||
@ -122,6 +128,9 @@ have to define channel output range using Output configuration tab.</string>
|
||||
</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.
|
||||
|
||||
@ -138,6 +147,9 @@ have to define channel output range using Output configuration tab.</string>
|
||||
</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.
|
||||
|
||||
@ -154,6 +166,9 @@ have to define channel output range using Output configuration tab.</string>
|
||||
</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>
|
||||
@ -166,6 +181,9 @@ have to define channel output range using Output configuration tab.</string>
|
||||
</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>
|
||||
@ -178,6 +196,9 @@ have to define channel output range using Output configuration tab.</string>
|
||||
</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>
|
||||
@ -356,6 +377,9 @@ margin:1px;</string>
|
||||
</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
|
||||
|
||||
@ -370,6 +394,9 @@ Don't forget to map this channel using Input configuration tab.</string>
|
||||
</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
|
||||
|
||||
@ -384,6 +411,9 @@ Don't forget to map this channel using Input configuration tab.</string>
|
||||
</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
|
||||
|
||||
@ -405,6 +435,9 @@ Don't forget to map this channel using Input configuration tab.</string>
|
||||
</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
|
||||
|
||||
@ -420,6 +453,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -433,6 +469,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -446,6 +485,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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.
|
||||
|
||||
@ -461,6 +503,9 @@ This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</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
|
||||
|
||||
@ -476,6 +521,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -489,6 +537,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -502,6 +553,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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.
|
||||
|
||||
@ -517,6 +571,9 @@ This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</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
|
||||
|
||||
@ -532,6 +589,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -545,6 +605,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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>
|
||||
@ -558,6 +621,9 @@ AxisLock: camera remembers tracking attitude. Input controls the rate of deflect
|
||||
</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.
|
||||
|
||||
@ -615,6 +681,9 @@ This option smoothes the stick input. Zero value disables LPF.</string>
|
||||
</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.
|
||||
|
||||
|
@ -89,6 +89,17 @@ ConfigCameraStabilizationWidget::ConfigCameraStabilizationWidget(QWidget *parent
|
||||
connect(m_camerastabilization->camerastabilizationSaveRAM, SIGNAL(clicked()), this, SLOT(applySettings()));
|
||||
connect(m_camerastabilization->camerastabilizationSaveSD, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||
connect(m_camerastabilization->camerastabilizationHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
}
|
||||
|
||||
ConfigCameraStabilizationWidget::~ConfigCameraStabilizationWidget()
|
||||
@ -96,6 +107,19 @@ ConfigCameraStabilizationWidget::~ConfigCameraStabilizationWidget()
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
bool ConfigCameraStabilizationWidget::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
void ConfigCameraStabilizationWidget::connectUpdates()
|
||||
{
|
||||
// Now connect the widget to the StabilizationSettings object
|
||||
|
@ -41,7 +41,7 @@ class ConfigCameraStabilizationWidget: public ConfigTaskWidget
|
||||
public:
|
||||
ConfigCameraStabilizationWidget(QWidget *parent = 0);
|
||||
~ConfigCameraStabilizationWidget();
|
||||
|
||||
bool eventFilter( QObject * obj, QEvent * evt );
|
||||
private:
|
||||
Ui_CameraStabilizationWidget *m_camerastabilization;
|
||||
virtual void enableControls(bool enable);
|
||||
|
@ -52,6 +52,18 @@ ConfigStabilizationWidget::ConfigStabilizationWidget(QWidget *parent) : ConfigTa
|
||||
connect(m_stabilization->checkBox_3,SIGNAL(stateChanged(int)),this,SLOT(linkCheckBoxes(int)));
|
||||
|
||||
connect(this,SIGNAL(widgetContentsChanged(QWidget*)),this,SLOT(processLinkedWidgets(QWidget*)));
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -60,6 +72,19 @@ ConfigStabilizationWidget::~ConfigStabilizationWidget()
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
bool ConfigStabilizationWidget::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
void ConfigStabilizationWidget::realtimeUpdatesSlot(int value)
|
||||
{
|
||||
m_stabilization->realTimeUpdates_6->setCheckState((Qt::CheckState)value);
|
||||
|
@ -44,6 +44,7 @@ class ConfigStabilizationWidget: public ConfigTaskWidget
|
||||
public:
|
||||
ConfigStabilizationWidget(QWidget *parent = 0);
|
||||
~ConfigStabilizationWidget();
|
||||
bool eventFilter( QObject * o, QEvent * e );
|
||||
|
||||
private:
|
||||
Ui_StabilizationWidget *m_stabilization;
|
||||
|
@ -67,6 +67,17 @@ ConfigTxPIDWidget::ConfigTxPIDWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
enableControls(false);
|
||||
populateWidgets();
|
||||
refreshWidgetsValues();
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
}
|
||||
|
||||
ConfigTxPIDWidget::~ConfigTxPIDWidget()
|
||||
@ -74,6 +85,19 @@ ConfigTxPIDWidget::~ConfigTxPIDWidget()
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
bool ConfigTxPIDWidget::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
void ConfigTxPIDWidget::refreshValues()
|
||||
{
|
||||
HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
|
@ -37,7 +37,7 @@ class ConfigTxPIDWidget : public ConfigTaskWidget
|
||||
public:
|
||||
ConfigTxPIDWidget(QWidget *parent = 0);
|
||||
~ConfigTxPIDWidget();
|
||||
|
||||
bool eventFilter( QObject * obj, QEvent * evt );
|
||||
private:
|
||||
Ui_TxPIDWidget *m_txpid;
|
||||
|
||||
|
@ -233,6 +233,16 @@ ConfigVehicleTypeWidget::ConfigVehicleTypeWidget(QWidget *parent) : ConfigTaskWi
|
||||
setupGroundVehicleUI( m_aircraft->groundVehicleType->currentText() );
|
||||
setupFixedWingUI( m_aircraft->fixedWingType->currentText() );
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -245,6 +255,18 @@ ConfigVehicleTypeWidget::~ConfigVehicleTypeWidget()
|
||||
}
|
||||
|
||||
|
||||
bool ConfigVehicleTypeWidget::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Slot for switching the airframe type. We do it explicitely
|
||||
rather than a signal in the UI, because we want to force a fitInView of the quad shapes.
|
||||
|
@ -46,6 +46,7 @@ class ConfigVehicleTypeWidget: public ConfigTaskWidget
|
||||
public:
|
||||
ConfigVehicleTypeWidget(QWidget *parent = 0);
|
||||
~ConfigVehicleTypeWidget();
|
||||
bool eventFilter( QObject * obj, QEvent * evt );
|
||||
|
||||
private:
|
||||
Ui_AircraftWidget *m_aircraft;
|
||||
|
@ -291,6 +291,9 @@ margin:1px;</string>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
@ -301,6 +304,9 @@ margin:1px;</string>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
@ -311,6 +317,9 @@ margin:1px;</string>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
@ -324,13 +333,25 @@ margin:1px;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="fmsSsPos2Roll"/>
|
||||
<widget class="QComboBox" name="fmsSsPos2Roll">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="fmsSsPos2Pitch"/>
|
||||
<widget class="QComboBox" name="fmsSsPos2Pitch">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QComboBox" name="fmsSsPos2Yaw"/>
|
||||
<widget class="QComboBox" name="fmsSsPos2Yaw">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_22">
|
||||
@ -343,13 +364,25 @@ margin:1px;</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="fmsSsPos3Roll"/>
|
||||
<widget class="QComboBox" name="fmsSsPos3Roll">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="fmsSsPos3Pitch"/>
|
||||
<widget class="QComboBox" name="fmsSsPos3Pitch">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QComboBox" name="fmsSsPos3Yaw"/>
|
||||
<widget class="QComboBox" name="fmsSsPos3Yaw">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_8">
|
||||
@ -424,6 +457,9 @@ margin:1px;</string>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="fmsModePos3">
|
||||
<property name="geometry">
|
||||
@ -434,6 +470,9 @@ margin:1px;</string>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select the stabilization mode on this position (manual/stabilized/auto)</string>
|
||||
</property>
|
||||
@ -460,6 +499,9 @@ margin:1px;</string>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="geometry">
|
||||
@ -499,6 +541,9 @@ margin:1px;</string>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This slider moves when you move the flight mode switch
|
||||
on your remote. Setup the flightmode channel on the RC Input tab
|
||||
@ -572,6 +617,9 @@ if you have not done so already.</string>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="armControl">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Indicate the control used for arming the airframe, in addition to setting the throttle to its minimum position. In other terms "Throttle Off".</string>
|
||||
</property>
|
||||
@ -603,6 +651,9 @@ if you have not done so already.</string>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="armTimeout">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>After the time indicated here, the frame go back to disarmed state.</string>
|
||||
</property>
|
||||
@ -733,17 +784,30 @@ Applies and Saves all settings to SD</string>
|
||||
<tabstops>
|
||||
<tabstop>fmsSlider</tabstop>
|
||||
<tabstop>fmsModePos3</tabstop>
|
||||
<tabstop>fmsSsPos3Roll</tabstop>
|
||||
<tabstop>fmsSsPos3Pitch</tabstop>
|
||||
<tabstop>fmsSsPos3Yaw</tabstop>
|
||||
<tabstop>fmsModePos2</tabstop>
|
||||
<tabstop>fmsSsPos2Roll</tabstop>
|
||||
<tabstop>fmsSsPos2Pitch</tabstop>
|
||||
<tabstop>fmsSsPos2Yaw</tabstop>
|
||||
<tabstop>fmsModePos1</tabstop>
|
||||
<tabstop>fmsSsPos1Roll</tabstop>
|
||||
<tabstop>fmsSsPos1Pitch</tabstop>
|
||||
<tabstop>fmsSsPos1Yaw</tabstop>
|
||||
<tabstop>fmsSsPos2Roll</tabstop>
|
||||
<tabstop>fmsSsPos2Pitch</tabstop>
|
||||
<tabstop>fmsSsPos2Yaw</tabstop>
|
||||
<tabstop>fmsSsPos3Roll</tabstop>
|
||||
<tabstop>fmsSsPos3Pitch</tabstop>
|
||||
<tabstop>fmsSsPos3Yaw</tabstop>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
<tabstop>deadband</tabstop>
|
||||
<tabstop>configurationWizard</tabstop>
|
||||
<tabstop>runCalibration</tabstop>
|
||||
<tabstop>graphicsView</tabstop>
|
||||
<tabstop>wzBack</tabstop>
|
||||
<tabstop>wzNext</tabstop>
|
||||
<tabstop>wzCancel</tabstop>
|
||||
<tabstop>armControl</tabstop>
|
||||
<tabstop>armTimeout</tabstop>
|
||||
<tabstop>inputHelp</tabstop>
|
||||
<tabstop>saveRCInputToRAM</tabstop>
|
||||
<tabstop>saveRCInputToSD</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../coreplugin/core.qrc"/>
|
||||
|
@ -36,12 +36,38 @@ inputChannelForm::inputChannelForm(QWidget *parent,bool showlegend) :
|
||||
// a spin box fixes this
|
||||
connect(ui->channelNumberDropdown,SIGNAL(currentIndexChanged(int)),this,SLOT(channelDropdownUpdated(int)));
|
||||
connect(ui->channelNumber,SIGNAL(valueChanged(int)),this,SLOT(channelNumberUpdated(int)));
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inputChannelForm::~inputChannelForm()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
bool inputChannelForm::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
void inputChannelForm::setName(QString &name)
|
||||
{
|
||||
ui->channelName->setText(name);
|
||||
|
@ -14,6 +14,7 @@ class inputChannelForm : public QWidget
|
||||
public:
|
||||
explicit inputChannelForm(QWidget *parent = 0,bool showlegend=false);
|
||||
~inputChannelForm();
|
||||
bool eventFilter( QObject * obj, QEvent * evt );
|
||||
friend class ConfigInputWidget;
|
||||
void setName(QString &name);
|
||||
private slots:
|
||||
|
@ -65,6 +65,9 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
@ -75,6 +78,9 @@
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
@ -94,6 +100,9 @@
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
@ -275,6 +284,9 @@ font:bold;</string>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -300,6 +312,9 @@ font:bold;</string>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>7</number>
|
||||
</property>
|
||||
@ -471,6 +486,15 @@ font:bold;</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>channelNumber</tabstop>
|
||||
<tabstop>channelGroup</tabstop>
|
||||
<tabstop>channelNumberDropdown</tabstop>
|
||||
<tabstop>channelMin</tabstop>
|
||||
<tabstop>channelNeutral</tabstop>
|
||||
<tabstop>channelMax</tabstop>
|
||||
<tabstop>channelRev</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -70,6 +70,17 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent, const boo
|
||||
ui.actuatorLink->setChecked(false);
|
||||
connect(ui.actuatorLink, SIGNAL(toggled(bool)),
|
||||
this, SLOT(linkToggled(bool)));
|
||||
|
||||
//Disable mouse wheel events
|
||||
foreach( QSpinBox * sp, findChildren<QSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QDoubleSpinBox * sp, findChildren<QDoubleSpinBox*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
foreach( QSlider * sp, findChildren<QSlider*>() ) {
|
||||
sp->installEventFilter( this );
|
||||
}
|
||||
}
|
||||
|
||||
OutputChannelForm::~OutputChannelForm()
|
||||
@ -77,6 +88,19 @@ OutputChannelForm::~OutputChannelForm()
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
bool OutputChannelForm::eventFilter( QObject * obj, QEvent * evt ) {
|
||||
//Filter all wheel events, and ignore them
|
||||
if ( evt->type() == QEvent::Wheel &&
|
||||
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
|
||||
{
|
||||
evt->ignore();
|
||||
return true;
|
||||
}
|
||||
return QWidget::eventFilter( obj, evt );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Restrict UI to protect users from accidental misuse.
|
||||
*/
|
||||
|
@ -39,6 +39,7 @@ class OutputChannelForm : public QWidget
|
||||
public:
|
||||
explicit OutputChannelForm(const int index, QWidget *parent = NULL, const bool showLegend = false);
|
||||
~OutputChannelForm();
|
||||
bool eventFilter( QObject * obj, QEvent * evt );
|
||||
friend class ConfigOnputWidget;
|
||||
|
||||
void setAssignment(const QString &assignment);
|
||||
|
@ -34,6 +34,9 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="TxPIDEnable">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>This module will periodically update values of stabilization PID settings
|
||||
depending on configured input control channels. New values of stabilization
|
||||
@ -191,6 +194,9 @@ margin:1px;</string>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="PID1">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select PID option or option pair to update.
|
||||
Set to Disabled if not used.</string>
|
||||
@ -199,6 +205,9 @@ Set to Disabled if not used.</string>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="Input1">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select input used as a control source for this instance.
|
||||
It can be one of Accessory channels or Throttle channel.
|
||||
@ -219,6 +228,9 @@ used, for instance, to decrease PID value when increasing Throttle.</string>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QDoubleSpinBox" name="MinPID1">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Minimum PID value mapped to Accessory channel = 0 or
|
||||
Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
@ -233,6 +245,9 @@ Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QDoubleSpinBox" name="MaxPID1">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum PID value mapped to Accessory channel = 1 or
|
||||
Throttle channel greater or equal to Throttle Max value.</string>
|
||||
@ -254,6 +269,9 @@ Throttle channel greater or equal to Throttle Max value.</string>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="PID2">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select PID option or option pair to update.
|
||||
Set to Disabled if not used.</string>
|
||||
@ -262,6 +280,9 @@ Set to Disabled if not used.</string>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="Input2">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select input used as a control source for this instance.
|
||||
It can be one of Accessory channels or Throttle channel.
|
||||
@ -282,6 +303,9 @@ used, for instance, to decrease PID value when increasing Throttle.</string>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QDoubleSpinBox" name="MinPID2">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Minimum PID value mapped to Accessory channel = 0 or
|
||||
Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
@ -296,6 +320,9 @@ Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QDoubleSpinBox" name="MaxPID2">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum PID value mapped to Accessory channel = 1 or
|
||||
Throttle channel greater or equal to Throttle Max value.</string>
|
||||
@ -317,6 +344,9 @@ Throttle channel greater or equal to Throttle Max value.</string>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="PID3">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select PID option or option pair to update.
|
||||
Set to Disabled if not used.</string>
|
||||
@ -325,6 +355,9 @@ Set to Disabled if not used.</string>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="Input3">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Select input used as a control source for this instance.
|
||||
It can be one of Accessory channels or Throttle channel.
|
||||
@ -345,6 +378,9 @@ used, for instance, to decrease PID value when increasing Throttle.</string>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QDoubleSpinBox" name="MinPID3">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Minimum PID value mapped to Accessory channel = 0 or
|
||||
Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
@ -359,6 +395,9 @@ Throttle channel lesser or equal to Throttle Min value.</string>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QDoubleSpinBox" name="MaxPID3">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Maximum PID value mapped to Accessory channel = 1 or
|
||||
Throttle channel greater or equal to Throttle Max value.</string>
|
||||
@ -380,6 +419,9 @@ Throttle channel greater or equal to Throttle Max value.</string>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QComboBox" name="UpdateMode">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>PID values update mode which can be set to:
|
||||
- Never: this disables PID updates (but module still will be run if enabled),
|
||||
@ -403,6 +445,9 @@ only when system is armed without disabling the module.</string>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QDoubleSpinBox" name="ThrottleMin">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Throttle channel lower bound mapped to PID Min value</string>
|
||||
</property>
|
||||
@ -416,6 +461,9 @@ only when system is armed without disabling the module.</string>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QDoubleSpinBox" name="ThrottleMax">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Throttle channel upper bound mapped to PID Max value</string>
|
||||
</property>
|
||||
@ -578,6 +626,21 @@ margin:1px;</string>
|
||||
<tabstop>Apply</tabstop>
|
||||
<tabstop>Save</tabstop>
|
||||
<tabstop>scrollArea</tabstop>
|
||||
<tabstop>PID1</tabstop>
|
||||
<tabstop>Input1</tabstop>
|
||||
<tabstop>MinPID1</tabstop>
|
||||
<tabstop>MaxPID1</tabstop>
|
||||
<tabstop>PID2</tabstop>
|
||||
<tabstop>Input2</tabstop>
|
||||
<tabstop>MinPID2</tabstop>
|
||||
<tabstop>MaxPID2</tabstop>
|
||||
<tabstop>PID3</tabstop>
|
||||
<tabstop>Input3</tabstop>
|
||||
<tabstop>MinPID3</tabstop>
|
||||
<tabstop>MaxPID3</tabstop>
|
||||
<tabstop>ThrottleMin</tabstop>
|
||||
<tabstop>ThrottleMax</tabstop>
|
||||
<tabstop>UpdateMode</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user