From 378b6e58d4cb0e9873062cfabefa271e43794bd6 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Fri, 23 Mar 2018 16:19:22 +0000 Subject: Broadcast lighthouse position at startup --- src/survive.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/survive.c b/src/survive.c index 3f3b844..1786d45 100644 --- a/src/survive.c +++ b/src/survive.c @@ -294,6 +294,13 @@ int survive_startup(SurviveContext *ctx) { } } + // If lighthouse positions are known, broadcast them + for (int i = 0; i < ctx->activeLighthouses; i++) { + if(ctx->bsd[i].PositionSet) { + ctx->lighthouseposeproc(ctx, i, &ctx->bsd[i].Pose, 0); + } + } + return 0; } -- cgit v1.2.3