1
0
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:
Benjamin Valentin 2023-10-07 16:07:43 +02:00
parent b85b7937c3
commit 2e19c2d712

View File

@ -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)