Commit 6390b271 authored by Lorenz Meier's avatar Lorenz Meier

Disabled firebug, fixed beachballing in Debug console

parent 106ffa74
......@@ -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'});
......
......@@ -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)
}
}
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)
......
......@@ -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
......
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