Commit 9884f6db authored by LM's avatar LM

Working on plot speed improvements

parent e62dd21c
...@@ -56,7 +56,6 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -56,7 +56,6 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
// FIXME Kind of a hack to load data from disk // FIXME Kind of a hack to load data from disk
mavlink_image_triggered_t img; mavlink_image_triggered_t img;
mavlink_msg_image_triggered_decode(&message, &img); mavlink_msg_image_triggered_decode(&message, &img);
qDebug() << "IMAGE AVAILABLE:" << img.timestamp;
emit imageStarted(img.timestamp); emit imageStarted(img.timestamp);
} }
break; break;
......
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
static const int SCALE_BEST_FIT = 1; static const int SCALE_BEST_FIT = 1;
static const int SCALE_LOGARITHMIC = 2; static const int SCALE_LOGARITHMIC = 2;
static const int DEFAULT_REFRESH_RATE = 50; ///< The default refresh rate is 25 Hz / every 100 ms static const int DEFAULT_REFRESH_RATE = 100; ///< The default refresh rate is 10 Hz / every 100 ms
static const int DEFAULT_PLOT_INTERVAL = 1000 * 8; ///< The default plot interval is 15 seconds static const int DEFAULT_PLOT_INTERVAL = 1000 * 8; ///< The default plot interval is 15 seconds
static const int DEFAULT_SCALE_INTERVAL = 1000 * 8; static const int DEFAULT_SCALE_INTERVAL = 1000 * 8;
......
...@@ -142,7 +142,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent ...@@ -142,7 +142,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent
//connect(this, SIGNAL(plotWindowPositionUpdated(int)), scrollbar, SLOT(setValue(int))); //connect(this, SIGNAL(plotWindowPositionUpdated(int)), scrollbar, SLOT(setValue(int)));
//connect(scrollbar, SIGNAL(sliderMoved(int)), this, SLOT(setPlotWindowPosition(int))); //connect(scrollbar, SIGNAL(sliderMoved(int)), this, SLOT(setPlotWindowPosition(int)));
updateTimer->setInterval(300); updateTimer->setInterval(updateInterval);
connect(updateTimer, SIGNAL(timeout()), this, SLOT(refresh())); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refresh()));
readSettings(); readSettings();
} }
...@@ -376,6 +376,7 @@ void LinechartWidget::appendData(int uasId, const QString& curve, const QString& ...@@ -376,6 +376,7 @@ void LinechartWidget::appendData(int uasId, const QString& curve, const QString&
void LinechartWidget::refresh() void LinechartWidget::refresh()
{ {
setUpdatesEnabled(false);
QString str; QString str;
// Value // Value
QMap<QString, QLabel*>::iterator i; QMap<QString, QLabel*>::iterator i;
...@@ -427,6 +428,7 @@ void LinechartWidget::refresh() ...@@ -427,6 +428,7 @@ void LinechartWidget::refresh()
str.sprintf("% 8.3e", activePlot->getVariance(l.key())); str.sprintf("% 8.3e", activePlot->getVariance(l.key()));
l.value()->setText(str); l.value()->setText(str);
} }
setUpdatesEnabled(true);
} }
......
...@@ -150,7 +150,7 @@ protected: ...@@ -150,7 +150,7 @@ protected:
QTimer* updateTimer; QTimer* updateTimer;
LogCompressor* compressor; LogCompressor* compressor;
QCheckBox* selectAllCheckBox; QCheckBox* selectAllCheckBox;
static const int updateInterval = 400; ///< Time between number updates, in milliseconds static const int updateInterval = 1000; ///< Time between number updates, in milliseconds
static const int MAX_CURVE_MENUITEM_NUMBER = 8; static const int MAX_CURVE_MENUITEM_NUMBER = 8;
static const int PAGESTEP_TIME_SCROLLBAR_VALUE = (MAX_TIME_SCROLLBAR_VALUE - MIN_TIME_SCROLLBAR_VALUE) / 10; static const int PAGESTEP_TIME_SCROLLBAR_VALUE = (MAX_TIME_SCROLLBAR_VALUE - MIN_TIME_SCROLLBAR_VALUE) / 10;
......
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