Add source-aware UART log replay
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:
Onur Cayan
2026-08-12 13:54:11 +03:00
parent 9ced0da0b2
commit 498757b502
11 changed files with 712 additions and 3 deletions
+17
View File
@@ -18,12 +18,15 @@ class QPushButton;
class QSpinBox;
class QTableView;
class QTimer;
class QCloseEvent;
class QFile;
class MapWidget;
class GlobeWidget;
class RinexNavigation;
class SerialReader;
class TelemetryTableModel;
class UartReplay;
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -31,6 +34,11 @@ class MainWindow : public QMainWindow {
public:
explicit MainWindow(QWidget *parent = nullptr);
bool loadTelemetryLog(const QString &filePath);
bool startUartReplay(const QString &filePath, int gpsIntervalMs = 200,
int sensorIntervalMs = 50);
protected:
void closeEvent(QCloseEvent *event) override;
private slots:
void toggleSerial();
@@ -43,7 +51,11 @@ private slots:
void updateReferenceLocation();
void flushUiUpdates();
void openTelemetryLog();
void openUartReplay();
void stopUartReplay();
void refreshSerialPorts();
bool startUartLogging(const QString &port, int baudRate);
void stopUartLogging();
private:
void buildUi();
@@ -60,9 +72,11 @@ private:
void scheduleTelemetryRefresh();
void refreshTelemetryViews();
void flushPendingLogLines();
void appendUartLogLine(const QString &line);
int selectedBaudRate() const;
SerialReader *m_serial = nullptr;
UartReplay *m_replay = nullptr;
MapWidget *m_map = nullptr;
GlobeWidget *m_globe = nullptr;
RinexNavigation *m_rinex = nullptr;
@@ -74,6 +88,7 @@ private:
QPushButton *m_connectButton = nullptr;
QPushButton *m_clearButton = nullptr;
QPushButton *m_openLogButton = nullptr;
QPushButton *m_replayButton = nullptr;
QPushButton *m_refreshRinexButton = nullptr;
QCheckBox *m_autoFollowCheck = nullptr;
QCheckBox *m_showTelemetryCheck = nullptr;
@@ -98,6 +113,8 @@ private:
QPlainTextEdit *m_log = nullptr;
QTimer *m_locationTimeoutTimer = nullptr;
QTimer *m_uiRefreshTimer = nullptr;
QFile *m_uartLogFile = nullptr;
QString m_uartLogPath;
QVector<TelemetryPoint> m_points;
QStringList m_pendingLogLines;