Commit 6095eb48 authored by Timothy Stack's avatar Timothy Stack

Use node_startloc table to figure out where robots are physically

located initially, instead of using location_info for current location
and initial.

	* tbsetup/ptopgen.in: When adding features for nodes attached to a
	building (e.g. robots), pull the building names from node_startloc
	instead of location_info.  This change lets the robots exist in
	two different areas.

	* tbsetup/ns2ir/parse-ns.in: Pull building names from
	node_startloc instead of location_info.
parent bcfa8a85
......@@ -427,7 +427,7 @@ sub GenDefsFile($)
print TCL "# Robot areas\n";
$query_result =
DBQueryFatal("select distinct building from location_info");
DBQueryFatal("select distinct building from node_startloc");
while (my ($building,$floor) = $query_result->fetchrow_array()) {
print TCL "set areas($building) 1\n";
}
......
......@@ -160,10 +160,10 @@ while (($class,$type,$delaycapacity,
$permissions{$type} = 1;
}
# Read location_info
$result = DBQueryFatal("select node_id,building from location_info");
# Read node_startloc
$result = DBQueryFatal("select node_id,building from node_startloc");
while (($node,$building) = $result->fetchrow_array) {
$areamap{$node} = "area-$building";
$areamap{$node} .= " area-$building:0";
}
#
......@@ -427,7 +427,7 @@ foreach $node (keys(%nodes)) {
}
if (defined($areamap{$node})) {
push @features, $areamap{$node} . ":0";
push @features, $areamap{$node};
}
my $cpu_ram_features_present = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment