mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/zep_dispatch: topogen: place first node at origin
This commit is contained in:
parent
b85b7937c3
commit
2e19c2d712
6
dist/tools/zep_dispatch/topogen.c
vendored
6
dist/tools/zep_dispatch/topogen.c
vendored
@ -113,6 +113,12 @@ static void world_gen(struct world *w, unsigned num_nodes,
|
||||
node_generate(&w->nodes[i], w, random_range(range - var, range + var), i);
|
||||
node_name(&w->nodes[i], i);
|
||||
}
|
||||
|
||||
if (!w->grid) {
|
||||
/* place first node at origin */
|
||||
w->nodes[0].x = 0;
|
||||
w->nodes[0].y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned _color(const struct node *n, unsigned base)
|
||||
|
Loading…
Reference in New Issue
Block a user