Updated route controller to go through every response from the server to avoid missing a key item
This commit is contained in:
parent
9e00882743
commit
f0da93cdae
@ -134,13 +134,14 @@ namespace EFB.Controllers
|
|||||||
|
|
||||||
ResponseModel<List<PollResponse>> responsePoll = await pollingRequest;
|
ResponseModel<List<PollResponse>> responsePoll = await pollingRequest;
|
||||||
|
|
||||||
|
foreach (var item in responsePoll.Result)
|
||||||
int routePos = responsePoll.Result.Count - 1;
|
|
||||||
if (responsePoll.Result[routePos].Command == "solution")
|
|
||||||
{
|
{
|
||||||
collected = true;
|
if (item.Command == "fpl" || item.Command == "solution")
|
||||||
routeString = responsePoll.Result[routePos].FlightPlan;
|
{
|
||||||
break;
|
collected = true;
|
||||||
|
routeString = item.FlightPlan;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.Sleep(3000);
|
Thread.Sleep(3000);
|
||||||
|
Loading…
Reference in New Issue
Block a user