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

Requesting Images for radio modes #7

Open
wants to merge 2 commits into
base: radio_modes
Choose a base branch
from

Conversation

akollgaa
Copy link

@akollgaa akollgaa commented Feb 3, 2024

A version of radio_modes branch for the ground station that now has the ability to request images from the satellite. Based on the a mix of the image requesting implementation from both the image_loop and implementing_LoRa branches.

The ground station is now able to store more than one image based on the time stamp found in gs_commands.py. I considered having it search through local files to find the most recent file however I felt opposed to that idea and included an additional variable that essentially keeps track of the file path.

@akollgaa akollgaa requested a review from tomyyyD February 3, 2024 02:55
@akollgaa akollgaa requested a review from thetazero February 20, 2024 14:19
Copy link
Member

@thetazero thetazero left a comment

Choose a reason for hiding this comment

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

Looks solid, I think it should work (you should still test this).

Noticed two small details I was confused about.

}

# SIG = bytearray.fromhex("FF")
SIG = bytearray(1)
Copy link
Member

Choose a reason for hiding this comment

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

what is SIG/SOS/EOI?

Copy link

Choose a reason for hiding this comment

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

These are specific bytes in the JPEG file format. All JPEG's start and end with the same bytes

Messages must support the `__lt__`, `__le__`, `__eq__`, `__ge__`, and `__gt__` operators.
This enables to the max heap to compare messages based on their priority.
"""
from .queue import Queue
Copy link
Member

Choose a reason for hiding this comment

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

you definitely just coppied this from the other queue, but this is probably a bad idea to add all this boiler plate just to make a slightly easier import.

At least on the pycubed-mini side we started having memory issues and stuff like this doesn't help.

Not at all your fault given this is how it's done else where. I'd either just make it the three lines needed ie:

from .queue import Queue
limit = 100
image_queue = Queue(limit)

Or leave a issue somewhere to do this later (so we don't forget).

Copy link

Choose a reason for hiding this comment

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

I agree with Losha here, We could make this a much smaller file.

Copy link

@tomyyyD tomyyyD left a comment

Choose a reason for hiding this comment

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

The more I read through this code, the more I realize that I left it in a 3/4 finished state over the summer. I'd like to go over some of this with you tmrw at the lab.

}

# SIG = bytearray.fromhex("FF")
SIG = bytearray(1)
Copy link

Choose a reason for hiding this comment

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

These are specific bytes in the JPEG file format. All JPEG's start and end with the same bytes

Messages must support the `__lt__`, `__le__`, `__eq__`, `__ge__`, and `__gt__` operators.
This enables to the max heap to compare messages based on their priority.
"""
from .queue import Queue
Copy link

Choose a reason for hiding this comment

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

I agree with Losha here, We could make this a much smaller file.

@@ -117,6 +117,21 @@ async def request_beacon(radio, debug=False):
else:
return False, None

async def request_image(radio, debug=False):
# Notice: response is never used
Copy link

Choose a reason for hiding this comment

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

Response is used within the send_command function.

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.

3 participants