From 326a6361229b0fb8f8d668d61d63a26fa0cea5fa Mon Sep 17 00:00:00 2001 From: Sander Speetjens Date: Mon, 20 Oct 2025 19:58:57 +0200 Subject: [PATCH] server Renames the `run` method to `start` in the simulator classes. --- server/simulator_base.cpp | 2 +- server/simulator_base.hpp | 4 ++-- server/simulators.cpp | 6 +++--- server/simulators.hpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/simulator_base.cpp b/server/simulator_base.cpp index 984e621..81fbd3b 100644 --- a/server/simulator_base.cpp +++ b/server/simulator_base.cpp @@ -46,7 +46,7 @@ UI_item *Simulator_base::get_UI_item(size_t id) const return nullptr; } -void Simulator_base::run() +void Simulator_base::start() { // Start the timer m_timer->start(m_interval); diff --git a/server/simulator_base.hpp b/server/simulator_base.hpp index 7584d56..3506d7c 100644 --- a/server/simulator_base.hpp +++ b/server/simulator_base.hpp @@ -91,9 +91,9 @@ class Simulator_base : public QObject } /** - * @brief Run the simulator + * @brief Start the simulator */ - void run(); + void start(); /** * @brief Stop the simulator diff --git a/server/simulators.cpp b/server/simulators.cpp index 8f22101..4a504c3 100644 --- a/server/simulators.cpp +++ b/server/simulators.cpp @@ -78,7 +78,7 @@ std::string Simulators::active_simulator_name() const return this->m_current_simulator; } -void Simulators::run() +void Simulators::start() { if (this->m_simulators.empty()) { @@ -92,7 +92,7 @@ void Simulators::run() } m_before = this->m_simulators.at(m_current_simulator)->get_UI_items(); - this->m_simulators.at(m_current_simulator)->run(); + this->m_simulators.at(m_current_simulator)->start(); } void Simulators::stop() @@ -139,7 +139,7 @@ void Simulators::switch_simulator(std::string name) m_server->broadcast(QString::fromStdString(json.dump())); } }, Qt::QueuedConnection); - this->run(); + this->start(); } std::vector Simulators::list_simulators() const diff --git a/server/simulators.hpp b/server/simulators.hpp index 99939fb..283c2f0 100644 --- a/server/simulators.hpp +++ b/server/simulators.hpp @@ -48,7 +48,7 @@ class Simulators : public QObject Simulators(uint16_t port, QString can_dev, QString uart_dev, QObject *parent = nullptr); ~Simulators(); std::string active_simulator_name() const; - void run(); + void start(); void stop(); void switch_simulator(std::string name); std::vector list_simulators() const;