mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
server
Renames the `run` method to `start` in the simulator classes.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<std::string> Simulators::list_simulators() const
|
||||
|
||||
@@ -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<std::string> list_simulators() const;
|
||||
|
||||
Reference in New Issue
Block a user