Commit c23ac709 authored by Lorenz Meier's avatar Lorenz Meier

Visual cleanups in various places, fits now better small screens

parent 05cb3c23
...@@ -2485,36 +2485,39 @@ QString UAS::getShortModeTextFor(int id) ...@@ -2485,36 +2485,39 @@ QString UAS::getShortModeTextFor(int id)
{ {
mode += "AUTO"; mode += "AUTO";
} }
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_GUIDED) else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_GUIDED)
{ {
mode += "|GUID"; mode += "|STABILIZED";
} }
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_STABILIZE) // if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_STABILIZE)
// {
// mode += "|STAB";
// }
else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_TEST)
{ {
mode += "|STAB"; mode += "|TEST";
} }
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_TEST) else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_MANUAL)
{ {
mode += "|TEST"; mode += "|MANUAL";
} }
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_MANUAL) else if (modeid == 0)
{ {
mode += "|MAN"; mode = "|PREFLIGHT";
} }
else
if (modeid == 0)
{ {
mode = "PREFLIGHT"; mode = "|UNKNOWN";
} }
// ARMED STATE DECODING // ARMED STATE DECODING
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_SAFETY) if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_SAFETY)
{ {
mode.prepend("A/"); mode.prepend("A");
} }
else else
{ {
mode.prepend("D/"); mode.prepend("D");
} }
// HARDWARE IN THE LOOP DECODING // HARDWARE IN THE LOOP DECODING
......
This diff is collapsed.
...@@ -6,43 +6,25 @@ ...@@ -6,43 +6,25 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>335</width> <width>707</width>
<height>300</height> <height>572</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" rowstretch="2,0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="100,1">
<property name="horizontalSpacing">
<number>5</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<property name="margin"> <property name="margin">
<number>6</number> <number>0</number>
</property> </property>
<item row="0" column="0" colspan="2"> <item>
<widget class="QGroupBox" name="groupBox_2"> <widget class="QStackedWidget" name="stackedWidget">
<property name="title"> <property name="currentIndex">
<string>Onboard Parameters</string> <number>-1</number>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>3</number>
</property>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item row="1" column="0" colspan="2"> <item>
<widget class="QStackedWidget" name="sensorSettings"> <widget class="QStackedWidget" name="sensorSettings">
<property name="currentIndex"> <property name="currentIndex">
<number>-1</number> <number>-1</number>
......
...@@ -58,7 +58,7 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) : ...@@ -58,7 +58,7 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) :
tree = new QTreeWidget(this); tree = new QTreeWidget(this);
statusLabel = new QLabel(); statusLabel = new QLabel();
statusLabel->setAutoFillBackground(true); statusLabel->setAutoFillBackground(true);
tree->setColumnWidth(0, 175); tree->setColumnWidth(70, 30);
// Set tree widget as widget onto this component // Set tree widget as widget onto this component
QGridLayout* horizontalLayout; QGridLayout* horizontalLayout;
...@@ -67,8 +67,8 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) : ...@@ -67,8 +67,8 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) :
horizontalLayout->setHorizontalSpacing(6); horizontalLayout->setHorizontalSpacing(6);
horizontalLayout->setVerticalSpacing(6); horizontalLayout->setVerticalSpacing(6);
horizontalLayout->setMargin(0); horizontalLayout->setMargin(0);
//horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize); horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize);
horizontalLayout->setSizeConstraint( QLayout::SetFixedSize ); //horizontalLayout->setSizeConstraint( QLayout::SetFixedSize );
// Parameter tree // Parameter tree
horizontalLayout->addWidget(tree, 0, 0, 1, 3); horizontalLayout->addWidget(tree, 0, 0, 1, 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment