diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:35:26 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-08-09 17:35:26 +0300 |
| commit | 489beadf61d05f40dd4ac40e4e5290502f7ad078 (patch) | |
| tree | 58241d94c3376aae6b081c6fe16288aa0f4d8593 /src/mesh/node3d.c | |
| parent | 1853f5d6594bc371e4d8e631c24acd011a620915 (diff) | |
| download | gran-489beadf61d05f40dd4ac40e4e5290502f7ad078.tar.gz gran-489beadf61d05f40dd4ac40e4e5290502f7ad078.zip | |
format
Diffstat (limited to 'src/mesh/node3d.c')
| -rw-r--r-- | src/mesh/node3d.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesh/node3d.c b/src/mesh/node3d.c index 8c6d776..5bd6ee9 100644 --- a/src/mesh/node3d.c +++ b/src/mesh/node3d.c @@ -112,7 +112,8 @@ static bool elem_sel(struct reg *r, void *data) uint8_t x = 0, y = 0, z = 0, elem = 0; struct sel_helper *helper = data; addr_mesh3d(r->pkt.to, &x, &y, &z, &elem, NULL); - return x == helper->x && y == helper->y && z == helper->z && elem == helper->elem; + return x == helper->x && y == helper->y && z == helper->z && + elem == helper->elem; } static stat node3d_clock(struct node3d *n) @@ -163,7 +164,7 @@ static stat node3d_clock(struct node3d *n) propagate(&down_out(n), 6, down, down_sel, &helper); struct reg *all[] = {r, &north_in(n), &east_in(n), &south_in(n), - &west_in(n), &up_in(n), &down_in(n)}; + &west_in(n), &up_in(n), &down_in(n)}; for (int i = 0; i < n->elems; ++i) { helper.elem = i; @@ -190,7 +191,8 @@ static stat node3d_receive(struct node3d *n, struct component *from, return OK; } -struct component *create_mesh_node3d(uint8_t x, uint8_t y, uint8_t z, uint8_t elems) +struct component *create_mesh_node3d(uint8_t x, uint8_t y, uint8_t z, + uint8_t elems) { struct node3d *n = calloc(1, sizeof(struct node3d)); if (!n) @@ -225,7 +227,7 @@ struct component *create_mesh_node3d(uint8_t x, uint8_t y, uint8_t z, uint8_t el } stat mesh_node3d_connect(struct component *c, struct component *e, - uint8_t elem) + uint8_t elem) { struct node3d *n = (struct node3d *)c; if (elem >= n->elems) |
