Add source-aware UART log replay
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user