Browse Source

Added support to set ground time as linechart time

QGC4.4
lm 15 years ago
parent
commit
222607d11c
  1. 4
      src/uas/UAS.cc
  2. 7
      src/ui/linechart/LinechartWidget.cc

4
src/uas/UAS.cc

@ -224,7 +224,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// COMMUNICATIONS DROP RATE // COMMUNICATIONS DROP RATE
emit dropRateChanged(this->getUASID(), state.packet_drop); emit dropRateChanged(this->getUASID(), state.packet_drop);
qDebug() << __FILE__ << __LINE__ << "RCV LOSS: " << state.packet_drop; //qDebug() << __FILE__ << __LINE__ << "RCV LOSS: " << state.packet_drop;
// AUDIO // AUDIO
if (modechanged && statechanged) if (modechanged && statechanged)
@ -237,7 +237,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
// Output the one message // Output the one message
audiostring += modeAudio + stateAudio; audiostring += modeAudio + stateAudio;
} }
if (state.status == (int)MAV_STATE_CRITICAL || state.status == (int)MAV_STATE_EMERGENCY) if ((int)state.status == (int)MAV_STATE_CRITICAL || state.status == (int)MAV_STATE_EMERGENCY)
{ {
GAudioOutput::instance()->startEmergency(); GAudioOutput::instance()->startEmergency();
} }

7
src/ui/linechart/LinechartWidget.cc

@ -119,7 +119,7 @@ void LinechartWidget::createLayout()
// activePlot = getPlot(0); // activePlot = getPlot(0);
// plotContainer->setPlot(activePlot); // plotContainer->setPlot(activePlot);
layout->addWidget(activePlot, 0, 0, 1, 5); layout->addWidget(activePlot, 0, 0, 1, 6);
layout->setRowStretch(0, 10); layout->setRowStretch(0, 10);
layout->setRowStretch(1, 0); layout->setRowStretch(1, 0);
@ -156,6 +156,7 @@ void LinechartWidget::createLayout()
QToolButton* timeButton = new QToolButton(this); QToolButton* timeButton = new QToolButton(this);
timeButton->setText(tr("Ground Time")); timeButton->setText(tr("Ground Time"));
timeButton->setCheckable(true); timeButton->setCheckable(true);
timeButton->setChecked(false);
layout->addWidget(timeButton, 1, 4); layout->addWidget(timeButton, 1, 4);
layout->setColumnStretch(4, 0); layout->setColumnStretch(4, 0);
connect(timeButton, SIGNAL(clicked(bool)), activePlot, SLOT(enforceGroundTime(bool))); connect(timeButton, SIGNAL(clicked(bool)), activePlot, SLOT(enforceGroundTime(bool)));
@ -172,8 +173,8 @@ void LinechartWidget::createLayout()
// Add scroll bar to layout and make sure it gets all available space // Add scroll bar to layout and make sure it gets all available space
layout->addWidget(scrollbar, 1, 4); layout->addWidget(scrollbar, 1, 5);
layout->setColumnStretch(4, 10); layout->setColumnStretch(5, 10);
ui.diagramGroupBox->setLayout(layout); ui.diagramGroupBox->setLayout(layout);

Loading…
Cancel
Save