Browse Source

Disabled firebug, fixed beachballing in Debug console

QGC4.4
Lorenz Meier 13 years ago
parent
commit
6390b27195
  1. 2
      files/images/earth.html
  2. 12
      src/ui/DebugConsole.cc
  3. 1
      src/ui/DebugConsole.h

2
files/images/earth.html

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<!-- QGroundControl -->
<title>QGroundControl Google Earth View</title>
<!-- *** Replace the key below below with your own API key, available at http://code.google.com/apis/maps/signup.html *** -->
<script type="text/javascript" src="https://getfirebug.com/firebug-lite-beta.js"></script>
<!--<script type="text/javascript" src="https://getfirebug.com/firebug-lite-beta.js"></script>-->
<script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAA5Q6wxQ6lxKS8haLVdUJaqhSjosg_0jiTTs2iXtkDVG0n0If1mBRHzhWw5VqBZX-j4NuzoVpU-UaHVg"></script>
<script type="text/javascript">
google.load("earth", "1", { 'language': 'en'});

12
src/ui/DebugConsole.cc

@ -52,6 +52,7 @@ DebugConsole::DebugConsole(QWidget *parent) : @@ -52,6 +52,7 @@ DebugConsole::DebugConsole(QWidget *parent) :
sentBytes(),
holdBuffer(),
lineBuffer(""),
lastLineBuffer(0),
lineBufferTimer(),
snapShotTimer(),
snapShotInterval(500),
@ -489,14 +490,19 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes) @@ -489,14 +490,19 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
}
}
if (lineBuffer.length() > 0) {
if (lineBuffer.length() > 0 && (QGC::groundTimeMilliseconds() - lastLineBuffer) > 200) {
if (isVisible())
{
m_ui->receiveText->insertPlainText(lineBuffer);
m_ui->receiveText->appendPlainText(lineBuffer);
lineBuffer.clear();
lastLineBuffer = QGC::groundTimeMilliseconds();
// Ensure text area scrolls correctly
m_ui->receiveText->ensureCursorVisible();
}
lineBuffer.clear();
if (lineBuffer.size() > 8192)
{
lineBuffer.remove(0, 4096);
}
}
}
else if (link == currLink && holdOn)

1
src/ui/DebugConsole.h

@ -128,6 +128,7 @@ protected: @@ -128,6 +128,7 @@ protected:
QList<QString> sentBytes; ///< Transmitted bytes, per transmission
QByteArray holdBuffer; ///< Buffer where bytes are stored during hold-enable
QString lineBuffer; ///< Buffere where bytes are stored before writing them out
quint64 lastLineBuffer; ///< Last line buffer emission time
QTimer lineBufferTimer; ///< Line buffer timer
QTimer snapShotTimer; ///< Timer for measuring traffic snapshots
int snapShotInterval; ///< Snapshot interval for traffic measurements

Loading…
Cancel
Save