Skip to content

Commit

Permalink
Control logging of data during simulation from HCOM
Browse files Browse the repository at this point in the history
  • Loading branch information
robbr48 committed May 14, 2024
1 parent 7666888 commit 32bcb46
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions HopsanGUI/HcomHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4133,6 +4133,14 @@ void HcomHandler::executeSetCommand(const QString cmd)
}
getConfigPtr()->setIntegerSetting(cfg::progressbarstep, mAnsScalar);
}
else if(pref == "logduringsimulation")
{
if(value != "on" && value != "off")
{
HCOMERR("Unknown value.");
}
getConfigPtr()->setBoolSetting(cfg::logduringsimulation, value=="on");
}
else
{
HCOMERR("Unknown command.");
Expand Down Expand Up @@ -4267,6 +4275,15 @@ void HcomHandler::executeGetCommand(const QString cmd)
output.append(QString::number(getConfigPtr()->getIntegerSetting(cfg::progressbarstep))+"");
HCOMPRINT(output);
}
if(all || pref == "logduringsimulation")
{
QString output = "Collect log data during simulation: ";
if(getConfigPtr()->getBoolSetting(cfg::logduringsimulation))
output.append("ON");
else
output.append("OFF");
HCOMPRINT(output);
}
}


Expand Down

0 comments on commit 32bcb46

Please sign in to comment.