mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Lint
This commit is contained in:
@@ -16,7 +16,7 @@ Simulators::Simulators(uint16_t port, QString can_dev, QString uart_dev, QObject
|
|||||||
{
|
{
|
||||||
m_server->moveToThread(m_server_thread);
|
m_server->moveToThread(m_server_thread);
|
||||||
m_server_thread->start();
|
m_server_thread->start();
|
||||||
//TODO: Cleanup this code and make it possible to add multiple com devices
|
// TODO: Cleanup this code and make it possible to add multiple com devices
|
||||||
if (!can_dev.isEmpty())
|
if (!can_dev.isEmpty())
|
||||||
{
|
{
|
||||||
m_can_wrapper->connect_to_dev(can_dev);
|
m_can_wrapper->connect_to_dev(can_dev);
|
||||||
@@ -133,13 +133,16 @@ void Simulators::switch_simulator(std::string name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->m_current_simulator = name;
|
this->m_current_simulator = name;
|
||||||
connect(m_simulators.at(m_current_simulator).get(), &Simulator_base::sim_changed, this,
|
connect(
|
||||||
|
m_simulators.at(m_current_simulator).get(), &Simulator_base::sim_changed, this,
|
||||||
[this] {
|
[this] {
|
||||||
auto json = changed_UI_items();
|
auto json = changed_UI_items();
|
||||||
if (!json.empty()) {
|
if (!json.empty())
|
||||||
|
{
|
||||||
m_server->broadcast(QString::fromStdString(json.dump()));
|
m_server->broadcast(QString::fromStdString(json.dump()));
|
||||||
}
|
}
|
||||||
}, Qt::QueuedConnection);
|
},
|
||||||
|
Qt::QueuedConnection);
|
||||||
this->start();
|
this->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user