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

Telemetry Packet Extraction #80

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Telemetry Packet Extraction #80

merged 5 commits into from
Sep 27, 2024

Conversation

JackCotter
Copy link
Contributor

Telemetry now extracts all info from packets including:

  1. Callsign
  2. Altitude
  3. Latitude
  4. Longitude

@JackCotter
Copy link
Contributor Author

This code currently has a bug where the rust server will send 2 packets back to back very quickly. This is because the front end is making 2 connections. This should be fixed in the Rocket Monitoring Refactor PR (#76).

@JackCotter JackCotter requested a review from klemie June 18, 2024 06:34
@JackCotter JackCotter marked this pull request as ready for review June 18, 2024 06:35
if (int_bytes_read > 0) {
buffer.extend_from_slice(&readbuf[..value]);
// Check for two successive newlines
if let Some(pos) = buffer.windows(2).position(|window| window == b"\n\n") {
Copy link
Owner

Choose a reason for hiding this comment

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

when I run the code it couldn't find two consecutive new lines. We should test this with the brb on Thursday

I did this before the if statement and it worked fine with the mock data

 extract_packets(Arc::clone(&state_ref), buffer.clone()).await;
 buffer.clear();

Copy link
Owner

Choose a reason for hiding this comment

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

@JackCotter Could we add a Locked attribute to the packet so we can more easily tell on the frontend if we've got a lock or not

@klemie klemie requested a review from PokeyOne June 21, 2024 04:14
@klemie
Copy link
Owner

klemie commented Jun 21, 2024

@PokeyOne Can you test this in your environment. WSL couldn't pick up \n in the packets for some reason, wondering if mac can. Might need to find a better bay detect locked packets.

@klemie klemie merged commit 3d1f5d4 into main Sep 27, 2024
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