Commit f7de2f03 authored by Lorenz Meier's avatar Lorenz Meier

Line chart widget: Auto-force ground time if offset is more than 3 seconds...

Line chart widget: Auto-force ground time if offset is more than 3 seconds (30% of default view width)
parent 96f44416
...@@ -351,11 +351,15 @@ void LinechartWidget::appendData(int uasId, const QString& curve, const QString& ...@@ -351,11 +351,15 @@ void LinechartWidget::appendData(int uasId, const QString& curve, const QString&
{ {
lastTimestamp = usec; lastTimestamp = usec;
} else if (usec != 0) { } else if (usec != 0) {
// Difference larger than 5 secs, enforce ground time // Difference larger than 3 secs, enforce ground time
if (((qint64)usec - (qint64)lastTimestamp) > 5000) if (((qint64)usec - (qint64)lastTimestamp) > 3000)
{ {
autoGroundTimeSet = true; autoGroundTimeSet = true;
if (activePlot) activePlot->groundTime(); // Tick ground time checkbox, but avoid state switching
timeButton->blockSignals(true);
timeButton->setChecked(true);
timeButton->blockSignals(false);
if (activePlot) activePlot->enforceGroundTime(true);
} }
} }
......
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