mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
simulators
add warnings
This commit is contained in:
@@ -30,10 +30,12 @@ void Simulators::run()
|
|||||||
{
|
{
|
||||||
if (this->m_simulators.empty())
|
if (this->m_simulators.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("no simulators found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this->m_current_simulator.empty())
|
if (this->m_current_simulator.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("no active simulator");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,10 +47,12 @@ void Simulators::stop()
|
|||||||
{
|
{
|
||||||
if (this->m_simulators.empty())
|
if (this->m_simulators.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("no simulators found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this->m_current_simulator.empty())
|
if (this->m_current_simulator.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("no active simulator");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,15 +63,18 @@ void Simulators::switch_simulator(std::string name)
|
|||||||
{
|
{
|
||||||
if (this->m_simulators.empty())
|
if (this->m_simulators.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("no simulators found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this->m_current_simulator.empty())
|
if (!this->m_current_simulator.empty())
|
||||||
{
|
{
|
||||||
|
spdlog::info("stopping current simulator {} and switching to {}", m_current_simulator, name);
|
||||||
this->m_simulators.at(m_current_simulator)->stop();
|
this->m_simulators.at(m_current_simulator)->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_simulators.find(name) == this->m_simulators.end())
|
if (this->m_simulators.find(name) == this->m_simulators.end())
|
||||||
{
|
{
|
||||||
|
spdlog::warn("simulator {} not found", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user