cmd line args

add args for server host + port
This commit is contained in:
2026-02-01 19:00:08 +01:00
parent 0df9c7b2e9
commit 9345b818ce
3 changed files with 24 additions and 5 deletions
+2 -3
View File
@@ -6,10 +6,10 @@
#include "sim-cvs_i10.h"
#include "sim-test.h"
MainWindow::MainWindow(QWidget *parent) :
MainWindow::MainWindow(QString host, uint16_t port, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
m_web_socket(new Web_socket_wrapper(QUrl("ws://localhost:9002"), this)),
m_web_socket(new Web_socket_wrapper(QUrl("ws://" + host + ":" + QString::number(port)), this)),
m_error_dialog(new NetworkError(this)),
m_sims{{"Can_Debugger", new Can_Debugger(m_web_socket, this)},
{"Scope_Mux_Tester", new Scope_Mux_Tester(m_web_socket, this)},
@@ -20,7 +20,6 @@ MainWindow::MainWindow(QWidget *parent) :
this->setWindowTitle("Simulator Selector");
m_error_dialog->set_error("Connection timed out\nCheck if the server is running");
//Default sim
//defaultSim("CVS_I10");