-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: radio_modes
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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.