From 03e904d567aa4e83f110e9fed720b72b57961797 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Sun, 22 Dec 2013 15:16:18 -0800 Subject: [PATCH] Moved configuration constants in DebugConsole to proper static const types. --- src/ui/DebugConsole.cc | 5 ----- src/ui/DebugConsole.h | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ui/DebugConsole.cc b/src/ui/DebugConsole.cc index 86bd96b..b687e99 100644 --- a/src/ui/DebugConsole.cc +++ b/src/ui/DebugConsole.cc @@ -40,9 +40,6 @@ This file is part of the QGROUNDCONTROL project #include "protocol.h" #include "QGC.h" -// Set the snapshot interval to 500ms. -#define DEBUGCONSOLE_SNAPSHOT_INTERVAL 500 - DebugConsole::DebugConsole(QWidget *parent) : QWidget(parent), currLink(NULL), @@ -60,9 +57,7 @@ DebugConsole::DebugConsole(QWidget *parent) : lastLineBuffer(0), lineBufferTimer(), snapShotTimer(), - snapShotInterval(DEBUGCONSOLE_SNAPSHOT_INTERVAL), lowpassInDataRate(0.0f), - inDataRateThreshold(0.4), lowpassOutDataRate(0.0f), commandIndex(0), m_ui(new Ui::DebugConsole) diff --git a/src/ui/DebugConsole.h b/src/ui/DebugConsole.h index 611e016..4d9dd64 100644 --- a/src/ui/DebugConsole.h +++ b/src/ui/DebugConsole.h @@ -137,9 +137,9 @@ protected: quint64 lastLineBuffer; ///< Last line buffer emission time QTimer lineBufferTimer; ///< Line buffer timer QTimer snapShotTimer; ///< Timer for measuring traffic snapshots - int snapShotInterval; ///< Set the time between UI updates for the data rate (ms) + static const int snapShotInterval = 500; ///< Set the time between UI updates for the data rate (ms) float lowpassInDataRate; ///< Lowpass filtered data rate (kilobytes/s) - float inDataRateThreshold; ///< Threshold where to enable auto-hold (kilobytes/s) + static const float inDataRateThreshold = 0.4; ///< Threshold where to enable auto-hold (kilobytes/s) float lowpassOutDataRate; ///< Low-pass filtered outgoing data rate (kilobytes/s) QStringList commandHistory; QString currCommand;