Skip to content

AIRO-1892 Ping command #279

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

Merged
merged 3 commits into from
Apr 22, 2022
Merged

AIRO-1892 Ping command #279

merged 3 commits into from
Apr 22, 2022

Conversation

LaurieCheers-unity
Copy link
Contributor

When we send a "Ping" request to the endpoint, it sends it back, so that we can see roundtrip time.

Comment on lines +750 to +759
{
var pingResponse = JsonUtility.FromJson<SysCommand_PingResponse>(json);
if (m_PingCallbacks.Count > 0)
{
TimeSpan roundTripTime = DateTime.UtcNow - DateTime.Parse(pingResponse.request_time, null, System.Globalization.DateTimeStyles.RoundtripKind);
m_PingCallbacks.ForEach(a => a(roundTripTime));
m_PingCallbacks.Clear();
}
}
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some weird indentation stuff going on here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with it? Looks fine to me...?

@LaurieCheers-unity LaurieCheers-unity merged commit 9991041 into dev Apr 22, 2022
@LaurieCheers-unity LaurieCheers-unity deleted the laurie/PingCommand branch April 22, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants