Browse Source

Merged in dev, reduced some update rates

QGC4.4
lm 14 years ago
parent
commit
5f02144133
  1. 4
      qgroundcontrol.pri
  2. 12
      src/ui/DebugConsole.cc
  3. 2
      src/ui/uas/UASInfoWidget.h

4
qgroundcontrol.pri

@ -71,8 +71,8 @@ macx { @@ -71,8 +71,8 @@ macx {
#CONFIG -= x86 # phonon
#message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
# debug {
QMAKE_CXXFLAGS += -finstrument-functions
LIBS += -lSaturn
#QMAKE_CXXFLAGS += -finstrument-functions
#LIBS += -lSaturn
CONFIG += console
# }
#}

12
src/ui/DebugConsole.cc

@ -255,6 +255,8 @@ void DebugConsole::setAutoHold(bool hold) @@ -255,6 +255,8 @@ void DebugConsole::setAutoHold(bool hold)
void DebugConsole::receiveTextMessage(int id, int component, int severity, QString text)
{
Q_UNUSED(severity);
if (isVisible())
{
QString name = UASManager::instance()->getUASForId(id)->getUASName();
QString comp;
// Get a human readable name if possible
@ -269,8 +271,8 @@ void DebugConsole::receiveTextMessage(int id, int component, int severity, QStri @@ -269,8 +271,8 @@ void DebugConsole::receiveTextMessage(int id, int component, int severity, QStri
case MAV_COMP_ID_WAYPOINTPLANNER:
comp = tr("WP-PLANNER");
break;
case MAV_COMP_ID_AIRSLAM:
comp = tr("AIRSLAM");
case MAV_COMP_ID_SYSTEM_CONTROL:
comp = tr("SYS-CONTROL");
break;
default:
comp = QString::number(component);
@ -278,7 +280,7 @@ void DebugConsole::receiveTextMessage(int id, int component, int severity, QStri @@ -278,7 +280,7 @@ void DebugConsole::receiveTextMessage(int id, int component, int severity, QStri
}
m_ui->receiveText->appendHtml(QString("<font color=\"%1\">(%2:%3) %4</font>\n").arg(UASManager::instance()->getUASForId(id)->getColor().name(), name, comp, text));
//m_ui->receiveText->appendPlainText("");
}
}
void DebugConsole::updateTrafficMeasurements()
@ -431,11 +433,13 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes) @@ -431,11 +433,13 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
}
}
if (lineBuffer.length() > 0)
if (lineBuffer.length() > 0) {
if (isVisible())
{
m_ui->receiveText->insertPlainText(lineBuffer);
// Ensure text area scrolls correctly
m_ui->receiveText->ensureCursorVisible();
}
lineBuffer.clear();
}
}

2
src/ui/uas/UASInfoWidget.h

@ -95,7 +95,7 @@ protected: @@ -95,7 +95,7 @@ protected:
QString name;
quint64 startTime;
QMap<QString, int> errors;
static const int updateInterval = 200; ///< Refresh interval in milliseconds
static const int updateInterval = 800; ///< Refresh interval in milliseconds
void showEvent(QShowEvent* event);
void hideEvent(QHideEvent* event);

Loading…
Cancel
Save