Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/zep_dispatch: enhancements and fixes #19996

Merged
merged 12 commits into from
Jan 4, 2024
Prev Previous commit
Next Next commit
tools/zep_dispatch: topogen: place first node at origin
  • Loading branch information
benpicco committed Dec 21, 2023
commit 2e19c2d71238e6f38bd56c3ddaf08a384aa2e2b8
6 changes: 6 additions & 0 deletions dist/tools/zep_dispatch/topogen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down