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

Fix slocum #105

Merged
merged 2 commits into from
Jul 4, 2022
Merged

Fix slocum #105

merged 2 commits into from
Jul 4, 2022

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jul 2, 2022

The new slocum files changed the endianness. This change checks for endianness and then reads the files in w/ the appropriate endinaness..

This needs an example maria_997 to be added to the tests, but I don't have the whole setup yet...

@jklymak jklymak requested a review from hvdosser July 3, 2022 08:49
raise ValueError('Diagnostic header check failed.')

endian = 'be'
data = binaryData.read(f'uint{endian}:16')
_log.debug('Checking endianness %s == 4660 or 13330', data)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think there are actually any different values in the new headers, I think it was just reading them incorrectly. In other words, we don't need the check for 13330.

Copy link
Member Author

Choose a reason for hiding this comment

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

This just lets us check without flipping the bytes...

Copy link
Collaborator

Choose a reason for hiding this comment

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

I just realized that as I was updating the code, it's actually a nice way to do the check. And everything is working! Thanks for making the changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ha, it will all be obsolete in a day or two if we switch to dbdreader...

@hvdosser hvdosser merged commit 8482a18 into c-proof:main Jul 4, 2022
@jklymak jklymak deleted the fix-slocum branch July 4, 2022 16:47
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