Merge GUI updates into macOS branch
# Conflicts: # src/GlobeWidget.cpp # src/GlobeWidget.h # src/MainWindow.h # src/MapWidget.cpp # src/MapWidget.h # src/RinexNavigation.cpp
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "../src/MainWindow.h"
|
||||
#include "../src/GlobeWidget.h"
|
||||
#include "../src/MapWidget.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -54,6 +55,8 @@ int main(int argc, char **argv)
|
||||
auto *showRecentPoints = window.findChild<QCheckBox *>(QStringLiteral("showRecentPointsCheck"));
|
||||
auto *showAverage = window.findChild<QCheckBox *>(QStringLiteral("showAverageCheck"));
|
||||
auto *portSelector = window.findChild<QComboBox *>(QStringLiteral("portSelector"));
|
||||
auto *refreshRinexButton =
|
||||
window.findChild<QPushButton *>(QStringLiteral("refreshRinexButton"));
|
||||
auto *map = window.findChild<MapWidget *>();
|
||||
auto *mainViewTabs = window.findChild<QTabWidget *>(QStringLiteral("mainViewTabs"));
|
||||
auto *sideSplitter = window.findChild<QSplitter *>(QStringLiteral("sideSplitter"));
|
||||
@@ -76,6 +79,9 @@ int main(int argc, char **argv)
|
||||
assert(showRecentPoints != nullptr);
|
||||
assert(showAverage != nullptr);
|
||||
assert(portSelector != nullptr);
|
||||
assert(refreshRinexButton != nullptr);
|
||||
assert(refreshRinexButton->text() == QStringLiteral("RINEX Guncelle")
|
||||
|| refreshRinexButton->text() == QStringLiteral("RINEX indiriliyor..."));
|
||||
assert(portSelector->isEditable());
|
||||
assert(portSelector->count() >= 1);
|
||||
assert(portSelector->currentText() == QStringLiteral("/dev/test-usb-uart"));
|
||||
@@ -115,6 +121,15 @@ int main(int argc, char **argv)
|
||||
assert(std::abs(map->centerCoordinate().y() - 29.5) < 0.000001);
|
||||
map->clearPoints();
|
||||
|
||||
sendLine(window, QStringLiteral("[TRK] tracked satellites=2 prns=[3,8]"));
|
||||
assert(map != nullptr);
|
||||
auto *globe = window.findChild<GlobeWidget *>();
|
||||
assert(globe != nullptr);
|
||||
assert(globe->observedPrns()
|
||||
== QSet<QString>({QStringLiteral("G03"), QStringLiteral("G08")}));
|
||||
sendLine(window, QStringLiteral("[TRK] tracked satellites=1 prns=[14]"));
|
||||
assert(globe->observedPrns() == QSet<QString>({QStringLiteral("G14")}));
|
||||
|
||||
assert(QMetaObject::invokeMethod(map, "referenceLocationSelected", Qt::DirectConnection,
|
||||
Q_ARG(double, 40.25), Q_ARG(double, 29.5)));
|
||||
assert(referenceLatInput->text() == QStringLiteral("40.250000000000000"));
|
||||
@@ -236,6 +251,27 @@ int main(int argc, char **argv)
|
||||
assert(QMetaObject::invokeMethod(&window, "clearPoints", Qt::DirectConnection));
|
||||
maxPointsInput->setValue(10);
|
||||
|
||||
{
|
||||
MapWidget followMap;
|
||||
TelemetryPoint corrected;
|
||||
corrected.source = LocationSource::ImuCorrected;
|
||||
corrected.latitude = 40.1;
|
||||
corrected.longitude = 29.1;
|
||||
corrected.receivedAt = QDateTime::currentDateTimeUtc();
|
||||
|
||||
TelemetryPoint rawGps;
|
||||
rawGps.source = LocationSource::Gps;
|
||||
rawGps.latitude = 41.0;
|
||||
rawGps.longitude = 30.0;
|
||||
rawGps.receivedAt = corrected.receivedAt.addMSecs(100);
|
||||
followMap.setPoints({corrected, rawGps});
|
||||
assert(followMap.centerCoordinate() == QPointF(40.1, 29.1));
|
||||
|
||||
rawGps.receivedAt = corrected.receivedAt.addMSecs(1100);
|
||||
followMap.setPoints({corrected, rawGps});
|
||||
assert(followMap.centerCoordinate() == QPointF(41.0, 30.0));
|
||||
}
|
||||
|
||||
const QByteArray screenshotPath = qgetenv("LOCATION_PLOTTER_TEST_SCREENSHOT");
|
||||
if (!screenshotPath.isEmpty()) {
|
||||
sendLine(window, QStringLiteral("NAV solve start sats:5"));
|
||||
|
||||
Reference in New Issue
Block a user