Add macOS USB UART support
Ubuntu build / build-and-test (ubuntu-22.04) (push) Has been cancelled
Ubuntu build / build-and-test (ubuntu-24.04) (push) Has been cancelled

This commit is contained in:
2026-07-18 12:03:38 +03:00
parent 851642296a
commit 049f6301e8
8 changed files with 279 additions and 48 deletions
+5 -2
View File
@@ -37,7 +37,9 @@ void flushUpdates(MainWindow &window)
int main(int argc, char **argv)
{
QApplication app(argc, argv);
qputenv("LOCATION_PLOTTER_PORT", "/dev/test-usb-uart");
MainWindow window;
qunsetenv("LOCATION_PLOTTER_PORT");
auto *table = window.findChild<QTableView *>();
auto *referenceLatInput = window.findChild<QLineEdit *>(QStringLiteral("referenceLatInput"));
@@ -67,10 +69,11 @@ int main(int argc, char **argv)
assert(showRecentPoints != nullptr);
assert(showAverage != nullptr);
assert(portSelector != nullptr);
assert(!portSelector->isEditable());
assert(portSelector->isEditable());
assert(portSelector->count() >= 1);
assert(portSelector->currentText() == QStringLiteral("/dev/test-usb-uart"));
for (int i = 0; i < portSelector->count(); ++i) {
assert(portSelector->itemText(i).startsWith(QStringLiteral("/dev/ttyUSB")));
assert(portSelector->itemText(i).startsWith(QStringLiteral("/dev/")));
assert(!portSelector->itemText(i).trimmed().isEmpty());
}
assert(map != nullptr);