Skip to content

Commit

Permalink
Now the default scenario values are passed through to the agent
Browse files Browse the repository at this point in the history
Issue #163
  • Loading branch information
damies13 committed Aug 18, 2023
1 parent acd93d8 commit 53b784f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rfswarm_manager/rfswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ class RFSwarmBase:

save_ini = True

excludelibrariesdefault = "String,OperatingSystem,perftest"
# https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_manager.md#exclude-libraries
# default (BuiltIn,String,OperatingSystem,perftest)
excludelibrariesdefault = "BuiltIn,String,OperatingSystem,perftest"

scriptcount = 0
scriptlist: Any = [{}]
Expand Down Expand Up @@ -2979,9 +2981,17 @@ def run_start_threads(self):

if "excludelibraries" in grp:
base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = grp["excludelibraries"]
else:
if "excludelibraries" in base.scriptdefaults:
base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = base.scriptdefaults["excludelibraries"]
else:
base.robot_schedule["Agents"][nxtagent][grurid]["excludelibraries"] = base.excludelibrariesdefault

if "robotoptions" in grp:
base.robot_schedule["Agents"][nxtagent][grurid]["robotoptions"] = grp["robotoptions"]
else:
if "robotoptions" in base.scriptdefaults:
base.robot_schedule["Agents"][nxtagent][grurid]["robotoptions"] = base.scriptdefaults["robotoptions"]

base.Agents[nxtagent]["AssignedRobots"] += 1
base.debugmsg(5, "base.Agents[", nxtagent, "][AssignedRobots]:", base.Agents[nxtagent]["AssignedRobots"])
Expand Down

0 comments on commit 53b784f

Please sign in to comment.